Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 7 min read How-to mediumAdept

Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent

Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider. You point base_url at https://models.github.ai/inference and pass a GitHub personal access token as the API key, so one credential reaches models from OpenAI, Meta, Microsoft, Anthropic and DeepSeek. The walkthrough builds a podcast-generator agent whose root agent delegates to researcher and scriptwriter sub-agents that use DuckDuckGo and filesystem MCP servers through the Docker MCP gateway. The agent is then shared through Docker Hub with cagent push, pull and run.

Assumes: Docker DesktopLLM API basicsModel Context Protocol basics

Related posts

  • Build and Distribute AI Agents and Workflows with cagent

    Docker mediumAdept

    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. Two working agents illustrate it: a GitHub-issues to-do tracker, and an internal assistant that queries Docker Captains' contributions in Advocu through a custom MCP server running in a container. Practical tips include connecting through the Docker MCP gateway to reuse Docker Desktop's OAuth login, and limiting the verbose GitHub MCP server to the issue-related tools the agent needs.

  • Building AI Agents with Docker MCP Toolkit: A Developer’s Real-World Setup

    Docker mediumAdept

    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. The gateway lists files, fetches content and searches code, and GPT-4o reasons over the results. Setup takes a few commands: store a GitHub token with `docker mcp secret set`, run `docker compose up`, then run app.py. The main argument is that containerized MCP connectors keep integration code out of the agent and give consistent environments, and new tools such as Jira or Slack can be added as extra Compose services.

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

    Docker mediumAdept

    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.

  • Beyond the Chatbot: Event-Driven Agents in Action

    Docker mediumAdept

    A GitHub webhook-triggered agent workflow automatically detects "I finished the tutorial" pull requests on Docker's sample repos, generates an encouraging comment, and closes them without any chat interface. It is built with the TypeScript Mastra framework, local Qwen3 (analysis and execution) and Gemma3 (comment generation) models via Docker Model Runner, and the GitHub MCP server exposed through Docker MCP Gateway with tools filtered down to reduce context size, all wired together in Docker Compose. Key lessons: prompt iteration is still hard, small local models are easy to swap and compare via Compose, and deterministic steps like posting a comment and closing a PR are more reliable done programmatically than by an agent.

  • Build a Recipe AI Agent with Koog and Docker

    Docker mediumAdept

    A small Kotlin AI agent built with JetBrains' Koog framework can run entirely on a local model served by Docker Model Runner, wired up through Docker Compose's agentic models feature. Compose injects the model endpoint and name as environment variables, and Koog's OpenAI-compatible client talks to the llama.cpp-based runner using the small Lucy 128k GGUF model, which runs without a GPU. When the model produces an inaccurate ratatouille recipe, the walkthrough fixes it by adding the Docker MCP Gateway over SSE to expose a DuckDuckGo search tool. The Kotlin changes are a Koog MCP tool registry and enabling the Tools capability on the model so it can call functions.

The quest for software engineering knowledge.

Look:
Layout: