Availability: Experimental
cagent lets you build, orchestrate, and share AI agents. You can use it to define AI agents that work as a team.
cagent relies on the concept of a root agent that acts as a team lead and delegates tasks to the sub-agents you define. Each agent:
- uses the model of your choice, with the parameters of your choice.
- has access to the built-in tools and MCP servers configured in the Docker MCP gateway.
- works in its own context. They do not share knowledge.
The root agent is your main contact point. Each agent has its own context, they don’t share knowledge.
- ️Multi-tenant architecture with client isolation and session management…
Availability: Experimental
cagent lets you build, orchestrate, and share AI agents. You can use it to define AI agents that work as a team.
cagent relies on the concept of a root agent that acts as a team lead and delegates tasks to the sub-agents you define. Each agent:
- uses the model of your choice, with the parameters of your choice.
- has access to the built-in tools and MCP servers configured in the Docker MCP gateway.
- works in its own context. They do not share knowledge.
The root agent is your main contact point. Each agent has its own context, they don’t share knowledge.
- ️Multi-tenant architecture with client isolation and session management.
- Rich tool ecosystem via Model Context Protocol (MCP) integration.
- Hierarchical agent system with intelligent task delegation.
- Multiple interfaces including CLI, TUI, API server, and MCP server.
- Agent distribution via Docker registry integration.
- Security-first design with proper client scoping and resource isolation.
- Event-driven streaming for real-time interactions.
- Multi-model support (OpenAI, Anthropic, Gemini, DMR, Docker AI Gateway).
The easiest way to get cagent is to install Docker Desktop version 4.49 or later for your operating system.
You can also build cagent from the source. For more information, see the cagent GitHub repository.
Set the following environment variables: 1.
Create an agent by saving this sample as assistant.yaml:
1.
Start your prompt with your agent:
You can use AI prompting to generate a team of agents with the cagent new command:
Alternatively, you can write your configuration file manually. For example:
See the reference documentation.
cagent includes a set of built-in tools that enhance your agents’ capabilities. You don’t need to configure any external MCP tools to use them.
Think tool
The think tool allows agents to reason through problems step by step:
Todo tool
The todo tool helps agents manage task lists:
Memory tool
The memory tool provides persistent storage:
Task transfer tool
The task transfer tool is an internal tool that allows an agent to delegate a task to sub-agents. To prevent an agent from delegating work, make sure it doesn’t have sub-agents defined in its configuration.
Using tools via the Docker MCP Gateway
If you use the Docker MCP gateway, you can configure your agent to interact with the gateway and use the MCP servers configured in it. See docker mcp gateway run.
For example, to enable an agent to use Duckduckgo via the MCP Gateway:
You can use the following CLI commands, during CLI sessions with your agents:
| Command | Description |
|---|---|
| /exit | Exit the program |
| /reset | Clear conversation history |
| /eval | Save current conversation for evaluation |
| /compact | Compact the current session |
Agent configurations can be packaged and shared via Docker Hub. Before you start, make sure you have a Docker repository.
To push an agent:
To pull an agent to the current directory:
The agent’s configuration file is named <namespace>_<reponame>.yaml. Run it with the cagent run <filename> command.
- For more information about cagent, see the GitHub repository.
- Docker MCP Gateway