ai-agents

Guides to building AI agents in Python that can reason, use tools, and complete tasks.

Build an MCP Server in Python (FastMCP, Step by Step)

Write a useful function once and every AI assistant should be able to call it: Claude Desktop, your editor, your own agent loop. That is exactly what you get when you build MCP server tooling around code you already trust. In this workshop we wrap the access-log parser and the bookmark Application Programming Interface (API) from earlier posts into one FastMCP server with three tools, a resource, and a prompt, all offline. “Write the tool once, then let every assistant ... Read More

Model Context Protocol (MCP): Connect Your AI to Anything

The Model Context Protocol is a single, open way for an AI app to talk to outside tools, files, and data, so you stop writing custom glue for every new integration. Think of it like the USB port on your laptop. Before USB, every device had its own weird plug. After USB, one shape fits the mouse, the drive, the keyboard. MCP does the same thing for AI: one protocol, and any tool that speaks it plugs straight in. You ... Read More

AI Agent Evaluation: Trajectories, Tool Errors, Success

In the LangChain State of AI Agents survey of 1,340 practitioners, quality beat cost and safety as the number one obstacle to shipping agents. AI agent evaluation is how you find out whether the agent you built in posts 225 and 234 actually finishes tasks or just looks busy calling tools. And agent evals are not chat evals: you grade a whole trajectory of tool calls, not one message. Two agents can land on the same reply while one took ... Read More