Docker cagent: Build and Orchestrate AI Agents Without Writing Code

Master multi-agent AI workflows with simple YAML configurations—no programming required

Docker cagent: Build and Orchestrate AI Agents Without Writing Code

The rise of agentic AI has transformed software development, but building and distributing AI agents has remained frustratingly complex. Enter Docker cagent—an experimental, open-source tool that revolutionizes how developers create, orchestrate, and share AI agents using nothing more than simple YAML configuration files.

What is Docker cagent?

Docker cagent: A Command Line Tool For Running AI Agents
Discover how Docker’s revolutionary cagent framework is transforming AI agent development with simple YAML configurations, multi-agent orchestration, and seamless tool integration.

Docker cagent is a command-line utility that lets you build powerful AI agent teams without writing a single line of code. Instead of wrestling with Python dependencies and complex frameworks, you define your agent's behavior, tools, and persona in a declarative YAML file. The result? A portable, version-controlled, and easily shareable AI assistant that integrates seamlessly with the Docker ecosystem.

Source ~ https://deepwiki.com/docker/cagent

At its core, cagent operates on a hierarchical architecture where a "root agent" acts as a coordinator, intelligently delegating tasks to specialized sub-agents. Each agent maintains its own isolated context, ensuring modularity and clean separation of concerns—a crucial advantage for complex, multi-step workflows.

Key Features That Set cagent Apart

Source ~ https://deepwiki.com/docker/cagent

1. Multi-Agent Orchestration with Zero Code

Build teams of AI agents that collaborate like human teams. Your root agent acts as the team lead, breaking down complex requests and delegating to specialists. Each agent can have:

  • Custom instructions and personas
  • Specific tool access
  • Different AI models optimized for their tasks
  • Independent context and memory

2. Flexible Multi-Model Support

Unlike vendor-locked solutions, cagent supports multiple AI providers out of the box:

  • OpenAI (GPT-4, GPT-5)
  • Anthropic (Claude Sonnet, Claude Opus)
  • Google Gemini
  • Local models via Docker Model Runner for privacy-sensitive workflows
  • Docker AI Gateway for unified model management

3. Rich Tool Integration via MCP

Docker's Model Context Protocol (MCP) integration gives your agents superpowers. Connect to:

  • 200+ pre-built MCP servers in the Docker MCP Catalog
  • GitHub for issue tracking and code management
  • Web search engines like DuckDuckGo
  • File systems, databases, and custom APIs
  • Your own containerized MCP servers

Built-in tools include:

  • Think tool: Step-by-step reasoning capabilities
  • Todo tool: Task management and tracking
  • Memory tool: Persistent storage across sessions
  • Transfer task tool: Intelligent delegation between agents

4. Distribution Made Simple with Docker Hub

One of cagent's killer features is agent distribution. Share your agents as easily as pushing Docker images:

# Push your agent to Docker Hub
cagent push ./my-agent.yaml myusername/my-agent

# Anyone can pull and run it
cagent run docker.io/myusername/my-agent:latest

This solves both the creation AND distribution problems that plague AI agent development.

5. Multiple Interfaces for Every Use Case

  • CLI: Perfect for automation and scripting
  • TUI (Text User Interface): Interactive terminal experience
  • API Server: Integrate agents into existing applications
  • MCP Server: Expose your agents as MCP tools

6. Security-First Architecture

cagent implements:

  • Multi-tenant architecture with client isolation
  • Proper resource scoping
  • Session management
  • Secure credential handling (with upcoming 1Password integration)

Real-World Use Cases

GitHub Issue Manager

Transform GitHub issues into an intelligent to-do list. Here's a complete agent definition:

version: "2"
models:
  gpt:
    provider: openai
    model: gpt-5
    max_tokens: 64000

agents:
  root:
    model: gpt
    description: "GitHub Issue Manager"
    instruction: |
      You are a to-do list agent managing GitHub issues.
      
      # Responsibilities:
      - Fetch and organize GitHub issues from the user's repo
      - Identify priority tasks using labels
      - Provide clear summaries with titles and numbers
      - Help users create, update, and close issues
      
      # Behavior:
      - Always state the current date for context
      - Focus on open issues
      - Highlight urgent/high-priority items
      - Suggest task prioritization
    
    add_date: true
    toolsets:
      - type: mcp
        command: docker
        args: [mcp, gateway, run]
        tools:
          - get_me
          - create_issue
          - list_issues
          - update_issue
          - add_issue_comment

Run it with: cagent run github-todo.yaml

Technical Blog Writer

Need a content creation workflow? Build a multi-agent team:

#!/usr/bin/env cagent run
version: "1"
agents:
  root:
    model: anthropic
    description: "Technical blog writing team coordinator"
    instruction: |
      You lead a team of AI agents for technical blog writing.
      
      Team members:
      - web_search_agent: Researches topics
      - writer: Creates 750-word blog posts
      
      Workflow:
      1. Delegate research to web_search_agent
      2. Pass findings to writer agent
      3. Review and deliver final content
      
      Rules:
      - Call ONE agent at a time
      - Wait for results before next delegation
    sub_agents: ["web_search_agent", "writer"]
  
  web_search_agent:
    model: claude
    description: "Web research specialist"
    toolsets:
      - type: mcp
        ref: docker:duckduckgo
  
  writer:
    model: claude
    description: "Technical content writer"
    instruction: |
      Write engaging 750-word technical blog posts.
      Use research provided by the team.
      Include code examples and practical insights.

Getting Started with Docker cagent

Installation

💡
The easiest way to install cagent is through Homebrew:

$ brew install cagent

Option 2: Manual Installation

  1. Download the latest release from the cagent GitHub repository
  2. Make it executable (macOS/Linux):

chmod +x /path/to/cagent-linux-amd64
  1. Set environment variables:

# For Docker AI Gateway
export CAGENT_MODELS_GATEWAY=<your_gateway_url>

# Or set individual API keys
export OPENAI_API_KEY=<your_key>
export ANTHROPIC_API_KEY=<your_key>
export GOOGLE_API_KEY=<your_key>
cagent

For any feedback, please visit: https://docker.qualtrics.com/jfe/form/SV_cNsCIg92nQemlfw

cagent is a command-line tool for running AI agents

Usage:
  cagent [flags]
  cagent [command]

Available Commands:
  api         Start the API server
  build       Build a Docker image for the agent
  catalog     Manage the agent catalog
  completion  Generate the autocompletion script for the specified shell
  eval        Run evaluations for an agent
  exec        Execute an agent
  feedback    Send feedback about cagent
  help        Help about any command
  new         Create a new agent configuration
  print       Print the canonical form of an agent file
  pull        Pull an artifact from Docker Hub
  push        Push an agent to an OCI registry
  readme      Print the README of an agent
  run         Run an agent
  version     Print the version information

Flags:
  -d, --debug             Enable debug logging
  -h, --help              help for cagent
      --log-file string   Path to debug log file (default: ~/.cagent/cagent.debug.log; only used with --debug)
  -o, --otel              Enable OpenTelemetry tracing

Use "cagent [command] --help" for more information about a command.

Create Your First Agent

Use AI to generate your agent configuration:

$ cagent new

What should your agent/agent team do?
> I need a customer support agent that can search our docs 
  and create support tickets

Or create manually:

agents:
  root:
    model: openai/gpt-5-mini
    description: "A helpful AI assistant"
    instruction: |
      You are a knowledgeable assistant.
      Be helpful, accurate, and concise.

Run your agent:

cagent run assistant.yaml

Interactive Commands

During CLI sessions, use:

  • /exit - Exit the program
  • /reset - Clear conversation history
  • /eval - Save conversation for evaluation
  • /compact - Compact the current session

Why Choose Docker cagent?

For Developers

  • No boilerplate code: Define behavior in YAML, not Python classes
  • Fast iteration: Edit YAML and re-run instantly
  • Version control friendly: Track agent changes in git
  • Framework agnostic: Not locked into LangChain, LangGraph, or CrewAI

For Teams

  • Easy sharing: Distribute via Docker Hub like container images
  • Standardized format: Everyone uses the same YAML structure
  • Reproducible: Agents run identically across environments
  • Composable: Mix and match community agents

For Enterprises

  • Local model support: Keep sensitive data on-premises with Docker Model Runner
  • Security first: Client isolation and session management
  • OCI-native: Leverages existing Docker registry infrastructure
  • Audit trail: Event-driven streaming for monitoring

Integration with the Docker AI Ecosystem

Docker cagent is part of a comprehensive AI development platform:

  • Docker Model Runner: Run local LLMs with GPU acceleration
  • Docker MCP Gateway: Access 200+ containerized tool servers
  • Docker Compose: Orchestrate multi-container AI applications
  • Docker Hub: Share and discover AI agents and models
  • Docker Desktop: Unified development environment

Best Practices

1. Start Simple, Scale Gradually

Begin with single-agent configurations before building multi-agent teams.

2. Leverage the Community

Search Docker Hub for existing agents: cagent pull username/agent-name

3. Optimize Model Selection

  • Use faster models (GPT-4o-mini, Claude Sonnet) for routine tasks
  • Reserve powerful models (GPT-5, Claude Opus) for complex reasoning
  • Consider local models for cost-sensitive or privacy-critical workflows

4. Tool Minimization

Expose only necessary tools to agents—reduces context length and improves focus.

5. Clear Instructions

Write detailed, structured instructions with:

  • Responsibilities section
  • Behavioral guidelines
  • Step-by-step workflows
  • Examples of desired outputs

Common Use Cases for cagent

  1. Development Workflows: Code review agents, documentation generators, test case creators
  2. Content Creation: Blog writers, social media managers, technical documentation
  3. Customer Support: Ticket routing, knowledge base search, response drafting
  4. Data Analysis: Report generation, data transformation, insight extraction
  5. DevOps Automation: Incident response, deployment coordination, monitoring analysis
  6. Research Assistants: Literature review, data synthesis, competitive analysis

The Future of AI Agent Development

Docker cagent represents a paradigm shift in how we build AI applications. By treating agents as declarative configurations rather than imperative code, it democratizes AI development and accelerates the path from idea to production.

Upcoming features include:

  • Enhanced 1Password integration for secure credential management
  • Expanded model provider support
  • Advanced multi-agent collaboration patterns
  • Production-ready deployment tools
  • Integrated monitoring and analytics

Conclusion: Build Your AI Agent Fleet Today

Docker cagent eliminates the complexity barrier to AI agent development. Whether you're building a simple task automation agent or orchestrating a team of specialized AI workers, cagent provides the tools to succeed without writing code.

Get started in three steps:

  1. Download cagent from GitHub
  2. Create your first agent with cagent new
  3. Share it on Docker Hub with cagent push

The future of AI development is declarative, portable, and collaborative. With Docker cagent, that future is available today.

Additional Resources