Developer builds local AI agent to diagnose Docker containers using plain English queries
A software developer has created an AI agent that automates Docker container troubleshooting by accepting plain-English questions such as 'why did the nginx container stop?' instead of requiring manual command-line investigation. The system combines three components: a FastMCP server that exposes specific Docker operations as callable tools, a locally running Gemma3 language model via Ollama, and a LangChain orchestration layer that manages the reasoning loop. Running entirely on-device via Ollama means sensitive container log data never leaves the user's machine, addressing a key privacy concern in production environments. Each tool in the MCP server is intentionally narrow in scope — for example, fetching logs only by container name — so the language model makes more reliable, unambiguous decisions rather than constructing arbitrary shell commands. The developer shared the project as a practical guide for others building similar LLM-powered DevOps automation tools, including bugs encountered during development.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in