Skip to content

Commit 91a5334

Browse files
committed
Fix docker agent serve xxx commands
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
1 parent 58df09f commit 91a5334

5 files changed

Lines changed: 35 additions & 33 deletions

File tree

content/manuals/ai/docker-agent/integrations/a2a.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Before starting an A2A server, you need:
2929
Basic usage:
3030

3131
```console
32-
$ docker agent a2a ./agent.yaml
32+
$ docker agent serve a2a ./agent.yaml
3333
```
3434

3535
Your agent is now accessible via HTTP. Other A2A systems can discover your
@@ -38,19 +38,19 @@ agent's capabilities and call it.
3838
Custom port:
3939

4040
```console
41-
$ docker agent a2a ./agent.yaml --port 8080
41+
$ docker agent serve a2a ./agent.yaml --port 8080
4242
```
4343

4444
Specific agent in a team:
4545

4646
```console
47-
$ docker agent a2a ./agent.yaml --agent engineer
47+
$ docker agent serve a2a ./agent.yaml --agent engineer
4848
```
4949

5050
From OCI registry:
5151

5252
```console
53-
$ docker agent a2a agentcatalog/pirate --port 9000
53+
$ docker agent serve a2a agentcatalog/pirate --port 9000
5454
```
5555

5656
## HTTP endpoints
@@ -142,7 +142,7 @@ Here's a concrete scenario where A2A is useful. You have two agents:
142142
Run the specialist as an A2A server:
143143

144144
```console
145-
$ docker agent a2a ./code-reviewer.yaml --port 8080
145+
$ docker agent serve a2a ./code-reviewer.yaml --port 8080
146146
Listening on 127.0.0.1:8080
147147
```
148148

@@ -198,7 +198,7 @@ agents:
198198

199199
## What's next
200200

201-
- Review the [CLI reference](../reference/cli.md#a2a) for all `docker agent a2a`
201+
- Review the [CLI reference](../reference/cli.md#a2a) for all `docker agent serve a2a`
202202
options
203203
- Learn about [MCP mode](./mcp.md) to expose agents as tools in MCP clients
204204
- Learn about [ACP mode](./acp.md) for editor integration

content/manuals/ai/docker-agent/integrations/acp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ reference:
131131

132132
```console
133133
# Local file path
134-
$ docker agent acp ./agent.yml
134+
$ docker agent serve acp ./agent.yml
135135

136136
# OCI registry reference
137-
$ docker agent acp agentcatalog/pirate
138-
$ docker agent acp dockereng/myagent:v1.0.0
137+
$ docker agent serve acp agentcatalog/pirate
138+
$ docker agent serve acp dockereng/myagent:v1.0.0
139139
```
140140

141141
Use the same syntax in your editor configuration:
@@ -177,7 +177,7 @@ If the agent starts but can't access files or perform other actions, check:
177177
- Explore the [toolsets reference](../reference/toolsets.md) to learn what tools
178178
are available
179179
- Add [RAG for codebase search](../rag.md) to your agent
180-
- Check the [CLI reference](../reference/cli.md) for all `docker agent acp` options
180+
- Check the [CLI reference](../reference/cli.md) for all `docker agent serve acp` options
181181
- Browse [example
182182
configurations](https://github.com/docker/cagent/tree/main/examples) for
183183
inspiration

content/manuals/ai/docker-agent/integrations/mcp.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ Example configuration:
9393
{
9494
"mcpServers": {
9595
"myagent": {
96-
"command": "/usr/local/bin/cagent",
96+
"command": "/usr/local/bin/docker",
9797
"args": [
98+
"agent",
99+
"serve",
98100
"mcp",
99101
"/path/to/agent.yml",
100102
"--working-dir",
@@ -111,7 +113,7 @@ Example configuration:
111113

112114
Configuration breakdown:
113115

114-
- `command`: Full path to your `cagent` binary (use `which cagent` to find it)
116+
- `command`: Full path to your `docker` binary (use `which docker` to find it), or path to docker-agent if not using the docker CLI plugin
115117
- `args`: MCP command arguments:
116118
- `mcp`: The subcommand to run cagent in MCP mode
117119
- `dockereng/myagent`: Your agent configuration (local file path or OCI
@@ -142,7 +144,7 @@ Command breakdown:
142144
- `myagent`: Name for this MCP server in Claude Code
143145
- `--env`: Pass environment variables (repeat for each variable)
144146
- `--`: Separates Claude Code options from the MCP server command
145-
- `docker agent mcp /path/to/agent.yml`: The cagent MCP command with the path to your
147+
- `docker agent serve mcp /path/to/agent.yml`: The cagent MCP command with the path to your
146148
agent configuration
147149
- `--working-dir $(pwd)`: Set the working directory for agent execution
148150

@@ -153,7 +155,7 @@ sessions.
153155

154156
For other MCP-compatible clients, you need to:
155157

156-
1. Start cagent with `docker agent mcp /path/to/agent.yml --working-dir /project/path`
158+
1. Start cagent with `docker agent serve mcp /path/to/agent.yml --working-dir /project/path`
157159
2. Configure the client to communicate with Docker Agent over stdio
158160
3. Pass required environment variables (API keys, etc.)
159161

@@ -166,11 +168,11 @@ reference:
166168

167169
```console
168170
# Local file path
169-
$ docker agent mcp ./agent.yml
171+
$ docker agent serve mcp ./agent.yml
170172
171173
# OCI registry reference
172-
$ docker agent mcp agentcatalog/pirate
173-
$ docker agent mcp dockereng/myagent:v1.0.0
174+
$ docker agent serve mcp agentcatalog/pirate
175+
$ docker agent serve mcp dockereng/myagent:v1.0.0
174176
```
175177

176178
Use the same syntax in MCP client configurations:
@@ -179,8 +181,8 @@ Use the same syntax in MCP client configurations:
179181
{
180182
"mcpServers": {
181183
"myagent": {
182-
"command": "/usr/local/bin/cagent",
183-
"args": ["mcp", "agentcatalog/pirate"]
184+
"command": "/usr/local/bin/docker",
185+
"args": ["agent", "serve", "mcp", "agentcatalog/pirate"]
184186
}
185187
}
186188
}
@@ -299,7 +301,7 @@ around.
299301
- Explore the [toolsets reference](../reference/toolsets.md) to learn what tools
300302
agents can use
301303
- Add [RAG for codebase search](../rag.md) to your agent
302-
- Check the [CLI reference](../reference/cli.md) for all `docker agent mcp` options
304+
- Check the [CLI reference](../reference/cli.md) for all `docker agent serve mcp` options
303305
- Browse [example
304306
configurations](https://github.com/docker/cagent/tree/main/examples) for
305307
different agent types

content/manuals/ai/docker-agent/reference/cli.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ systems to discover and interact with your agent. Auto-selects an available
5353
port if not specified.
5454

5555
```console
56-
$ docker agent a2a agent-file|registry-ref
56+
$ docker agent serve a2a agent-file|registry-ref
5757
```
5858

5959
> [!NOTE]
@@ -77,8 +77,8 @@ Supports [runtime flags](#runtime-flags).
7777
Examples:
7878

7979
```console
80-
$ docker agent a2a ./agent.yaml --port 8080
81-
$ docker agent a2a agentcatalog/pirate --port 9000
80+
$ docker agent serve a2a ./agent.yaml --port 8080
81+
$ docker agent serve a2a agentcatalog/pirate --port 9000
8282
```
8383

8484
### acp
@@ -87,7 +87,7 @@ Start agent as ACP (Agent Client Protocol) server on stdio for editor integratio
8787
See [ACP integration](../integrations/acp.md) for setup guides.
8888

8989
```console
90-
$ docker agent acp agent-file|registry-ref
90+
$ docker agent serve acp agent-file|registry-ref
9191
```
9292

9393
Arguments:
@@ -146,7 +146,7 @@ Arguments:
146146
HTTP API server.
147147

148148
```console
149-
$ docker agent api agent-file|agents-dir
149+
$ docker agent serve api agent-file|agents-dir
150150
```
151151

152152
Arguments:
@@ -166,9 +166,9 @@ Supports [runtime flags](#runtime-flags).
166166
Examples:
167167

168168
```console
169-
$ docker agent api ./agent.yaml
170-
$ docker agent api ./agents/ --listen :9000
171-
$ docker agent api docker.io/user/agent --pull-interval 10
169+
$ docker agent serve api ./agent.yaml
170+
$ docker agent serve api ./agents/ --listen :9000
171+
$ docker agent serve api docker.io/user/agent --pull-interval 10
172172
```
173173

174174
The `--pull-interval` flag works only with OCI references. Automatically pulls and reloads at the specified interval.
@@ -304,7 +304,7 @@ MCP (Model Context Protocol) server on stdio. Exposes agents as tools to MCP
304304
clients. See [MCP integration](../integrations/mcp.md) for setup guides.
305305

306306
```console
307-
$ docker agent mcp agent-file|registry-ref
307+
$ docker agent serve mcp agent-file|registry-ref
308308
```
309309

310310
Arguments:
@@ -316,8 +316,8 @@ Supports [runtime flags](#runtime-flags).
316316
Examples:
317317

318318
```console
319-
$ docker agent mcp ./agent.yaml
320-
$ docker agent mcp docker.io/user/agent:latest
319+
$ docker agent serve mcp ./agent.yaml
320+
$ docker agent serve mcp docker.io/user/agent:latest
321321
```
322322

323323
### new

content/manuals/ai/docker-agent/sharing-agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ Agents can be exposed as tools in MCP clients:
8282
{
8383
"mcpServers": {
8484
"myagent": {
85-
"command": "/usr/local/bin/cagent",
86-
"args": ["mcp", "agentcatalog/pirate"]
85+
"command": "/usr/local/bin/docker",
86+
"args": ["agent", "serve", "mcp", "agentcatalog/pirate"]
8787
}
8888
}
8989
}

0 commit comments

Comments
 (0)