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
[cagent](https://github.com/docker/cagent) lets you build, orchestrate, and share
14
-
AI agents. You can use it to define AI agents that work as a team.
16
+
[cagent](https://github.com/docker/cagent) is an open source tool for building
17
+
teams of specialized AI agents. Instead of prompting one generalist model, you
18
+
define agents with specific roles and instructions that collaborate to solve
19
+
problems. Run these agent teams from your terminal using any LLM provider.
15
20
16
-
cagent relies on the concept of a _root agent_ that acts as a team lead and
17
-
delegates tasks to the sub-agents you define.
18
-
Each agent:
19
-
- uses the model of your choice, with the parameters of your choice.
20
-
- has access to the [built-in tools](#built-in-tools) and MCP servers
21
-
configured in the [Docker MCP gateway](/manuals/ai/mcp-catalog-and-toolkit/mcp-gateway.md).
22
-
- works in its own context. They do not share knowledge.
21
+
## Why agent teams
23
22
24
-
The root agent is your main contact point. Each agent has its own context,
25
-
they don't share knowledge.
23
+
One agent handling complex work means constant context-switching. Split the work
24
+
across focused agents instead - each handles what it's best at. cagent manages
25
+
the coordination.
26
26
27
-
## Key features
27
+
Here's a two-agent team that debugs problems:
28
28
29
-
- ️Multi-tenant architecture with client isolation and session management.
30
-
- Rich tool ecosystem via Model Context Protocol (MCP) integration.
31
-
- Hierarchical agent system with intelligent task delegation.
32
-
- Multiple interfaces including CLI, TUI, API server, and MCP server.
33
-
- Agent distribution via Docker registry integration.
34
-
- Security-first design with proper client scoping and resource isolation.
35
-
- Event-driven streaming for real-time interactions.
36
-
- Multi-model support (OpenAI, Anthropic, Gemini, DMR, Docker AI Gateway).
37
-
38
-
## Get started with cagent
39
-
40
-
1. The easiest way to get cagent is to [install Docker Desktop version 4.49 or later](/manuals/desktop/release-notes.md) for your operating system.
41
-
42
-
> [!NOTE]
43
-
> You can also build cagent from the source. For more information, see the [cagent GitHub repository](https://github.com/docker/cagent?tab=readme-ov-file#build-from-source).
44
-
45
-
1. Set the following environment variables:
46
-
47
-
```bash
48
-
export OPENAI_API_KEY=<your_api_key_here># For OpenAI models
49
-
export ANTHROPIC_API_KEY=<your_api_key_here># For Anthropic models
50
-
export GOOGLE_API_KEY=<your_api_key_here># For Gemini models
51
-
```
52
-
53
-
1. Create an agent by saving this sample as `assistant.yaml`:
54
-
55
-
```yaml {title="assistant.yaml"}
56
-
agents:
57
-
root:
58
-
model: openai/gpt-5-mini
59
-
description: A helpful AI assistant
60
-
instruction: |
61
-
You are a knowledgeable assistant that helps users with various tasks.
62
-
Be helpful, accurate, and concise in your responses.
63
-
```
64
-
65
-
1. Start your prompt with your agent:
66
-
67
-
```bash
68
-
cagent run assistant.yaml
69
-
```
70
-
71
-
## Create an agentic team
72
-
73
-
You can use AI prompting to generate a team of agents with the `cagent new`
74
-
command:
75
-
76
-
```console
77
-
$ cagent new
78
-
79
-
For any feedback, visit: https://docker.qualtrics.com/jfe/form/SV_cNsCIg92nQemlfw
80
-
81
-
Welcome to cagent! (Ctrl+C to exit)
82
-
83
-
What should your agent/agent team do? (describe its purpose):
84
-
85
-
> I need a cross-functional feature team. The team owns a specific product
86
-
feature end-to-end. Include the key responsibilities of each of the roles
87
-
involved (engineers, designer, product manager, QA). Keep the description
88
-
short, clear, and focused on how this team delivers value to users and the business.
89
-
```
90
-
91
-
Alternatively, you can write your configuration file manually. For example:
92
-
93
-
```yaml {title="agentic-team.yaml"}
29
+
```yaml
94
30
agents:
95
31
root:
96
-
model: claude
97
-
description: "Main coordinator agent that delegates tasks and manages workflow"
32
+
model: openai/gpt-5-mini # Change to the model that you want to use
33
+
description: Bug investigator
98
34
instruction: |
99
-
You are the root coordinator agent. Your job is to:
100
-
1. Understand user requests and break them down into manageable tasks.
101
-
2. Delegate appropriate tasks to your helper agent.
102
-
3. Coordinate responses and ensure tasks are completed properly.
103
-
4. Provide final responses to the user.
104
-
When you receive a request, analyze what needs to be done and decide whether to:
105
-
- Handle it yourself if it's simple.
106
-
- Delegate to the helper agent if it requires specific assistance.
107
-
- Break complex requests into multiple sub-tasks.
108
-
sub_agents: ["helper"]
35
+
Analyze error messages, stack traces, and code to find bug root causes.
36
+
Explain what's wrong and why it's happening.
37
+
Delegate fix implementation to the fixer agent.
38
+
sub_agents: [fixer]
39
+
toolsets:
40
+
- type: filesystem
41
+
- type: mcp
42
+
ref: docker:duckduckgo
109
43
110
-
helper:
111
-
model: claude
112
-
description: "Assistant agent that helps with various tasks as directed by the root agent"
44
+
fixer:
45
+
model: anthropic/claude-sonnet-4-5 # Change to the model that you want to use
46
+
description: Fix implementer
113
47
instruction: |
114
-
You are a helpful assistant agent. Your role is to:
115
-
1. Complete specific tasks assigned by the root agent.
116
-
2. Provide detailed and accurate responses.
117
-
3. Ask for clarification if tasks are unclear.
118
-
4. Report back to the root agent with your results.
119
-
120
-
Focus on being thorough and helpful in whatever task you're given.
121
-
122
-
models:
123
-
claude:
124
-
provider: anthropic
125
-
model: claude-sonnet-4-0
126
-
max_tokens: 64000
127
-
```
128
-
129
-
[See the reference documentation](https://github.com/docker/cagent?tab=readme-ov-file#-configuration-reference).
130
-
131
-
## Built-in tools
132
-
133
-
cagent includes a set of built-in tools that enhance your agents' capabilities.
134
-
You don't need to configure any external MCP tools to use them.
135
-
136
-
```yaml
137
-
agents:
138
-
root:
139
-
# ... other config
48
+
Write fixes for bugs diagnosed by the investigator.
49
+
Make minimal, targeted changes and add tests to prevent regression.
140
50
toolsets:
141
-
- type: todo
142
-
- type: transfer_task
51
+
- type: filesystem
52
+
- type: shell
143
53
```
144
54
145
-
### Think tool
55
+
The root agent investigates and explains the problem. When it understands the
56
+
issue, it hands off to `fixer` for implementation. Each agent stays focused on
57
+
its specialty.
146
58
147
-
The think tool allows agents to reason through problems step by step:
59
+
## Installation
148
60
149
-
```yaml
150
-
agents:
151
-
root:
152
-
# ... other config
153
-
toolsets:
154
-
- type: think
155
-
```
61
+
cagent is included in Docker Desktop 4.49 and later.
0 commit comments