Skip to main content

Posts

Showing posts with the label AI Agents

Getting Started with Claude Code CLI: Setup & Multi-Agent Workflows

  You installed the Claude Code CLI, authenticated with your API key, and successfully ran a simple prompt. It works great for one-off refactoring tasks or explaining a regex string. But when you attempt to implement the much-hyped "Claude Squad"—a workflow involving multiple specialized agents (Architect, Reviewer, Coder)—the documentation evaporates. Most developers hit a wall here. They try to stuff multiple personas into a single system prompt, leading to context drift and degraded code quality. Or, they manually copy-paste outputs between terminal windows, defeating the purpose of automation. This guide provides a rigorous, programmatic approach to setting up a multi-agent orchestration layer on top of the Claude CLI (via the SDK). We will move beyond basic chat loops to build a deterministic "Squad" pipeline. The Root Cause: Why Single-Session Agents Fail The struggle to configure multi-agent workflows usually stems from a misunderstanding of  Context Window T...

How to Build a Custom MCP Server with Python and FastMCP

  Connecting Large Language Models (LLMs) to your internal data—whether it's a local SQLite database, a legacy CRM, or a private microservice—is the next frontier in AI engineering. The Model Context Protocol (MCP) by Anthropic has emerged as the standard for this connectivity. However, many developers hit a wall immediately after reading the spec. While the concept is elegant, the implementation detail—managing a stateless JSON-RPC 2.0 connection over standard input/output (stdio)—is tedious. It requires handling message correlation, error serialization, and strict buffer management. If you are writing raw JSON-RPC handlers to connect an AI agent to your database, you are wasting time on plumbing. This guide details how to bypass the protocol complexity using  FastMCP , a Pythonic framework that treats MCP servers like FastAPI applications. We will build a production-ready server that grants an AI agent safe, structured access to a local order database. The Root Cause: Why Ra...