---
title: "Building AI agents made easy with Goose and Docker"
description: "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."
url: "https://swe.quest/articles/building-ai-agents-made-easy-with-goose-and-docker-05962e3d4c772056"
canonical: "https://www.docker.com/blog/building-ai-agents-with-goose-and-docker/"
source: "Docker"
published: "2025-08-12"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["ai-agents","containers","llms","inference"]
---

# Building AI agents made easy with Goose and Docker

A post on [Docker](https://swe.quest/sources/docker.md), published 2025-08-12, 7 min read, How-to. Original: [https://www.docker.com/blog/building-ai-agents-with-goose-and-docker/](https://www.docker.com/blog/building-ai-agents-with-goose-and-docker/)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)

## Prerequisites

- Docker Compose ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- Model Context Protocol basics
- OpenAI-compatible APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))

## Keywords

Goose, Docker Model Runner, Docker MCP Gateway, MCP, ttyd, Cloudflare Tunnel, Qwen3, Docker Compose

## Related posts

- [Building an Easy Private AI Assistant with Goose and Docker Model Runner](https://swe.quest/articles/building-an-easy-private-ai-assistant-with-goose-and-docker-model-runner-6cdc8d1a08ce794b.md): Docker · 2025-06-27 · Medium · 4 min read · AI agents, LLMs, Inference & serving, Developer tools
  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.
- [Breaking Free From AI Vendor Lock-in: Integrating GitHub Models with Docker cagent](https://swe.quest/articles/breaking-free-from-ai-vendor-lock-in-integrating-github-models-with-docker-8fc971be1201fa24.md): Docker · 2025-12-11 · Medium · 7 min read · AI agents, LLMs, Containers
  Docker cagent, an open-source multi-agent runtime driven by declarative YAML, can use GitHub Models as a custom OpenAI-compatible provider.
- [Build a Recipe AI Agent with Koog and Docker](https://swe.quest/articles/build-a-recipe-ai-agent-with-koog-and-docker-5af82c75d41ec7f4.md): Docker · 2025-08-08 · Medium · 12 min read · AI agents, Java & JVM, Containers, LLMs
  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.
- [How to Make an AI Chatbot from Scratch using Docker Model Runner](https://swe.quest/articles/how-to-make-an-ai-chatbot-from-scratch-using-docker-model-runner-48eab58e2814218f.md): Docker · 2025-06-03 · Medium · 17 min read · Inference & serving, Observability, LLMs, Go, Containers
  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.
- [Building AI Agents with Docker MCP Toolkit: A Developer’s Real-World Setup](https://swe.quest/articles/building-ai-agents-with-docker-mcp-toolkit-a-developer-s-real-world-setup-988aee07496da75c.md): Docker · 2025-08-19 · Medium · 6 min read · AI agents, Containers, LLMs
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
