---
title: "Build a Multi-Agent System in 5 Minutes with cagent"
description: "cagent is an open-source Docker tool that defines multi-agent AI systems declaratively in a single YAML file."
url: "https://swe.quest/articles/build-a-multi-agent-system-in-5-minutes-with-cagent-b6fd900693f4f3cc"
canonical: "https://www.docker.com/blog/how-to-build-a-multi-agent-system/"
source: "Docker"
published: "2025-10-14"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["ai-agents","llms","developer-tools"]
---

# Build a Multi-Agent System in 5 Minutes with cagent

A post on [Docker](https://swe.quest/sources/docker.md), published 2025-10-14, 4 min read, How-to. Original: [https://www.docker.com/blog/how-to-build-a-multi-agent-system/](https://www.docker.com/blog/how-to-build-a-multi-agent-system/)

## Summary

cagent is an open-source Docker tool that defines multi-agent AI systems declaratively in a single YAML file. Each agent's model (OpenAI, Anthropic, Gemini or local via Docker Model Runner), instructions, MCP toolsets and sub-agents are specified there, and the runtime handles delegation and context passing. A three-agent example (coordinator, researcher with DuckDuckGo MCP, writer) runs with \`cagent run\` and can be pushed to Docker Hub so teammates run the identical setup. Example use cases include PR triage, research summarization and knowledge routing with PII redaction.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- LLM APIs ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- YAML

## Keywords

cagent, Docker, MCP, Docker Hub, Docker Model Runner

## Related posts

- [Build and Distribute AI Agents and Workflows with cagent](https://swe.quest/articles/build-and-distribute-ai-agents-and-workflows-with-cagent-f30c9f0bbad13e54.md): Docker · 2025-09-18 · Medium · 7 min read · AI agents, Developer tools, Containers, Open source
  cagent is Docker's open-source command-line runtime that defines AI agents (model, instructions, persona and MCP tools) in a single YAML file and distributes them through OCI registries such as Docker Hub.
- [Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent](https://swe.quest/articles/breaking-free-from-ai-vendor-lock-in-integrating-github-models-with-docker-8fc971be1201fa24.md): Docker · 2025-12-11 · Medium · 7 min read · AI agents, LLMs, Containers
  Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider.
- [Using MCP Servers: From Quick Tools to Multi-Agent Systems](https://swe.quest/articles/using-mcp-servers-from-quick-tools-to-multi-agent-systems-25a421c78bb6b492.md): Docker · 2026-01-22 · Easy · 6 min read · AI agents, Containers, LLMs
  Containerizing MCP servers addresses three practical problems: language runtime sprawl, secret injection, and N×N client-to-server wiring.
- [Dynamic MCPs with Docker: Stop Hardcoding Your Agents’ World](https://swe.quest/articles/dynamic-mcps-with-docker-stop-hardcoding-your-agents-world-a530a7120388ea63.md): Docker · 2025-11-06 · Medium · 11 min read · AI agents, LLMs, Sandboxing & isolation, Containers, Developer tools
  Docker MCP Gateway now exposes primordial tools (mcp-find, mcp-add) that let agents search a curated catalog of 270+ MCP servers, add them to the live session, and trigger OAuth or elicitation flows, instead of hand-editing JSON config and restarting.
- [Building AI Agents with Docker MCP Toolkit: A Developer’s Real-World Setup](https://swe.quest/articles/building-ai-agents-with-docker-mcp-toolkit-a-developer-s-real-world-setup-988aee07496da75c.md): Docker · 2025-08-19 · Medium · 6 min read · AI agents, Containers, LLMs
  A GitHub repository question-answering agent is built by running the GitHub MCP Gateway (docker/mcp-gateway) as a container under Docker Compose and connecting a Python agent to it over streamable-http via MCPTools.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
