|
| 1 | +--- |
| 2 | +title: "Lab: Building Agentic Apps with Docker" |
| 3 | +linkTitle: "Lab: Building Agentic Apps" |
| 4 | +description: | |
| 5 | + Build agentic applications with Docker Model Runner, MCP Gateway, and Compose |
| 6 | + in this hands-on interactive lab. |
| 7 | +summary: | |
| 8 | + Hands-on lab: Build agentic apps with Docker Model Runner, MCP Gateway, and |
| 9 | + Compose. Learn about models, tools, and agentic frameworks. |
| 10 | +keywords: AI, Docker, Model Runner, MCP Gateway, agentic apps, lab, labspace |
| 11 | +aliases: |
| 12 | + - /labs/docker-for-ai/agentic-apps/ |
| 13 | +params: |
| 14 | + tags: [ai, labs] |
| 15 | + time: 20 minutes |
| 16 | + resource_links: |
| 17 | + - title: Docker Model Runner docs |
| 18 | + url: /ai/model-runner/ |
| 19 | + - title: Docker MCP Gateway docs |
| 20 | + url: /ai/mcp-gateway/ |
| 21 | + - title: Labspace repository |
| 22 | + url: https://github.com/dockersamples/labspace-agentic-apps-with-docker |
| 23 | +--- |
| 24 | + |
| 25 | +Get up and running with building agentic applications using Compose, Docker |
| 26 | +Model Runner, and the Docker MCP Gateway. This hands-on lab takes you from |
| 27 | +understanding AI models to building complete agentic applications. |
| 28 | + |
| 29 | +## What you'll learn |
| 30 | + |
| 31 | +This lab covers three core areas of agentic application development: |
| 32 | + |
| 33 | +**Models**: What models are, how to interact with them, configuring Docker |
| 34 | +Model Runner in Compose, and writing code that connects to the Model Runner |
| 35 | + |
| 36 | +**Tools**: Understanding tools and how they work, how MCP (Model Context |
| 37 | +Protocol) fits in, configuring the Docker MCP Gateway, and connecting to the |
| 38 | +MCP Gateway in code |
| 39 | + |
| 40 | +**Code**: What agentic frameworks are, defining models and tools in a Compose |
| 41 | +file, and configuring your app to use those models and tools |
| 42 | + |
| 43 | +## Modules |
| 44 | + |
| 45 | +| # | Module | Description | |
| 46 | +|---|--------|-------------| |
| 47 | +| 1 | Introduction | Overview of agentic applications and the Docker AI stack | |
| 48 | +| 2 | Understanding Model Interactions | Learn how to interact with AI models | |
| 49 | +| 3 | The Docker Model Runner | Configure and use Docker Model Runner with Compose | |
| 50 | +| 4 | Understanding Tools and MCP | Deep dive into tools, tool calling, and MCP | |
| 51 | +| 5 | The Docker MCP Gateway | Set up and configure the MCP Gateway | |
| 52 | +| 6 | Putting It All Together | Build a complete agentic application | |
| 53 | +| 7 | Conclusion | Summary and next steps | |
| 54 | + |
| 55 | +## Prerequisites |
| 56 | + |
| 57 | +- Install the latest version of Docker Desktop |
| 58 | +- Enable **Docker Model Runner** by going into Settings in Docker Desktop, choosing AI, then selecting Docker Model Runner |
| 59 | +- Pull the Gemma 3 model before launching by running this command: |
| 60 | + |
| 61 | +```console |
| 62 | +$ docker model pull ai/gemma3 |
| 63 | +``` |
| 64 | + |
| 65 | +## Launch the lab |
| 66 | + |
| 67 | +Start the labspace: |
| 68 | + |
| 69 | +```console |
| 70 | +$ docker compose -f oci://dockersamples/labspace-agentic-apps-with-docker up -d |
| 71 | +``` |
| 72 | + |
| 73 | +Then open your browser to [http://localhost:3030](http://localhost:3030). |
| 74 | + |
| 75 | +> [!NOTE] |
| 76 | +> |
| 77 | +> It may take a little while to start due to the AI model download. |
0 commit comments