DEV Community
Follow
Building a Local-First Agent Platform with Strands, Ollama, and an MCP Gateway
This project addresses the challenge of evolving single-model, single-prompt agent applications into scalable platforms with multiple domains and independent tools. The goal was to build a local-first application where an agent can seamlessly use travel, finance, and entertainment capabilities without knowing their implementation details. The architecture relies on Strands Agents for orchestration, Ollama for local language models, and the Model Context Protocol (MCP) for tool contracts. A key design choice is the MCP gateway, which acts as a single endpoint for the agent while composing several focused domain servers behind it. This design resolves issues like tight coupling, unclear tool ownership, difficult independent deployment, and inspectability found in traditional agent architectures. The system separates agent behavior from domain tools, making agent profiles config-driven and easily extensible. Each domain server manages only its specific tools, maintaining clear boundaries and enabling independent development and deployment. The gateway provides crucial health visibility, offering an operational view of downstream services. A local model approach with Ollama facilitates cheaper experimentation and independent development loops. The summary concludes that agent architecture fundamentally revolves around establishing clean boundaries.