Skip to content

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

Docker 7 min read How-to mediumAdept

Building AI agents made easy with Goose and Docker

A local, containerized AI agent can be assembled from Goose as the agent, Docker Model Runner serving a Qwen3 30B GGUF model through an OpenAI-compatible endpoint, and Docker MCP Gateway exposing a YouTube transcript tool over SSE, all wired together with Docker Compose. The walkthrough covers the Dockerfile (installing ttyd and Goose, baking in config.yaml and a .goosehints file for business logic), the compose models and services sections, and the Goose provider settings that point at model-runner.docker.internal rather than localhost. An optional cloudflared service exposes the browser-based ttyd session publicly. The setup is modular: models, MCP servers, prompt logic or even the agent framework can be swapped by editing config.

Assumes: Docker ComposeModel Context Protocol basicsOpenAI-compatible APIs

Related posts

  • Building an Easy Private AI Assistant with Goose and Docker Model Runner

    Docker mediumAdept

    Goose, a CLI AI assistant, can run entirely on a local model by pointing its OpenAI provider at Docker Model Runner's OpenAI-compatible endpoint. The steps are: enable Model Runner and host TCP access on port 12434 in Docker Desktop, pull ai/qwen3:30B-A3B-Q4_K_M, then set OPENAI_HOST and OPENAI_BASE_PATH (/engines/llama.cpp/v1/chat/completions) in Goose's config.yaml with the Developer extension enabled. Goose can then be scripted with `goose run -i instructions.md` and scheduled via crontab for recurring automations, with no data leaving the machine.

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

    Docker mediumAdept

    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.

  • 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.

  • How to Make an AI Chatbot from Scratch using Docker Model Runner

    Docker mediumAdept

    A local GenAI chatbot built on Docker Model Runner, which runs llama.cpp models natively on the host and exposes an OpenAI-compatible API to containers. A Go backend uses the OpenAI client to stream tokens over SSE to a React/TypeScript UI. The backend also acts as a metrics bridge, exporting llama.cpp-specific Prometheus gauges such as tokens per second, context size, prompt evaluation time and memory per token, alongside Grafana dashboards and Jaeger tracing. The walkthrough covers pulling Llama 3.2 1B, starting the stack with docker compose, wiring Grafana to Prometheus, and the key code paths.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: