Refer & earn

Refer ZetaBooks — earn ₹1,000 cash when they buy Yearly · T&Cs applySee offer
← All insights

Engineering6 min read

LangGraph agents in production: patterns for Indian engineering teams

Agent frameworks are easy to demo and hard to operate. State graphs, checkpoints, and observability separate pilots from systems SREs will run.

Agents are workflows, not magic

An agent that calls tools — CRM lookup, ticket create, refund eligibility — is a state machine with an LLM router. LangGraph makes that explicit: nodes, edges, human approval gates, and persisted checkpoints when a run spans minutes or days.

Indian product teams often prototype agents in notebooks, then hit walls around idempotency, retries, and "who pays when the graph loops." Treat graphs like any backend service: versioned code, structured logs, and timeouts on every tool call.

Production patterns that survive review

Keep retrieval and action separate. A support agent should fetch policy text via RAG before executing a refund tool — not let the model invent policy from weights. Add human-in-the-loop nodes for irreversible actions above a rupee or permission threshold.

Use checkpointing for long-running flows (loan document collection, onboarding KYC). Persist state so a user can resume on WhatsApp without the graph restarting from zero. Sabrixa uses LangGraph where multi-step custom flows justify the ops overhead — not for simple FAQ bots.

Observability and cost caps

Trace every node: input, output, token usage, tool latency. Alert on cycle detection when routers bounce between nodes. Cap max steps per session to prevent runaway loops from empty tool responses.

Ship a single happy-path graph first — e.g., qualify lead → schedule callback — before building ten tools. Agents earn complexity after retrieval quality and eval metrics are already green.

Ready to apply this?

Talk to Sabrixa about custom AI, or follow ZetaBooks for launch updates.