{"data":{"slug":"langchain-ai-chat-langchain","name":"chat-langchain","tagline":"A documentation assistant demonstrating managed deep agent deployment and LangChain agents.","github_url":"https://github.com/langchain-ai/chat-langchain","owner":"langchain-ai","repo":"chat-langchain","owner_avatar_url":"https://avatars.githubusercontent.com/u/126733545?v=4","primary_language":"TypeScript","stars":6458,"forks":1492,"topics":[],"archived":false,"github_pushed_at":"2026-09-19T15:04:14+00:00","maintenance_label":"Very active","stars_delta_30d":25,"url":"https://www.graphcanon.com/tools/langchain-ai-chat-langchain","markdown_url":"https://www.graphcanon.com/tools/langchain-ai-chat-langchain.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/langchain-ai-chat-langchain","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=langchain-ai-chat-langchain","description":null,"homepage_url":"https://chat.langchain.com","license":"MIT","open_issues":354,"watchers":47,"ai_summary":"The repository contains a chatbot-like documentation assistant that answers queries about LangChain technologies with the help of managed deployment services and middleware support through LangChain Agents, including features such as documentation search, support knowledge base lookup, link validation, and conversation guardrails. It uses TypeScript for its backend alongside Python dependencies and includes a Next.js frontend.","readme_excerpt":"# Chat LangChain\n\n> A documentation assistant deployed as a Managed Deep Agent.\n\n\n\n\n\n## Overview\n\nThis is a documentation assistant agent that helps answer questions about LangChain, LangGraph, and LangSmith. It demonstrates how to build a production-ready agent using:\n\n- **Managed Deep Agents** - For managed deployment, identity, and connectors\n- **LangChain Agents** - For agent creation with middleware support\n- **Guardrails** - To keep conversations on-topic\n\nThe repo also includes a Next.js frontend in `frontend/` for the public chat UI.\n\n## Features\n\n- **Documentation Search** - Searches official LangChain docs via managed MCP\n- **Support KB** - Searches the Pylon knowledge base for known issues\n- **Link Validation** - Verifies URLs before including in responses\n- **Guardrails** - Filters off-topic queries\n\n## Quick Start\n\n### Prerequisites\n\n- Python 3.11+\n- [uv](https://github.com/astral-sh/uv) (recommended) or pip\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/langchain-ai/chat-langchain.git\ncd chat-langchain\n\n# Install dependencies with uv\nuv sync\n\n# Or with pip\npip install -e .\n```\n\n### Configuration\n\n```bash\n# Copy environment template\ncp .env.example .env\n\n# Edit .env with your API keys\n```\n\n#### Required Environment Variables\n\n| Variable            | Description                                                                             |\n| ------------------- | --------------------------------------------------------------------------------------- |\n| `ANTHROPIC_API_KEY` | Anthropic API key (or use another provider)                                             |\n| `PYLON_API_KEY`     | Pylon API key for support KB                                                            |\n| `PYLON_KB_ID`       | Pylon knowledge base ID for support articles                                            |\n| `USE_LOCAL_PROMPTS` | Optional. Set to `true` to use local prompt files instead of pulling Prompt Hub prompts |\n\n### Running Locally\n\n#### Backend\n\n```bash\n# Build the Managed Deep Agent bundle\nuv run mda dev .\n\n# Or with pip\nmda dev .\n```\n\n#### Frontend\n\n```bash\ncd frontend\nnpm ci\nnpm run dev:local\n```\n\nPoint the frontend at the local MDA deployment via `NEXT_PUBLIC_LANGGRAPH_API_URL`\n(see `frontend/.env.local.example`). Auth, guest issuance, and LangSmith\noperations go through the managed identity and connector surface.\n\n## Project Structure\n\n```txt\n├── agent.py                    # Managed Deep Agent entrypoint\n├── identity.py                 # MDA identity contract (Supabase + guest)\n├── instructions.md             # Managed Deep Agent system prompt\n├── connectors/\n│   ├── langsmith.py            # LangSmith feedback + trace connector\n│   └── mcp.py                  # Managed MCP docs connector\n├── src/\n│   ├── agent/\n│   │   └── config.py           # Model configuration\n│   ├── tools/\n│   │   ├── pylon_tools.py      # Support KB tools\n│   │   ├── pricing_tools.py    # Pricing fetch\n│   │   └── link_check_tools.py # URL validation\n│   ├── prompts/\n│   │   ├── docs_agent_prompt.py # Hub push / eval mirror of instructions.md\n│   │   ├── guardrails_prompts.py\n│   │   └── context_summary_prompt.py\n│   └── middleware/\n│       ├── guardrails_middleware.py\n│       ├── ingress_guards_middleware.py\n│       └── retry_middleware.py\n├── frontend/                   # Next.js public chat UI\n└── pyproject.toml              # Python project config\n```\n\n## How It Works\n\nThe agent uses a docs-first research strategy:\n\n1. **Guardrails Check** - Validates the query is LangChain-related\n2. **Documentation Search** - Searches official docs via the managed MCP connector\n3. **Knowledge Base** - Searches Pylon for known issues/solutions\n4. **Link Validation** - Verifies any URLs before including them\n5. **Response Generation** - Synthesizes a helpful answer\n\n## Deployment\n\n### Managed Deep Agents\n\n```bash\nmda deploy .\n```\n\nWhat MDA owns in this deployment:\n\n- **Identity** — `identity.py` verifies Supabase access tokens (","github_created_at":"2023-01-16T20:43:13+00:00","created_at":"2026-07-11T10:49:45.3843+00:00","updated_at":"2026-09-20T05:26:25.889626+00:00","categories":[{"slug":"ai-agents","name":"AI Agents","url":"https://www.graphcanon.com/categories/ai-agents","markdown_url":"https://www.graphcanon.com/categories/ai-agents.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/ai-agents"},{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"}],"tags":[{"slug":"conversation-guardrails","name":"conversation guardrails"},{"slug":"documentation-assistant","name":"documentation assistant"},{"slug":"langchain-agents","name":"langchain agents"},{"slug":"managed-deep-agents","name":"managed deep agents"},{"slug":"next-js-frontend","name":"next.js frontend"},{"slug":"python-dependencies","name":"python-dependencies"},{"slug":"support-knowledge-base","name":"support knowledge base"},{"slug":"typescript-backend","name":"typescript backend"}],"trust":{"provenance":{"is_fork":false,"github_id":589743600,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-20T05:26:23.176Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":0,"days_since_push":0,"last_release_at":null,"stars_delta_30d":25,"open_issues_delta_30d":286},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-11T10:49:47.396Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-20T05:26:24.940Z"},"languages":{"value":["typescript","python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-20T05:26:24.940Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-20T05:26:24.940Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":null,"constraints":null,"when_to_use":["You need a specialized tool for accessing help and information about LangChain technologies, such as LangGraph and LangSmith.","Your project benefits from a production-ready setup with guardrails that prevent the chatbot from providing off-topic or irrelevant answers."],"when_not_to_use":["Your team prefers to use general-purpose AI agents over those specialized for a specific technology stack like LangChain.","You do not require managed deployment services and prefer more control over deployment configurations through traditional methods rather than Managed Deep Agents."],"source":"enrich:decision_facts","observed_at":"2026-07-14T20:41:05.649Z"},"constraint_facets":null,"decision_summary":[{"label":"Adopt for","value":"Chat-langchain is a documentation assistant that leverages managed deep agents and LangChain middleware to provide on-topic responses and support knowledge base queries."}]}}