langchain-ai/chat-langchain
langchain-ai/chat-langchain has 6,476 GitHub stars and 1,492 forks. GitHot measured +4 in 7 days. Last checked 2026-11-11 05:33 UTC. Last push 2026-11-08.
This is a documentation assistant agent that helps answer questions about LangChain, LangGraph, and LangSmith. It demonstrates how to build a production-ready agent using:
What you can do
- Documentation Search - Searches official LangChain docs via managed MCP
- Support KB - Searches the Pylon knowledge base for known issues
- Link Validation - Verifies URLs before including in responses
- Guardrails - Filters off-topic queries
Measured star growth
- in 24h
- Update delayed
- in 7 days
- +4
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalChat LangChain
A documentation assistant deployed as a Managed Deep Agent.
Overview
This is a documentation assistant agent that helps answer questions about LangChain, LangGraph, and LangSmith. It demonstrates how to build a production-ready agent using:
- Managed Deep Agents - For managed deployment, identity, and connectors
- LangChain Agents - For agent creation with middleware support
- Guardrails - To keep conversations on-topic
The repo also includes a Next.js frontend in frontend/ for the public chat UI.
Features
- Documentation Search - Searches official LangChain docs via managed MCP
- Support KB - Searches the Pylon knowledge base for known issues
- Link Validation - Verifies URLs before including in responses
- Guardrails - Filters off-topic queries
Quick Start
Prerequisites
- Python 3.11+
- uv (recommended) or pip
Installation
# Clone the repository
git clone https://github.com/langchain-ai/chat-langchain.git
cd chat-langchain
# Install dependencies with uv
uv sync
# Or with pip
pip install -e .
Configuration
# Copy environment template
cp .env.example .env
# Edit .env with your API keys
Required Environment Variables
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key (or use another provider) |
PYLON_API_KEY |
Pylon API key for support KB |
PYLON_KB_ID |
Pylon knowledge base ID for support articles |
PYLON_CACHE_TTL_SECONDS |
Optional. Seconds to cache the Pylon KB article and collection lists (default 900) |
USE_LOCAL_PROMPTS |
Optional. Set to true to use local prompt files instead of pulling Prompt Hub prompts |
Running Locally
Backend
# Build the Managed Deep Agent bundle
uv run mda dev .
# Or with pip
mda dev .
Frontend
cd frontend
npm ci
npm run dev:local
Point the frontend at the local MDA deployment via NEXT_PUBLIC_LANGGRAPH_API_URL
(see frontend/.env.local.example). Signed-in and anonymous users authenticate
with Supabase; MDA validates those tokens and scopes their threads.
Project Structure
├── agent.py # Managed Deep Agent entrypoint
├── identity.py # MDA multi-region Supabase identity contract
├── instructions.md # Managed Deep Agent system prompt
├── tools/
│ └── mcp.py # Managed MCP docs declaration
├── src/
│ ├── agent/
│ │ └── config.py # Model configuration
│ ├── tools/
│ │ ├── pylon_tools.py # Support KB tools
│ │ ├── pricing_tools.py # Pricing fetch
│ │ └── link_check_tools.py # URL validation
│ ├── prompts/
│ │ ├── docs_agent_prompt.py # Hub push / eval mirror of instructions.md
│ │ ├── guardrails_prompts.py
│ │ └── context_summary_prompt.py
│ └── middleware/
│ ├── guardrails_middleware.py
│ ├── ingress_guards_middleware.py
│ └── retry_middleware.py
├── frontend/ # Next.js public chat UI
└── pyproject.toml # Python project config
How It Works
The agent uses a docs-first research strategy:
- Guardrails Check - Validates the query is LangChain-related
- Documentation Search - Searches official docs via the managed MCP connector
- Knowledge Base - Searches Pylon for known issues/solutions
- Link Validation - Verifies any URLs before including them
- Response Generation - Synthesizes a helpful answer
Deployment
Managed Deep Agents
mda deploy .
What MDA owns in this deployment:
- Identity —
identity.pyverifies signed-in and anonymous Supabase access tokens across the configured regions. - HTTP surface — managed agent ingress plus same-origin frontend routes.
- LangSmith browser ops — the frontend server verifies MDA thread access,
then proxies feedback and trace read/share without exposing
LANGSMITH_API_KEY. - Docs MCP —
tools/mcp.pyattaches the LangChain docs MCP tools. - Thread titles — generated in the browser (deterministic truncation).
- Checkpointer — managed by the Managed Deep Agents runtime.
Resources
License
MIT
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,686 starspublic-apis/public-apis
A collective list of free APIs
498,076 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
451,032 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,312 stars