Tools: How To Build a Multi-Agent AI System with Docker Agent (2026)
Source: DigitalOcean
By Ajeet Raina and Anish Singh Walia Docker Agent is an open-source framework from Docker for building and running multi-agent AI systems. It lets developers define teams of AI agents using YAML configuration, with no Python orchestration code required. Each agent can use its own model (cloud APIs like OpenAI and Anthropic, or local models through Docker Model Runner), along with specialized instructions and tools such as filesystem access, web search, and custom MCP integrations. Docker Agent also supports distributing agents as OCI artifacts through Docker Hub, so teams can share and deploy agent configurations instantly. This tutorial walks you through spinning up a DigitalOcean Droplet with Docker Agent pre-installed using the Docker Agent 1-Click App from the DigitalOcean Marketplace. After creating your Droplet, you will build a Bug Investigator: a multi-agent system where specialized agents collaborate to analyze errors, research solutions, fix code, and generate tests. You will also learn how to configure both cloud API and local model inference. Since this 1-Click Droplet is based on a standard Ubuntu 24.04 Droplet, you can follow any DigitalOcean Docker tutorials after you finish this guide. Note: The 1-Click image ships Docker Agent v1.9.10 under its previous name cagent. Starting with Docker Desktop 4.63 and Docker Agent v2. x, the CLI was renamed from cagent to docker agent. All commands in this tutorial use cagent because that is the version pre-installed on the Marketplace image. The concepts, YAML configuration, and multi-agent architecture are identical across both versions. You can access the Docker Agent 1-Click App from the DigitalOcean Marketplace. Traditional AI interactions are simple request-response exchanges: you ask a question, the model answers. Agentic AI workflows are different. An AI agent can take actions autonomously: reading files, searching the web, writing code, and deciding what to do next based on results. Instead of just answering “here is how to fix that bug,” an agent can actually fix it. Multi-agent systems take this further. Rather than one agent trying to do everything, specialized agents collaborate on complex tasks. Think of it like a development team: one person investigates issues, another researches solutions, another writes code, and another tests. Each brings focused expertise, and together they solve problems more effectively than a single generalist would. A multi-agent system (MAS) consists of multiple AI agents working collectively to perform tasks on behalf of a user or another system. MAS is a system of autonomous agents that cooperate and coordinate through structured communication. Docker Agent handles this coordination layer through YAML-defined agent hierarchies. For this tutorial, you will build a multi-agent debugging system with four specialists: The Investigator coordinates everything. It analyzes errors, delegates research, gets fixes written, and validates with tests. Each agent has its own model and toolset defined in YAML, with no orchestration code required. Before starting this tutorial, make sure you have the following: Optional for local model inference: Navigate to the DigitalOcean Marketplace Docker Agent page and click Create Docker Agent Droplet. Start with the $6/month tier (1GB RAM). That is plenty for cloud API agents since the actual AI inference runs on OpenAI or Anthropic servers, not your Droplet. Figure 1: Navigate to the DigitalOcean Marketplace and select the Docker Agent 1-Click App Select a datacenter region closest to your users or your location for reduced latency. Figure 2: Select a datacenter region closest to your location for reduced latency In the Choose an image section, select the Marketplace tab and search for “Docker Agent.” Figure 3: Search for “Docker Agent” in the Marketplace tab Review the Droplet size, add your SSH key, and click Create Droplet. Figure 4: The Docker Agent 1-Click App page with the Create Droplet button Your Docker Agent Droplet is now running. That is the $6/month tier, which works fine for cloud API agents. Figure 5: Your new Docker Agent Droplet with IP address and specifications This opens a browser-based terminal with no SSH key needed. Figure 6: Access the Droplet Console from the Access tab in your Droplet settings If you prefer SSH, you can reset the root password or use your SSH key: Replace YOUR_DROPLET_IP with your Droplet’s actual IP address. Verify that Docker Agent (cagent) is pre-installed: Review the project structure: The repository includes YAML configurations for three model providers: OpenAI, Anthropic, and local (Docker Model Runner). Each configuration defines the same multi-agent architecture, but targets a different inference backend. Set the OpenAI API key: The repository includes cagent-openai.yaml configured for GPT-4o and GPT-4o-mini. Launch the agent: The cagent chat interface opens, ready to use the multi-agent Bug Investigator architecture. You are now in the agent’s interactive chat. Paste the following buggy code into the agent chat: The agent processes this through its multi-agent workflow: Figure 8: The Bug Investigator agent analyzing the ZeroDivisionError Press Ctrl+p to open the command palette. Figure 9: The Docker Agent command palette for additional actions The agent created a tests/ directory with test_calculate_average.py. After processing completes, verify the generated test file: Here is a summary of what happened: Before diving into local model setup, here is how the two approaches compare for the same debugging task: Cloud APIs are fast and support the full multi-agent workflow. Local models keep your code private and cost nothing per request, but require more Droplet resources and run slower on CPU. For faster local inference, GPU Droplets provide significant speedups. Cloud APIs are fast but send your code to external servers. For sensitive codebases or air-gapped environments, local inference keeps everything on your Droplet. Your current Droplet is 1GB RAM. Local models need at least 4GB. For detailed instructions, see How To Resize Droplets. Figure 10: Select the 8GB RAM plan for local model inference Click the row, scroll down, and click Resize Droplet. Figure 11: Confirm the Droplet resize operation Power the Droplet back on and verify the new memory: Docker Model Runner lets you run AI models locally as part of the Docker ecosystem. Install it: Verify the installation by listing available models: Docker Model Runner downloads its runtime on first use. You will see output similar to: The empty model list confirms that Docker Model Runner is installed and running. Next, you will pull a model. Model selection significantly impacts agentic task performance. Based on Docker’s tool-calling evaluation, here is how popular models compare: TCP support is enabled by default for Docker Engine on port 12434. The default cagent-local.yaml may reference a different model. Update it to use the Qwen3 model you pulled: Review the full configuration: The local configuration uses a single root agent (rather than the multi-agent setup used with cloud APIs) because local models on CPU work best with focused, single-agent tasks. Try this JavaScript async bug: The local model correctly identifies the issue: “The function fetchUserData is async, but when they call it, they are not using await. So the code is doing const user = fetchUserData(123); which returns a Promise… Since the Promise has not resolved yet, user is undefined, leading to the error.” Figure 12: Local model correctly diagnosing the missing await keywords The local model’s diagnosis: the error occurs because user.name is accessed before the fetchUserData Promise resolves. The agent suggested these key changes: Cost: $0.00 (local model, no API charges) Note: Local models on CPU work correctly but are slow (roughly two to five minutes per response). For production speed, use GPU Droplets or cloud APIs. For privacy-sensitive tasks where speed is not the top priority, CPU inference is a viable option. Share your agent configuration by publishing it as an OCI artifact: Replace YOUR_DOCKERHUB_USERNAME with your Docker Hub username. Follow the browser-based authentication flow when prompted. Your Bug Investigator Agent is now live on Docker Hub. Anyone with Docker Agent installed can pull and run it: The YAML-based configuration is what makes Docker Agent different from other agent frameworks that require Python or JavaScript orchestration code. Here is the structure of the OpenAI configuration used in this tutorial: Key points in this configuration: The Model Context Protocol (MCP) is a standard for connecting AI models to external tools and data sources. Docker Agent integrates with MCP servers, letting you extend agent capabilities beyond the built-in toolsets. For example, you can add GitHub integration to your bug investigator so it can read issues and create pull requests: Or add a database tool so agents can query logs: The Docker MCP Catalog provides pre-built MCP servers for common integrations including Slack, Jira, and various databases. A multi-agent AI system consists of multiple AI agents working collectively to perform tasks. Each agent has a specialized role and set of tools, and a coordinator (the root agent) delegates work to the right specialist. In Docker Agent, you define this structure in YAML: the root agent receives the task, analyzes it, and routes subtasks to agents like a researcher, fixer, or tester. This is more effective than a single-agent approach for complex tasks because each agent stays focused on what it does best. For internal team tooling and developer workflows, yes. The 1-Click Droplet on DigitalOcean provides a stable, reproducible environment for running agent teams. For customer-facing applications, add rate limiting, error handling, and human review of suggested fixes. The agent occasionally produces incorrect fixes, so treat it as a fast assistant that requires code review rather than a fully autonomous system. Yes. The bug-investigator-agent repository includes cagent-anthropic.yaml pre-configured for Claude models. Set the ANTHROPIC_API_KEY environment variable and run: Docker Agent supports multiple providers, including OpenAI, Anthropic, Google Gemini, and local models through Docker Model Runner. Docker Agent takes a declarative, YAML-first approach. Frameworks like LangGraph, CrewAI, and AutoGen require Python or JavaScript code to define agent workflows. Docker Agent does not need any programming language to define agents, their tools, or their coordination. The tradeoff is flexibility: code-based frameworks offer more control over agent logic, while Docker Agent prioritizes simplicity and portability. If your agents follow standard patterns (delegation, tool use, sub-agent coordination), the YAML approach is faster to set up and easier to share. The costs break down as follows: For teams running many debugging sessions per day, local models on a larger Droplet can be more cost-effective than cloud API charges. For occasional use, the $6/month Droplet with cloud APIs is the most economical option. In this tutorial, you deployed a Docker Agent Droplet on DigitalOcean using the 1-Click Marketplace image, built a multi-agent bug investigator, tested it with real Python and JavaScript bugs, configured local model inference with Docker Model Runner, and published your agent to Docker Hub as a shareable OCI artifact. The multi-agent architecture demonstrated here (investigator, researcher, fixer, and tester) is a pattern you can adapt to many workflows beyond debugging. The same YAML-based configuration works for code review pipelines, documentation generators, security scanners, or any task where specialized agents outperform a single generalist. Docker Agent’s declarative approach to agent configuration means you can version control, share, and iterate on agent designs the same way you manage Docker Compose files or Kubernetes manifests. Combined with DigitalOcean’s Droplet infrastructure, you get a reproducible and portable environment for building agentic AI workflows. After completing this tutorial, consider these extensions: Ready to build your own multi-agent AI system? DigitalOcean Droplets provide a fast, affordable starting point. Deploy the Docker Agent 1-Click App in under five minutes, or explore GPU Droplets for accelerated local inference. Browse the full DigitalOcean Marketplace for more 1-Click Apps that simplify deployment. Create your Docker Agent Droplet now Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases. Learn more about our products Ajeet Singh Raina is a Developer Advocate at Docker, helping developers build confidently from laptop to production. With over a decade of experience in DevOps and developer tooling, he has contributed documentation, applications, and workshops spanning Docker Desktop, Docker Compose, Docker Extensions, MCP, and Docker Agents. I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix This textbox defaults to using Markdown to format your answer. You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link! Please complete your information! Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation. Full documentation for every DigitalOcean product. The Wave has everything you need to know about building a business, from raising funding to marketing your product. Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter. New accounts only. By submitting your email you agree to our Privacy Policy Scale up as you grow — whether you're running one virtual machine or ten thousand. From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.