Skip to content

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

Docker 12 min read How-to mediumAdept

Build a Recipe AI Agent with Koog and Docker

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.

Related posts

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

  • Building AI agents made easy with Goose and Docker

    Docker mediumAdept

    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.

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

  • How to Build, Run, and Package AI Models Locally with Docker Model Runner

    Docker mediumAdept

    Docker Model Runner, enabled as a beta feature in Docker Desktop 4.40+, pulls GGUF-format LLMs from Docker Hub or Hugging Face and runs them locally via the `docker model` CLI or an OpenAI-compatible HTTP endpoint on localhost. The guide walks through enabling the feature, pulling, tagging and pushing models to a local registry, one-shot and interactive prompts, curl calls to the chat completions API, and packaging your own .gguf file with a license as an OCI artifact. Constraints noted: only GGUF is supported, one model is loaded at a time, and models unload after 5 minutes idle. Compose v2.35+ can declare models as services and inject connection URLs into dependent containers.

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

The quest for software engineering knowledge.

Look:
Layout: