You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
also removed now obsolete references to the --provider param and specified how --model should be used
closes#76
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+70-36Lines changed: 70 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,61 @@ agents:
35
35
36
36
Run it in a terminal with `cagent run basic_agent.yaml`.
37
37
38
-
Many examples can be found [here](/examples/README.md)!
38
+
Many more examples can be found [here](/examples/README.md)!
39
+
40
+
### Improving an agent with MCP tools
41
+
42
+
`cagent`supports MCP servers, enabling agents to use a wide variety of external tools and services.
43
+
44
+
It supports three transport types: `stdio`, `http` and `sse`.
45
+
46
+
Giving an agent access to tools via MCP is a quick way to greatly improve its capabilities, the quality of its results and its general useful-ness.
47
+
48
+
Get started quickly with the [Docker MCP Toolkit](https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/) and [catalog](https://docs.docker.com/ai/mcp-catalog-and-toolkit/catalog/)
49
+
50
+
Here, we're giving the same basic agent from the example above access to a **containerized** `duckduckgo` mcp server and it's tools by using Docker's MCP Gateway:
51
+
52
+
```yaml
53
+
agents:
54
+
root:
55
+
model: openai/gpt-5-mini
56
+
description: A helpful AI assistant
57
+
instruction: |
58
+
You are a knowledgeable assistant that helps users with various tasks.
59
+
Be helpful, accurate, and concise in your responses.
When using a containerized server via the Docker MCP gateway, you can configure any required settings/secrets/authentication using the [Docker MCP Toolkit](https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/#example-use-the-github-official-mcp-server) in Docker Desktop.
67
+
68
+
Aside from the containerized MCP severs the Docker MCP Gateway provides, any standard MCP server can be used with cagent!
69
+
70
+
Here's an example similar to the above but adding `read_file` and `write_file` tools from the `rust-mcp-filesystem` MCP server:
71
+
72
+
```yaml
73
+
agents:
74
+
root:
75
+
model: openai/gpt-5-mini
76
+
description: A helpful AI assistant
77
+
instruction: |
78
+
You are a knowledgeable assistant that helps users with various tasks.
79
+
Be helpful, accurate, and concise in your responses. Write your search results to disk.
command: rust-mcp-filesystem # installed with `cargo install rust-mcp-filesystem`
86
+
args: ["--allow-write", "."]
87
+
tools: ["read_file", "write_file"] # Optional: specific tools only
88
+
env:
89
+
- "RUST_LOG=debug"
90
+
```
91
+
92
+
See [the USAGE docs](./docs/USAGE.md#tool-configuration) for more detailed information and examples
39
93
40
94
### 🎯 Key Features
41
95
@@ -131,52 +185,36 @@ models:
131
185
132
186
You'll find a curated list of agents examples, spread into 3 categories, [Basic](https://github.com/docker/cagent/tree/main/examples#basic-configurations), [Advanced](https://github.com/docker/cagent/tree/main/examples#advanced-configurations) and [multi-agents](https://github.com/docker/cagent/tree/main/examples#multi-agent-configurations) in the `/examples/` directory.
133
187
134
-
## MCP (Model Context Protocol)
135
-
136
-
`cagent` supports MCP servers, enabling agents to use a wide variety of external tools and services. It supports three transport types: `stdio`, `http` and `sse`.
137
-
138
-
Get started easily wtith the Docker MCP [Toolkit](https://docs.docker.com/ai/mcp-catalog-and-toolkit/toolkit/) and [catalog](https://docs.docker.com/ai/mcp-catalog-and-toolkit/catalog/).
## Quickly generate agents and agent teams with `cagent new`
156
189
157
-
Using the command `cagent new` you can quickly generate agents or multi-agent teams using a single prompt! `cagent` has a built-in agent dedicated to this task.
190
+
Using the command `cagent new` you can quickly generate agents or multi-agent teams using a single prompt!
191
+
`cagent`has a built-in agent dedicated to this task.
192
+
193
+
To use the feature, you must have an Anthropic, OpenAI or Google API key available in your environment, or specify a local model to run with DMR (Docker Model Runner).
158
194
159
-
To use the feature, you must have an Anthropic, OpenAI or Google API key available in your environment.
195
+
You can choose what provider and model gets used by passing the `--model provider/modelname` flag to `cagent new`
160
196
161
-
If `--provider` is unspecified, `cagent new` will automatically choose between these 3 in order based on the first api key it finds in the environment
197
+
If `--model` is unspecified, `cagent new` will automatically choose between these 3 providers in order based on the first api key it finds in your environment
162
198
163
199
```sh
164
-
export ANTHROPIC_API_KEY=your_api_key_here # first choice
165
-
export OPENAI_API_KEY=your_api_key_here # if anthropic key not set
166
-
export GOOGLE_API_KEY=your_api_key_here # if anthropic and openai keys are not set
200
+
export ANTHROPIC_API_KEY=your_api_key_here # first choice. default model claude-sonnet-4-0
201
+
export OPENAI_API_KEY=your_api_key_here # if anthropic key not set. default model gpt-5-mini
202
+
export GOOGLE_API_KEY=your_api_key_here # if anthropic and openai keys are not set. default model gemini-2.5-flash
167
203
```
168
204
169
-
The model in use can also be overridden using `--model` (can only be used together with `--provider`)
170
-
171
205
Example of provider and model overriding:
172
206
173
207
```sh
174
-
cagent new --provider openai --model gpt-5
208
+
# Use GPT-5 via OpenAI
209
+
cagent new --model openai/gpt-5
210
+
211
+
# Use a local model (ai/gemma3-qat:12B) via DMR
212
+
cagent new --model dmr/ai/gemma3-qat:12B
175
213
```
176
214
177
215
---
178
216
179
-
```sh
217
+
```
180
218
$ cagent new
181
219
182
220
------- Welcome to cagent! -------
@@ -245,7 +283,3 @@ improvements to the code. It can also fix issues and implement new features!
245
283
246
284
We’d love to hear your thoughts on this project.
247
285
You can find us on [Slack](https://dockercommunity.slack.com/archives/C09DASHHRU4)
Included in `cagent` are a series of built-in tools that can greatly enhance the capabilities of your agents without needing to configure any external MCP tools.
@@ -329,26 +347,6 @@ them to delegate tasks to other agents:
329
347
transfer_task(agent="developer", task="Create a login form", expected_output="HTML and CSS code")
330
348
```
331
349
332
-
### Using tools via the Docker MCP Gateway
333
-
334
-
We recommend using MCP tools via the [Docker MCP Gateway](https://github.com/docker/mcp-gateway).
335
-
All tools are containerized for resource isolation and security, and all the tools in the catalog can be accessed through a single endpoint
336
-
337
-
Using the `docker mcp gateway` command you can configure your agents with a set of MCP tools
338
-
delivered straight from Docker's MCP Gateway.
339
-
340
-
> you can check `docker mcp gateway run --help` for more information on how to use that command
341
-
342
-
In this example, lets configure duckduckgo to give our agents the ability to search the web:
0 commit comments