Customer support · Production

LangChain rebuilds Chat LangChain with multi-agent architecture, replacing vector embeddings with direct API access

The problem

LangChain's support engineers were not using their own Chat LangChain chatbot because it only searched documentation and could not answer complex debugging questions; engineers instead followed a manual three-step ritual searching docs, the knowledge base, and the codebase.

First attempt

The original Chat LangChain used vector embeddings that chunked documentation into fragments, losing document structure and requiring constant reindexing as docs updated multiple times daily, while producing vague citations users could not verify.

Workflow diagram · grounded in source
1
User submits question
trigger
“When a user sends a message, the LangGraph SDK streams the response as it generates”
2
Route to agent architecture
routing
“we quickly realized we needed to combine two different architectures driven by two broad categories of questions. Most questions could be answered using docs and knowledge base. The remainder would require analysis of foundation of code”
3
Create Agent iterative docs search
ai_action
“The agent searches the docs, checks the knowledge base if needed, refines its query if the results are unclear, and returns an answer. Most documentation questions can be handled with 3-6 tool calls, and Create Agent executes those in se…”
4
Deep Agent subagents parallel search
ai_action
“Each subagent operates independently, asking follow-up questions, filtering through information, and extracting only the most relevant insights before passing them up to a main orchestrator agent”
5
Orchestrator synthesizes findings
ai_action
“The main agent gets clean, curated information that it can synthesize into a comprehensive answer”
6
Middleware production guardrails
validation
“Guardrails filter out off-topic queries so the agent stays focused on LangChain questions. Retry middleware handles temporary API failures gracefully, so users never see cryptic error messages. Fallback middleware switches between Haiku,…”
7
Stream response to user
output
“Users watch the agent think, search docs, check the knowledge base, and build the response token-by-token”
Reported outcome

The rebuilt system delivers sub-15-second responses with precise, verifiable citations for public users, while internal support engineers use the Deep Agent to handle complex tickets, saving hours every week on debugging research.

Reported metrics
Response time for simple queriessub-15-second responses
Engineer time saved per week on complex debugginghours every week
Deep agent response time for complex queries1-3 minutes
Overall improvements since launchdramatic improvements
Reported stack
LangChainLangGraphLangSmithLangGraph SDKLangGraph CloudDeep AgentPylonripgrep
Source
https://blog.langchain.com/rebuilding-chat-langchain/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The rebuilt system delivers sub-15-second responses with precise, verifiable citations for public users, while internal support engineers use the Deep Agent to handle complex tickets, saving hours every week on debugg…

What tools did this team use?

LangChain, LangGraph, LangSmith, LangGraph SDK, LangGraph Cloud, Deep Agent, Pylon, ripgrep.

What results were reported?

Response time for simple queries: sub-15-second responses; Engineer time saved per week on complex debugging: hours every week; Deep agent response time for complex queries: 1-3 minutes; Overall improvements since launch: dramatic improvements (source-reported, not independently verified).

What failed first in this deployment?

The original Chat LangChain used vector embeddings that chunked documentation into fragments, losing document structure and requiring constant reindexing as docs updated multiple times daily, while producing vague cit…

How is this customer support AI workflow structured?

User submits question → Route to agent architecture → Create Agent iterative docs search → Deep Agent subagents parallel search → Orchestrator synthesizes findings → Middleware production guardrails → Stream response to user.