Blog Post #37: The Self-Improving Agent: Implementing a “Critic” Tool for Self-Correction

No writer publishes their first draft. They write, they pause, and they critique their own work: “Is this sentence clear? Is the tone right? Could this be more persuasive?” This iterative loop of creation and self-criticism is fundamental to producing high-quality work. What if we could teach our AI agents to do the same? So … Read more

Blog Post #35: Graceful Failure: Handling Errors and Exceptions Within Your Agent’s Tools

Your shiny new weather agent, connected to a live API, works perfectly… until it doesn’t. A user asks for the weather in “Narnia.” The external API, quite correctly, returns a 404 Not Found error. Your Python script, not expecting this, throws an unhandled exception, and your entire agent crashes in a blaze of red error … Read more

Blog Post #33: When an Agent Picks the Wrong Tool: A Deep Dive into Tool Routing

Your agent’s toolkit is growing. You’ve equipped it with a super-fast database_search for internal product specifications and a general-purpose web_search for everything else. A user asks, “What are the specs for our new product, the T-800?” The agent, instead of using the cheap, precise database tool, initiates a full web search. It finds the answer, … Read more

Blog Post #32: Advanced Memory Techniques: Summarization, Knowledge Graphs, and Windowed Buffers

In our last post, we cured our agent’s amnesia with ConversationBufferMemory. This was a huge step forward, but it introduced a new problem. Our agent’s memory is now too perfect. It’s like creating a full, unedited transcript of a meeting. For a short meeting, this is fine. For a three-hour meeting, it becomes an unmanageable, … Read more

Blog Post #31: My Agent Has Amnesia! Adding Conversational Memory to Your LangChain Agent

You’ve just built your first agent. You proudly run it and have a great first interaction: You: “My name is Rohan, and I’m interested in local history.” Agent: “Hello Rohan! It’s nice to meet you. Sodepur has a rich history. How can I help?” This is fantastic! You ask a follow-up question: You: “What did … Read more

Blog Post #30: Assembling the Pieces: Building Your First, Simple ReAct Agent in LangChain

Assembling the Pieces Building Your First Simple ReAct Agent in LangChain

For 29 posts, we’ve gathered our tools and learned the theory. We’ve meticulously explored the components of Agentic AI, mastering them one by one. Today, we assemble them. Today, we build our first intelligent agent. This capstone post will guide you through combining everything we’ve learned into a single, functioning application. We will build a … Read more

Blog Post #28: LangChain Primitives: A Guide to Built-in Output Parsers

LangChain Primitives: A Guide to Built-in Output Parsers

We’ve learned how to craft perfect prompts and pipe them into powerful chat models. But the model’s raw output is still just a ChatMessage object—essentially a block of text with a “role.” To build applications that can take programmatic action, we need to convert that text into a reliable, structured format like a JSON object … Read more