Skip to content

Docker Agent: Build AI Agents That Talk to Each Other

Read the Portuguese translation →

Author: Better Stack · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Docker Agent: Build AI Agents That Talk to Each Other · Channel: Better Stack · 05:55 · Watch on YouTube

Topics: AI agents, AI developer tools, AI models

Docker Agent is an open-source Docker tool for defining, running, and connecting AI agents with YAML instead of writing framework code. The video explains how agents use models, instructions, tools, and optional sub-agents, and how they can be shared through OCI registries or exposed as HTTP APIs, MCP servers, or A2A servers. A debugging example shows an on-call assistant querying a log analyst without direct access to logs. The video also demonstrates three agents playing Battleship, where Claude Haiku wins a close match against GPT-6 Luna.

  • Agents are described in YAML files that specify a model, instructions, and permitted tools.
  • Docker Agent manages the agent loop: calling the model, running tools, returning results, and repeating until the task is done.
  • Supported model options include OpenAI, Anthropic, Gemini, Open Router, and local models through Docker Model Runner.
  • Agents can use built-in tools, MCP servers, and sub-agents.
  • Agent definitions can be versioned, reviewed in pull requests, and changed by editing configuration.
  • Agents can be distributed through Docker Hub or other OCI registries.
  • A single command can serve an agent as an HTTP API, MCP server, or A2A server.
  • In the debugging demo, an on-call assistant asks a log analyst to inspect logs while remaining without file access itself.
  • In the Battleship demo, Haiku beats Luna in 34 shots with 50% accuracy; the presenter notes the game is not a benchmark.
Start Chapter Summary
00:00 Introducing Docker Agent The video opens with two AI agents playing Battleship and introduces Docker Agent as a YAML-based way to build and run agents that communicate over A2A.
01:06 How Docker Agent works The presenter explains agent configuration, model and tool options, sub-agents, and the benefits of treating agents as configuration, distributing them, and serving them.
02:43 Creating an agent and debugging checkout A minimal YAML agent is launched, followed by a two-agent example where an on-call assistant asks a log analyst to investigate checkout errors.
04:20 A Battleship match between agents Two player agents and a referee play Battleship over A2A, with Haiku narrowly defeating Luna.
05:23 Wrap-up The presenter summarizes Docker Agent’s YAML, registry, and A2A workflow and invites viewers to share their experience.

Docker Agent is an open-source tool from Docker for building and running AI agents. — 00:32

Docker Agent handles the agent loop for you. — 01:06

You can push an agent to Docker Hub or any other OCI registry — 02:12

Any other team’s agent could ask it questions without ever getting access to the logs themselves. — 03:14

You can write agents in YAML, run them with one command, share them through a registry, and connect them over A2A with nothing more than a URL. — 05:23

Docker Agent, A2A, MCP, Docker, Docker Hub, GPT-6 Luna, Claude Haiku 5.5

00:00 This is GPT-6 Luna and Claude Haiku 5.5 playing Battleship and Haiku just won the battle by a single ship. Each model runs as its own AI agent in its own process and they talk to each other over a protocol called A2A. I didn’t write any framework code to set this up. These are just YAML files and a new tool from Docker called Docker Agent. In this video, I’ll explain what Docker Agent is, how it works, and why it’s worth exploring. And then I’ll launch an agent

00:32 from scratch, connect two agents for a real debugging task, and then finish up with a full Battleship match. It’s going to be a lot of fun, so let’s dive into it. So, Docker Agent is an open-source tool from Docker for building and running AI agents. Docker describes it as being to AI agent what Docker run is for containers. You describe an agent in a YAML file with the model it uses, its instructions, and the tools it’s allowed to use. And then you run it with one

01:06 command. And Docker Agent handles the agent loop for you. It calls the model, runs the tools, feeds the results back, and repeats until the job is done. So, this is an example of a complete agent. The model line can point at OpenAI, Anthropic, Gemini, Open Router, or a local model through a Docker model runner. You can also give it some tools, which come from the tool sets section, which covers built-in like file access and shell commands, and any MCP server you want to hook up. And an agent can also have sub-agents, so one coordinator

01:40 can hand work off to specialists. Docker’s own docs actually have a good comparison here. On the left is the Python code you’d normally write to make a model call tools in a loop, and on the right is the same agent written for Docker Agent. And look how much cleaner it is on the right side. And there are also three big things that are really cool about Docker agent. The first is that agents become configuration. You can version them, review them in pull requests, and swap the model by just changing one line. The second is

02:12 distribution. You can push an agent to Docker Hub or any other OCI registry, and anyone can run it with Docker agent run and the image name, the same way you share a container. And third is that agents can run as services. With one command, an agent becomes an HTTP API, an MCP server, or an A2A server that other agents can call. That third one we’re actually going to see in action later in this video. And if you’re on Docker Desktop 4.63 or newer, Docker

02:43 agent is already installed by default. But otherwise, you can install it with Homebrew and symlink it into Docker CLI plugins folder, so it runs as Docker agent. And here’s the smallest agent you can write with a model, a description, and an instruction. And I just have to run Docker agent run agent.yaml, and I get a terminal UI where I can talk to it. And here’s a more realistic example. So, imagine checkout is down and you’re on call. I have two agents in this file,

03:14 and the first one is a log analyst, and it’s the only agent that can read the logs, and it has a read-only file tool locked to the logs folder. And the second one is an on-call assistant, and it has no file access at all. The only thing it knows is the analyst’s URL. In a real company, the platform team would own the log analyst and run it next to logs. Any other team’s agent could ask it questions without ever getting access to the logs themselves. So, in the first

03:45 terminal, I run Docker agent serve A2A, pick the log analyst with the agent flag, and put it on port 8080. In the second terminal, I run the on-call assistant and ask why checkout has been throwing 500 since around 2:00 p.m. And you can see that the question arrive at the analyst. It goes through the app logs and the deploy history and then sends back its findings and the on-call agent turns them into an incident summary. Now, let’s do something more fun with the same pattern. For Battleship, I have three agents. The two

04:20 players, blue and red, and each served over A2A on their own port. And the third agent is a referee that runs the match and I used Kimik3 for it, so neither players’ model is judging its own game. The board runs on a local server. The players listen to ports 8080 and 8081. And then I start the referee. And every turn, a player gets its view of the enemy waters, picks a square, and just for fun adds a line of trash talk. And as you can see here, Haiku gets off

04:50 on a strong start. It finds the carrier early and works straight down the line until it sinks it. But Luna comes back hard and by the end game, both players are down to their last ship. But in the end, Haiku finds the last submarine in row H and wins in 34 shots with 50% accuracy. Luna had sunk all but one of Haiku’s ships at that point, so it was very, very close. But this is just a simple game, so I wouldn’t call it a benchmark. But both models clearly played better than random and Haiku just happened to come out as the winner in

05:23 the end. So there you have it, folks. That is Docker agent in a nutshell. So you can write agents in YAML, run them with one command, share them through a registry, and connect them over A2A with nothing more than a URL. I usually see these code examples on Hugging Face where you have to write so much Python boilerplate code. So I’m super happy that Docker has made this tool that really simplifies the whole process. So, I’m probably going to be using this very often in the future. But, what do you guys think? Have you tried Docker Agent?

05:55 And what has been your experience? Let us know in the comments section down below. And folks, if you like these types of technical breakdowns, please let me know by smashing that like button underneath the video. And also, don’t forget to subscribe to our channel. This has been Andrus from Better Stack, and I will see you in the next videos.