Latest writings
Notes on AI agents, Salesforce, automation, micro-SaaS, and engineering.
Building AI agents that do real work: agent loops, tool design, memory, MCP and evaluation. Practical patterns and their trade-offs, with code you can run.

Beyond Built-ins: Architecting Custom Tools in LangChain
Build custom LangChain tools two ways, the @tool decorator and a BaseTool subclass with a Pydantic schema, then handle tool errors so the agent can fix its own mistakes.

Architecting Autonomous Agents: A Builder’s Guide to Complex Workflows
How an AI agent loops through thought, tool call and observation, how to build one with LangChain's create_agent, and the guardrails that stop loops, bad arguments and context overflow.

Building State: A Deep Dive into LangChain Memory for Conversational AI
Add memory to a LangChain chatbot the current way: a checkpointer for chat history, a trimming window, SummarizationMiddleware and the Store API, all tested with a fake model.

Building Robust RAG Pipelines: A Deep Dive into LangChain Document Loaders
Load PDFs, CSVs, web pages and folders into LangChain Documents, keep the metadata you need for citations, and split the text into chunks for a RAG pipeline.

What Is LangChain? When to Use It and When to Write Your Own Code
What LangChain 1.x gives you today (create_agent, middleware, a standard model interface) and a plain framework for deciding between it and your own code.

Building Your First LLM Chain: A Developer's Guide to Sequential Logic
Build a two-step LLM chain in Python with LangChain's pipe syntax: one prompt picks an angle, the next writes the post. Tested with a fake model, no real API key needed.

From Chatbot to Agent: The Engineer's Guide to LLM Memory Systems
How agent memory works, in plain Python: a rolling window for the current chat, a running summary, and a vector store for facts, with recency weighting and a fake-model test.

LangChain vs. LlamaIndex vs. Vanilla: The Builder's Stack Selection Matrix
Pick between LangChain (with LangGraph), LlamaIndex and plain provider SDKs by asking where your app's complexity lives. Includes a three-question flowchart and starter folder layouts.

Building a Deep Research Agent: An End-to-End Walkthrough
Build a Python research agent that plans search queries, pulls sources with Tavily, writes a cited brief as typed JSON and flags any URL it did not find.

The Engineer’s Guide to Debugging AI Agents: From Hallucinations to Reliable Systems
A step-by-step way to debug AI agents: log every step, find which layer failed, fix context overflow, bad tool arguments and loops, then lock the fix in with tests.
SalesforceBeyond Einstein: Building a Custom AI Sales Agent in Salesforce
Call an LLM from a record-triggered Flow with one invocable Apex action: a Named Credential holds the key, an async path makes the callout, and a mock test proves it.

Building an AI Agent That Writes to Notion: Schema Design & API Logic
Design a Notion database an AI agent can write to, then save structured model output as pages with Python, the current Notion API version and data sources.

Stop Overthinking Vector Databases: A Builder’s Decision Framework
Choose a vector database with three questions: is your data relational, who runs the infrastructure, and how many vectors you store. Includes HNSW vs IVF basics and a pgvector setup in Python.

Building Your First RAG Pipeline: A Developer’s Guide to Context-Aware AI
Build a working RAG pipeline in Python: load a PDF, split it into chunks, store embeddings in Chroma, answer from the retrieved text, and measure whether retrieval finds the right chunk.

Create Your First AI Planning Agent in 10 Minutes (n8n Tutorial)
Build an n8n workflow that takes a goal over a webhook, asks OpenAI for a JSON task plan, checks the result in a Code node and returns it, with the exact prompt and settings.

Building AI Agents from Scratch: A Practical Guide
Build an AI agent in plain Python: a tool-calling loop on the Claude API, a custom tool, memory, guardrails, and when LangChain, LangGraph or n8n is the better choice.

How to Build an AI Agent in 10 Minutes (Node.js + Claude)
Build a small AI agent in Node.js with the Claude API: conversation memory, a tool-use loop and proper error handling, matching a runnable GitHub repo.