
Ranjan Kumar
AI & ML Engineer · Author · Educator
I help AI builders design, build, and ship production-grade AI systems that actually work, cost-effectively, through hands-on writing, books, and practical engineering guidance.
Latest Posts
View all →A2A, MCP, or Subgraph? 'Deployed Separately' Is the Wrong Reason
The usual A2A rule feeds its own output back in as its input. The Federation Test asks who owns the other side first, and a CI check over the compiled graph catches the mistake in both directions.
ai-engineeringA2A Saga Compensation: Your Undo Outlives Its Authority
Across an owner line, an undo is a new task the partner may refuse, sent long after the authority that took the step has expired or been revoked. It needs authority of its own, and only the owner that took the step may send it.
ai-engineeringA2A Idempotency: Your Retry Key Lives in Partner Memory
A resend under the same messageId is safe only while the partner reads the key and still remembers it. The duplicate it lets through leaves your own ledger clean, and nothing you read back from the partner except its task list shows it.
ai-engineeringLangGraph interrupt() Re-Sends Your A2A Task on Resume
LangGraph re-runs an interrupted node on resume, and every standard fix assumes the side effect is yours. At an A2A seam the partner's question is the reply to your send, so the fix is a record of the partner's task, and where you keep it decides who can read it.
My Books

Federated AI Agents
LangGraph and A2A for Agents You Don't Own: Build, Secure, and Operate the Seams Between Teams and Companies
A production guide to the A2A (Agent2Agent) protocol and LangGraph for AI agents that different teams and companies own.

Right-Sized AI
Small Language Models in Production: Adapt, Compress, and Deploy SLMs from Server to Edge Device
Start from the constraint, pick the smallest model that can plausibly do the job, and use training and systems engineering to close the rest of the gap.

Harness Engineering for Production AI Systems
Sensors, Gates, and Bounds for LLM Applications That Have to Work When the Model Doesn’t
Build the control layer around your LLM application: sensors that observe, comparators that check, gates that decide, and bounds that cap.

The 7 GenAI Architectures
A Field Guide to Choosing the Right AI System — Before You Overbuild It
The seven architectures GenAI systems actually get built on, and how to pick the smallest one that solves your problem.

The ChatML (Chat Markup Language) Handbook
A Developer’s Guide to Structured Prompting and LLM Conversations
Learn how to structure prompts using ChatML for predictable, production-ready LLM behavior.

Building Real-World Agentic AI Systems with LangGraph
Designing, building, evaluating, and shipping stateful, durable, multi-agent systems on LangGraph 1.x
A practitioner's guide to designing, deploying, and operating reliable agentic AI systems in the real world.

The Chat Templates Handbook
A Developer’s Guide to Jinja, apply_chat_template, and Rendering Model-Ready Prompts
How the Jinja chat template inside every model's tokenizer turns messages into tokens, and how to render it correctly across Transformers, vLLM, SGLang, and llama.cpp - with Template Studio, a toolkit to lint, render, diff, and test templates.
My Toolkit
A collection of tools I've built to boost productivity and simplify workflows.
Developer & AI Tools
Test Your Knowledge
Quiz yourself on AI engineering, observability, and production LLM systems
AIoTian
Track BLE-tagged assets across zones, with live gateway sightings and alerts

Imagelly
AI-Based SaaS Image Edit/Enhancement Tool
Mermaid Studio: Mermaid Diagram Editor
Create flowcharts, sequence diagrams, and more, in code or on a visual canvas
MermAniSt — Mermaid Animation Studio
Turn Mermaid diagrams into animated presentations
LinkedIn Text Formatter
Format your LinkedIn posts with bold, italic, and more
MarkMelon: Markdown Editor
Edit, generate docs from Markdown and more
Slides Creator from Markdown
Generate beautiful presentations from Markdown
What I Write About
AI & ML Engineering
Production-ready AI systems, LLMs, and machine learning deployment strategies.
System Design
Scalable architectures, distributed systems, and infrastructure for AI applications.
Real-World Projects
Case studies, lessons learned, and practical insights from production deployments.
Past the Demo
One email a week on AI systems that hold up in production: the week's articles, plus one failure mode worth your ten minutes. Under five minutes to read.