Designing Reliable Agent Workflows

Hi there! In this post, I’ll show you how to design reliable workflows that improve agent performance. We’ll cover how to fix vague roles, enforce strict inputs/outputs, and manage state explicitly. Why agents fail Most failures come from design, not intelligence. Vague roles confuse agents. If one agent has to plan, do the work, and judge the result, it often loses focus and goes off track. Loose inputs and outputs hide problems. Free-form text makes it easy to sound right while being wrong. Missing state causes loops. If the system doesn’t track what ran and what failed, it repeats the same mistakes. No guardrails means risky actions slip through. With unchecked access, one bad step can cause real damage fast. Weak error handling makes failures messy. Blind retries and late escalation lead to quiet breakage or endless retries. When do you need this? Not every task needs three agents and a state machine. If you just need to “summarize this text” or “write a haiku,” a single prompt is fine. ...

MCP Explained: How AI Tools and Agents Work Together

What is MCP? MCP stands for Model Context Protocol. It’s a new open standard that enables AI agents to talk to tools and APIs and share information securely, in real time. Think of it like this: LLM + Tools = Agent. MCP is what makes that “+ Tools” part easier, flexible, and secure. Think of MCP Like a USB-C Cable Let’s break it down with a simple analogy: You have a laptop (Agent) and a smartphone (Data Source). You want to transfer photos from your phone to your laptop. So, you use a USB-C cable (MCP) to connect them. The cable doesn’t care what brand your devices are as long as they speak the same protocol, they can share data seamlessly. Now imagine the same idea, but with AI tools: ...

Build Lightweight MCP Servers Easily with FastMCP

Hi there! In this post, I’ll show you how to create MCP servers easily with FastMCP. To know the basics of MCP, you can read my previous post here. What is FastMCP? FastMCP is a new open-source library that makes it easy to create MCP servers. It’s built on top of the FastAPI framework and uses the latest version of the MCP protocol. How to install FastMCP? pip install fastmcp How to create an MCP server with FastMCP? Creating an MCP server with FastMCP is straightforward. Let’s build a simple example that exposes a file system tool and a resource. ...