{"id":2593,"date":"2025-10-14T13:12:49","date_gmt":"2025-10-14T13:12:49","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/10\/14\/build-a-multi-agent-system-in-5-minutes-with-cagent\/"},"modified":"2025-10-14T13:12:49","modified_gmt":"2025-10-14T13:12:49","slug":"build-a-multi-agent-system-in-5-minutes-with-cagent","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/10\/14\/build-a-multi-agent-system-in-5-minutes-with-cagent\/","title":{"rendered":"Build a Multi-Agent System in 5 Minutes with cagent"},"content":{"rendered":"<p>Models are advancing quickly. GPT-5, Claude Sonnet, Gemini. Each release gives us more capabilities. But most real work isn\u2019t solved by a single model.<\/p>\n\n<p><strong>Developers are realizing they need a system of agents:<\/strong> different types of agents working together to accomplish more complex tasks. For example, a researcher to find information, a writer to summarize, a planner to coordinate, and a reviewer to check accuracy.<\/p>\n\n<p>The challenge is that today, <strong>building a multi-agent system is harder than it should be.<\/strong> Context doesn\u2019t flow cleanly between agents. Tools require custom integration. Sharing with a teammate means sending instructions and hoping they can re-create your setup.<\/p>\n<p>That\u2019s the problem <a href=\"https:\/\/github.com\/docker\/cagent\" target=\"_blank\">cagent<\/a> solves.<\/p>\n\n<p>In this blog, we\u2019ll walk you through the basics, how to create a multi-agent AI system in minutes, and how cagent makes this possible.\u00a0<\/p>\n\n<h2 class=\"wp-block-heading\"><strong>What\u2019s a multi-agent system?<\/strong><\/h2>\n\n<p>A <strong>multi-agent system<\/strong> is a coordinated group of AI agents that collaborate to complete complex tasks. Using cagent, you can build and run these systems declaratively, no complex wiring or reconfiguration needed.<\/p>\n\n<h2 class=\"wp-block-heading\"><strong>Meet cagent: The best (and open source) way to build multi-agent systems<\/strong><\/h2>\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\"><strong>Figure 1: cagent workflow for multi-agent orchestration.\u00a0<\/strong><\/p>\n\n<p><strong><a href=\"https:\/\/docs.docker.com\/ai\/cagent\/\" target=\"_blank\">cagent<\/a> is an open-source tool for building agents<\/strong> and a part of Docker\u2019s growing <a href=\"https:\/\/www.docker.com\/solutions\/docker-ai\/\">ecosystem of AI tools<\/a>.\u00a0<\/p>\n\n<p>Instead of writing glue code to wire up models, tools, and workflows, <strong>describe an agent (or a team of agents) in a single YAML file<\/strong>:<\/p>\n<p>Which model the agent uses (OpenAI, Anthropic, Gemini, or a local one)<\/p>\n<p>What its role or instructions are<\/p>\n<p>Which tools it can use (like GitHub, search, or the filesystem)<\/p>\n<p>And, if needed, which sub-agents it delegates to<\/p>\n<p>This turns agents into portable, reproducible artifacts you can run anywhere and share with anyone.\u00a0<\/p>\n\n<h3 class=\"wp-block-heading\"><strong>Multi-agent challenges that cagent is solving<\/strong><\/h3>\n\n<p>Create, run, and share multi-agent AI systems more easily with cagent.<\/p>\n\n<p><strong>Orchestrate agents (and sub-agents) more easily <\/strong>\u2013 Define roles and delegation (sub-agents). cagent manages calls and context.<\/p>\n<p><strong>Let agents use tools with guardrails <\/strong>\u2013 Grant capabilities with MCP: search, GitHub, files, databases. Each agent gets only the tools you list and is auditable.<\/p>\n<p><strong>Use (and swap) models<\/strong> \u2013 OpenAI, Anthropic, Gemini, or local models through <a href=\"https:\/\/www.docker.com\/products\/model-runner\/\">Docker Model Runner<\/a>. Swap providers without rewriting your system.<\/p>\n<p><strong>Treat agents like artifacts <\/strong>\u2013 Package, version, and share agents like containers.<\/p>\n<h2 class=\"wp-block-heading\"><strong>How to build a multi-agent system with Docker cagent<\/strong><\/h2>\n\n<p>Here\u2019s what that looks like in practice.<\/p>\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Define your multi-agent system<\/strong><\/h3>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\nversion: &#8220;2&#8221;\n<p>agents:<br \/>\n  root:<br \/>\n    model: anthropic\/claude-sonnet-4-0<br \/>\n    instruction: |<br \/>\n      Break down a user request.<br \/>\n      Ask the researcher to gather facts, then pass them to the writer.<br \/>\n    sub_agents: [&#8220;researcher&#8221;, &#8220;writer&#8221;]<\/p>\n<p>  researcher:<br \/>\n    model: openai\/gpt-5-mini<br \/>\n    description: Agent to research and gather information.<br \/>\n    instruction: Collect sources and return bullet points with links.<br \/>\n    toolsets:<br \/>\n      &#8211; type: mcp<br \/>\n        ref: docker:duckduckgo<\/p>\n<p>  writer:<br \/>\n    model: dmr\/ai\/qwen3<br \/>\n    description: Agent to summarize notes.<\/p>\n<p>    instruction: Write a concise, clear summary from the researcher\u2019s notes.\n<\/p><\/div>\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Run the YAML file<\/strong><\/h3>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\ncagent run team.yaml\n<\/div>\n<p>The coordinator delegates, the researcher gathers, and the writer drafts. You now have a functioning team of agents.<\/p>\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Share it on Docker Hub<\/strong><\/h3>\n<div class=\"wp-block-syntaxhighlighter-code \">\ncagent push .\/team.yaml org\/research-writer\n<\/div>\n<p>Now, anyone on your team can run the exact same setup with:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\ncagent run docker.io\/org\/research-writer\n<\/div>\n<p>That\u2019s a full multi-agent workflow, built and shared in under 5 minutes.<\/p>\n\n<h3 class=\"wp-block-heading\">First principles: Why cagent works<\/h3>\n\n<p>These principles keep cagent an easy-to-use and customizable multi-agent runtime to orchestrate AI agents.<\/p>\n\n<p><strong>Declarative &gt; imperative.<\/strong> Multi-agent systems are mostly wiring: roles, tools, and topology. YAML keeps that wiring declarative, making it easy to define, read, and review.<\/p>\n<p><strong>Agents as artifacts.<\/strong> Agents become portable artifacts you can pull, pin, and trust.<\/p>\n<p><strong>Small surface area.<\/strong> A thin runtime that does one job well: coordinate agents.<\/p>\n<h2 class=\"wp-block-heading\"><strong>What developers are building with cagent<\/strong><\/h2>\n<p>Developers are already exploring different multi-agent use cases with cagent. Here are some examples:<\/p>\n\n<p><strong>1. PR and issue triaging<\/strong><\/p>\n<p><em>Collector<\/em> reads PRs\/issues, labels, failing checks<\/p>\n<p><em>Writer<\/em> drafts comments or changelogs<\/p>\n<p><em>Coordinator<\/em> enforces rules, routes edge cases<\/p>\n<p><strong>2. Research summarizing<\/strong><\/p>\n<p><em>Researcher<\/em> finds and cites sources<\/p>\n<p><em>Writer<\/em> produces a clean summary<\/p>\n<p><em>Reviewer<\/em> checks for hallucinations and tone<\/p>\n<p><strong>3. Knowledge routing<\/strong><\/p>\n<p><em>Router<\/em> classifies requests<\/p>\n<p><em>KB agent<\/em> queries internal docs<\/p>\n<p><em>Redactor<\/em> strips PII before escalation<\/p>\n<p>Each one starts the same way: a YAML file and an idea. And they can be pushed to a registry and run by anyone.<\/p>\n\n<h3 class=\"wp-block-heading\">Get started<\/h3>\n\n<p>cagent gives you the fastest path forward to build multi-agent systems. It\u2019s <strong>open-source<\/strong>, easy to use, and built for the way developers already work. Define your agents, run them locally, and share them, all in a few lines of YAML.<\/p>\n\n<p><strong>YAML in, agents out.<\/strong><\/p>\n\n<p>Run the following to get started:<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\nbrew install cagent<br \/>\ncagent new<br \/>\ncagent run agent.yaml\n<\/div>\n\n<h3 class=\"wp-block-heading\">Learn more<\/h3>\n\n<p>Get the technical details from our <a href=\"https:\/\/docs.docker.com\/ai\/cagent\/\" target=\"_blank\">cagent documentation<\/a>.\u00a0<\/p>\n<p>We\u2019d love to hear what you think. Join us in the <a href=\"https:\/\/dockercommunity.slack.com\/archives\/C09DASHHRU4\" target=\"_blank\">Docker Community Slack<\/a>.\u00a0<\/p>\n<p>Dive into more topics about <a href=\"https:\/\/www.docker.com\/blog\/tag\/artificial-intelligence-machine-learning\/\">AI and Docker<\/a>.\u00a0<\/p>\n<p>Subscribe to the <a href=\"https:\/\/www.docker.com\/newsletter-subscription\/\">Docker Navigator Newsletter<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Models are advancing quickly. GPT-5, Claude Sonnet, Gemini. Each release gives us more capabilities. But most real work isn\u2019t solved [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-2593","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/2593","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/comments?post=2593"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/2593\/revisions"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=2593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=2593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=2593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}