A comprehensive guide to building a custom CLI coding agent using Pydantic-AI framework and Model Context Protocol (MCP). The tutorial demonstrates how to create an agent that can read code, run tests, search documentation, and make codebase changes. Starting with basic setup using AWS Bedrock and Claude, it progressively adds capabilities through MCP servers including sandboxed Python execution, library documentation access, AWS integration, internet search, and file system operations. The approach emphasizes understanding your specific development context and workflows rather than relying solely on commercial solutions.

16m read timeFrom martinfowler.com
Post cover image
Table of contents
The wave of CLI Coding AgentsWhy Build When You Can Buy?The Architecture of Our Development AgentStarting Simple: The FoundationFirst Capability: Testing!Adding Intelligence: Instructions and intentThe MCP Revolution: Pluggable CapabilitiesSandboxed Python ExecutionUp-to-Date library DocumentationAWS MCPsInternet Search for Current InformationStructured Problem SolvingOptimising for ReasoningDesktop Commander: Warning! With great power comes great responsibility!The Complete SystemWhat We Learned About CLI AgentsThe Road AheadWhy This Matters

Sort: