{"id":2502,"date":"2025-09-18T16:20:46","date_gmt":"2025-09-18T16:20:46","guid":{"rendered":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/09\/18\/build-and-distribute-ai-agents-and-workflows-with-cagent\/"},"modified":"2025-09-18T16:20:46","modified_gmt":"2025-09-18T16:20:46","slug":"build-and-distribute-ai-agents-and-workflows-with-cagent","status":"publish","type":"post","link":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/2025\/09\/18\/build-and-distribute-ai-agents-and-workflows-with-cagent\/","title":{"rendered":"Build and Distribute AI Agents and Workflows with cagent"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/docker\/cagent\" target=\"_blank\">cagent<\/a> is a new open-source project from Docker that makes it simple to build, run, and share AI agents, without writing a single line of code. Instead of writing code and wrangling Python versions and dependencies when creating AI agents, you define your agent\u2019s behavior, tools, and persona in a single YAML file, making it incredibly straightforward to create and share personalized AI assistants.<\/p>\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\">Figure 1: cagent is a powerful, easy to use, customizable multi-agent runtime that orchestrates AI agents with specialized capabilities and tools, and the interactions between agents.<\/p>\n\n<p>cagent can use OCI registries to share and pull agents created by the community, so not only can you elegantly solve the agent creation problem, but also the agent distribution problem.\u00a0<\/p>\n\n<p>Let\u2019s dive into what makes cagent special and explore some real-world use cases.<\/p>\n\n<h2 class=\"wp-block-heading\">What is cagent?<\/h2>\n<p>At its core, <a href=\"https:\/\/docs.docker.com\/ai\/cagent\/\" target=\"_blank\">cagent<\/a> is a command-line utility that runs AI agents defined in cagent.yaml files. The philosophy is simple: <strong>declare what you want your agent to do<\/strong>, and cagent handles the rest.\u00a0<\/p>\n\n<p>There are a few features that you\u2019ll probably like for authoring your agents.\u00a0<\/p>\n<p>Declarative and Simple: Define models, instructions, and agent behavior in one YAML file. This \u201csingle artifact\u201d approach makes agents portable, easy to version, and easy to share.<\/p>\n<p>Flexible Model Support: You\u2019re not tied to a specific provider. You can run remote models or even local ones using Docker Model Runner, ideal for privacy reasons.\u00a0<\/p>\n<p>Powerful Tool Integration: cagent includes built-in tools for common tasks (like shell commands or filesystem access) and supports external tools via MCP, enabling agents to connect to virtually any API.\u00a0<\/p>\n<p>Multi-Agent Systems: You\u2019re also not limited to a single agent. Cagent allows you to define a team of agents that can collaborate and delegate tasks to one another, with each agent having its own specialized skills and tools.\u00a0<\/p>\n<h2 class=\"wp-block-heading\">Practical use cases for agent<\/h2>\n<p>I\u2019ve lived with and used cagent for a few weeks now, and in this article, I want to share two of my practically useful agents that I actually use.\u00a0<\/p>\n\n<h3 class=\"wp-block-heading\"><strong>A GitHub Task Tracker<\/strong><\/h3>\n<p>Let\u2019s start with a practical, developer-centric example. While tracking GitHub issues with AI might not be revolutionary, it\u2019s surprisingly useful and demonstrates cagent\u2019s capabilities in a real-world workflow.\u00a0<\/p>\n\n<p>There\u2019s no shortage of task tracking solutions to integrate with, but one of the most useful for developers is GitHub. We\u2019ll use a repository in GitHub and issues on it as our to-do list. Does it have the best UX? It doesn\u2019t actually matter; we\u2019ll consume and create issues with AI, so the actual underlying UX is irrelevant.\u00a0<\/p>\n\n<p>I have a GitHub repo: <a href=\"http:\/\/github.com\/shelajev\/todo\" target=\"_blank\">github.com\/shelajev\/todo<\/a>, which has issues enabled, and we\u2019d like an agent that can, among other things, create issues, list issues, and close issues.\u00a0<\/p>\n\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\">Figure 2<\/p>\n\n<p>Here\u2019s the YAML for a GitHub-based to-do list agent. The instructions for the agent were generated with the agent new command, and then I refined the instructions it generated by manually asking Gemini to make them shorter.\u00a0<\/p>\n<p>YAML<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\nversion: &#8220;2&#8221;\n<p>models:<br \/>\n  gpt:<br \/>\n    provider: openai<br \/>\n    model: gpt-5<br \/>\n    max_tokens: 64000<\/p>\n<p>agents:<br \/>\n  root:<br \/>\n    model: gpt<br \/>\n    description: &#8220;GitHub Issue Manager &#8211; An agent that connects to GitHub to use a repo as a todo-list&#8221;<br \/>\n    instruction: |<br \/>\n      You are a to-do list agent, and your purpose is to help users manage their tasks in their &#8220;todo&#8221; GitHub repository.<\/p>\n<p>      # Primary Responsibilities<br \/>\n      &#8211; Connect to the user&#8217;s &#8220;todo&#8221; GitHub repository and fetch their to-do items, which are GitHub issues.<br \/>\n      &#8211; Identify and present the to-do items for the current day.<br \/>\n      &#8211; Provide clear summaries of each to-do item, including its priority and any labels.<br \/>\n      &#8211; Help the user organize and prioritize their tasks.<br \/>\n      &#8211; Assist with managing to-do items, for example, by adding comments or marking them as complete.<\/p>\n<p>      # Key Behaviors<br \/>\n      &#8211; Always start by stating the current date to provide context for the day&#8217;s tasks.<br \/>\n      &#8211; Focus on open to-do items.<br \/>\n      &#8211; Use labels such as &#8220;urgent,&#8221; &#8220;high priority,&#8221; etc., to highlight important tasks.<br \/>\n      &#8211; Summarize to-do items with their title, number, and any relevant labels.<br \/>\n      &#8211; Proactively suggest which tasks to tackle first based on their labels and context.<br \/>\n      &#8211; Offer to help with actions like adding notes to or closing tasks.<\/p>\n<p>      # User Interaction Flow<br \/>\n      When the user asks about their to-do list:<br \/>\n      1. List the open items from the &#8220;todo&#8221; repository.<br \/>\n      2. Highlight any urgent or high-priority tasks.<br \/>\n      3. Offer to provide more details on a specific task or to help manage the list.<\/p>\n<p>    add_date: true<br \/>\n    toolsets:<br \/>\n      &#8211; type: mcp<br \/>\n        command: docker<br \/>\n        args: [mcp, gateway, run]<br \/>\n        tools:<br \/>\n          [<br \/>\n            &#8220;get_me&#8221;,<br \/>\n            &#8220;add_issue_comment&#8221;,<br \/>\n            &#8220;create_issue&#8221;,<br \/>\n            &#8220;get_issue&#8221;,<br \/>\n            &#8220;list_issues&#8221;,<br \/>\n            &#8220;search_issues&#8221;,<br \/>\n            &#8220;update_issue&#8221;,<br \/>\n          ]<\/p>\n<\/div>\n<p>It\u2019s a good example of a well-crafted prompt that defines the agent\u2019s persona, responsibilities, and behavior, ensuring it acts predictably and helpfully. The best part is editing and running it is fast and frictionless, just save the YAML and run:\u00a0<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\ncagent run github-todo.yaml\n<\/div>\n<p>This development loop works without any IDE setup. I\u2019ve done several iterations in Vim, all from the same terminal window where I was running the agent.\u00a0<\/p>\n<p>This agent also uses a streamlined tools configuration. A lot of examples show adding MCP servers from the Docker MCP toolkit like this:\u00a0<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\n  toolsets:<br \/>\n      &#8211; type: mcp<br \/>\n        ref: docker:github-official\n<\/div>\n\n<p>This would run the GitHub MCP server from the MCP catalog, but as a separate \u201ctoolkit\u201d from your Docker Desktop\u2019s MCP toolkit setup.<\/p>\n\n<p>Using the manual command to connect to the MCP toolkit makes it easy to use OAuth login support in Docker Desktop.\u00a0<\/p>\n\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\">Figure 3<\/p>\n\n<p>Also, the official GitHub MCP server is awfully verbose. Powerful, but verbose. So, for the issue-related agents, it makes a lot of sense to limit the list of tools exposed to the agent:\u00a0<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n tools:<br \/>\n          [<br \/>\n            &#8220;get_me&#8221;,<br \/>\n            &#8220;add_issue_comment&#8221;,<br \/>\n            &#8220;create_issue&#8221;,<br \/>\n            &#8220;get_issue&#8221;,<br \/>\n            &#8220;list_issues&#8221;,<br \/>\n            &#8220;search_issues&#8221;,<br \/>\n            &#8220;update_issue&#8221;,<br \/>\n          ]\n<\/div>\n\n<p>That list I made with running:\u00a0<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\ndocker mcp tools list | grep &#8220;issue&#8221;\n<\/div>\n<p>And asking AI to format it as an array.\u00a0<\/p>\n\n<p>This todo-agent is available on Docker Hub, so it\u2019s a simple agent pull command away:\u00a0<\/p>\n\n<div class=\"wp-block-syntaxhighlighter-code \">\ncagent run docker.io\/olegselajev241\/github-todo:latest\n<\/div>\n<p>Just enable the GitHub MCP server in the MCP toolkit first, and well, make sure the repo exists.<\/p>\n<h3 class=\"wp-block-heading\"><strong>The Advocu Captains Agent<\/strong><\/h3>\n<p>At Docker, we use <strong>Advocu<\/strong> to track our Docker Captains, ambassadors who create content, speak at conferences, and engage with the community. We use Advocu to track their information details and contributions, such as blog posts, videos, and conference talks about Docker\u2019s technologies.<\/p>\n\n<p>Manually searching through Advocu is time-consuming. For a long time, I wondered: what if we could build an AI assistant to do it for us?\u00a0<\/p>\n\n<p>My first attempt was to build a custom MCP server for our Advocu instance: <a href=\"https:\/\/github.com\/shelajev\/mcp-advocu\" target=\"_blank\">https:\/\/github.com\/shelajev\/mcp-advocu<\/a><\/p>\n\n<p>It\u2019s largely \u201cvibe-coded\u201d, but in a nutshell, running<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\ndocker run -i -rm -e ADVOCU_CLIENT_SECRET=your-secret-here olegselajev241\/mcp-advocu:stdio\n<\/div>\n<p>will run the MCP server with tools that expose information about Docker Captains, allowing MCP clients to search through their submitted activities.\u00a0<\/p>\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\">Figure 4<\/p>\n\n<p>However, sharing the actual agent, and especially the configuration required to run it, was a bit awkward.\u00a0<\/p>\n\n<p>cagent solved this for me in a much neater way. Here is the complete cagent.yaml for my Advocu agent:<\/p>\n\n<p>YAML<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n#!\/usr\/bin\/env cagent run<br \/>\nversion: &#8220;2&#8221;\n<p>agents:<br \/>\n  root:<br \/>\n    model: anthropic\/claude-sonnet-4-0<br \/>\n    description: Agent to help with finding information on Docker Captains and their recent contributions to Docker<br \/>\n    toolsets:<br \/>\n      &#8211; type: mcp<br \/>\n        command: docker<br \/>\n        args:<br \/>\n          &#8211; run<br \/>\n          &#8211; -i<br \/>\n          &#8211; &#8211;rm<br \/>\n          &#8211; &#8211;env-file<br \/>\n          &#8211; .\/.env<br \/>\n          &#8211; olegselajev241\/mcp-advocu:stdio<br \/>\n    instruction: You have access to Advocu &#8211; a platform where Docker Captains log their contributions. You can use tools to query and process that information about captains themselves, and their activities like articles, videos, and conference sessions. You help the user to find relevant information and to connect to the captains by topic expertise, countries, and so on. And to have a hand on the pulse of their contributions, so you can summarize them or answer questions about activities and their content<\/p>\n<\/div>\n<p>With this file, we have a powerful, personalized assistant that can query Captain info, summarize their contributions, and find experts by topic. It\u2019s a perfect example of how cagent can automate a specific internal workflow.<\/p>\n\n<p>Users simply need to create a .env file with the appropriate secret. Even for less technical team members, I can give a shell one-liner to get them set up quickly.\u00a0<\/p>\n\n<p>Now, everyone at Docker can ask questions about Docker captains without pinging the person running the program (hi, Eva!) or digging through giant spreadsheets.\u00a0<\/p>\n\n<div class=\"wp-block-ponyo-image\"><\/div>\n<p class=\"has-sm-font-size\">Figure 5<\/p>\n\n<p>I\u2019m also excited about the upcoming <a href=\"https:\/\/github.com\/docker\/cagent\/blob\/bffc9979029831467af778d5bd2ddfb3cd155326\/pkg\/environment\/1password.go#L17\" target=\"_blank\">cagent 1Password integration<\/a>, which will simplify the setup even more.\u00a0\u00a0<\/p>\n\n<p>All in all, agents are really just a combination of:<\/p>\n<p>A system prompt<\/p>\n<p>An integration with a model (ideally, the most efficient one that gets the job done)<\/p>\n<p>And the right tools via MCP<\/p>\n<p>With cagent, it\u2019s incredibly easy to manage all three in a clean, Docker \u2013 native way.\u00a0<\/p>\n\n<h3 class=\"wp-block-heading\"><strong>Get Started Today!<\/strong><\/h3>\n<p>cagent empowers you to build your own fleet of AI assistants, tailored to your exact needs. <\/p>\n\n<p>It\u2019s a tool designed for developers who want to leverage the power of AI without getting bogged down in complexity.<\/p>\n<p>You can get started right now by heading over to the<a href=\"https:\/\/github.com\/docker\/cagent\" target=\"_blank\"> cagent GitHub repository<\/a>. Download the latest release and start building your first agent in minutes.\u00a0<\/p>\n\n<p>Give the repository a star, try it out, and let us know what amazing agents you build!<\/p>","protected":false},"excerpt":{"rendered":"<p>cagent is a new open-source project from Docker that makes it simple to build, run, and share AI agents, without [&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-2502","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\/2502","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=2502"}],"version-history":[{"count":0,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/posts\/2502\/revisions"}],"wp:attachment":[{"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/media?parent=2502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/categories?post=2502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rssfeedtelegrambot.bnaya.co.il\/index.php\/wp-json\/wp\/v2\/tags?post=2502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}