Latest writings
Notes on AI agents, Salesforce, automation, micro-SaaS, and engineering.
Python for automation and AI work: scripts, APIs, data handling and LLM tooling. Short, runnable examples over theory.

Graph Engineering For AI Agents: My Production Playbook
Model your agent as a graph: an execution graph in LangGraph for control flow and failure paths, and a knowledge graph for memory you can trace, with a runnable example.

Building Long-Term Memory: Setting Up Vector Databases for Semantic Search in LangChain
Split your text, embed it, store it in Chroma and search it by meaning with LangChain. Then add MMR for varied results, a Pinecone option and a small RAG chain.

Unmasking the Black Box: Mastering LangChain Callbacks for Debugging
See inside a LangChain agent with callbacks: print every step, write a custom audit handler, count tokens, avoid async mistakes and send traces to LangSmith. Handlers tested with a fake model.

Best Practices for Deploying LangChain Apps to Production
Serving, streaming, per-user state, caching, tracing, evals, secrets and timeouts: a checklist for moving a LangChain 1.x agent out of the notebook.

Structured JSON Output from LLMs: Schema Injection, Pydantic and Retry Loops
Get reliable JSON from an LLM: put the schema in the prompt, use structured outputs with a Pydantic model, and add a retry loop that sends errors back.

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.

Engineering a Personal Prompt System: Library, Versioning, and Automated Tests
Keep your prompts in a versioned JSON library, run them against fixed test cases with a small Python harness, and grade the output with rule checks or an LLM judge.

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.

Building an Automated AI Daily Brief: My Morning Workflow
Build a Python script that reads your open Notion tasks, asks a model to rank them, and emails you a plain-text brief each morning from a GitHub Actions schedule.

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.

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.
