[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71370":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":8,"language":10,"languages":8,"totalLinesOfCode":8,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":8,"rankLanguage":8,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":8,"pushedAt":8,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":29,"discoverSource":30},71370,"chat-langchain","langchain-ai\u002Fchat-langchain","langchain-ai",null,"https:\u002F\u002Fchat.langchain.com","TypeScript",6369,1477,49,2,0,4,13,48,12,40.51,"MIT License",false,"master",true,[],"2026-06-12 02:02:51","# Chat LangChain\n\n> A simple documentation assistant built with LangGraph.\n\n[![LangGraph](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuilt%20with-LangGraph-blue)](https:\u002F\u002Flangchain-ai.github.io\u002Flanggraph\u002F)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPython-3.11+-green)](https:\u002F\u002Fpython.org)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow)](LICENSE)\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- **LangGraph** - For agent orchestration and state management\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\u002F` for the public chat UI.\n\n## Features\n\n- **Documentation Search** - Searches official LangChain docs\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:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv) (recommended) or pip\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002Flangchain-ai\u002Fchat-langchain.git\ncd chat-langchain\n\n# Install dependencies with uv\nuv sync\n\n# Or with pip\npip install -e . \"langgraph-cli[inmem]\"\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| `MINTLIFY_API_URL` | Mintlify API base URL for docs search (e.g. `https:\u002F\u002Fapi-dsc.mintlify.com\u002Fv1\u002Fsearch\u002Fdocs.langchain.com`) |\n| `MINTLIFY_API_KEY` | Mintlify API key for docs search |\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# Start LangGraph development server\nuv run langgraph dev\n\n# Or with pip\nlanggraph dev\n```\n\nOpen LangGraph Studio: \u003Chttps:\u002F\u002Fsmith.langchain.com\u002Fstudio\u002F?baseUrl=http:\u002F\u002F127.0.0.1:2024>\n\n#### Frontend\n\n```bash\ncd frontend\nnpm ci\nnpm run dev:local\n```\n\nThe frontend expects the LangGraph server at `http:\u002F\u002F127.0.0.1:2024` by default. If you want trace sharing from the UI, set `LANGSMITH_API_KEY` in `frontend\u002F.env.local`.\n\n## Project Structure\n\n```txt\n├── src\u002F\n│   ├── agent\u002F\n│   │   ├── docs_graph.py      # Main docs agent\n│   │   └── config.py          # Model configuration\n│   ├── tools\u002F\n│   │   ├── docs_tools.py      # Documentation search\n│   │   ├── pylon_tools.py     # Support KB tools\n│   │   └── link_check_tools.py # URL validation\n│   ├── prompts\u002F\n│   │   └── docs_agent_prompt.py\n│   └── middleware\u002F\n│       ├── guardrails_middleware.py\n│       └── retry_middleware.py\n├── frontend\u002F                  # Next.js public chat UI\n├── langgraph.json             # LangGraph configuration\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 Mintlify\n3. **Knowledge Base** - Searches Pylon for known issues\u002Fsolutions\n4. **Link Validation** - Verifies any URLs before including them\n5. **Response Generation** - Synthesizes a helpful answer\n\n## Deployment\n\n### LangGraph Cloud\n\n1. Push to GitHub\n2. Connect repository in [LangSmith](https:\u002F\u002Fsmith.langchain.com\u002F)\n3. Configure environment variables\n4. Deploy\n\n## Resources\n\n- [LangChain Documentation](https:\u002F\u002Fdocs.langchain.com\u002Foss\u002Fpython\u002Flangchain\u002Foverview)\n- [LangGraph Documentation](https:\u002F\u002Fdocs.langchain.com\u002Foss\u002Fpython\u002Flanggraph\u002Foverview)\n- [LangSmith Documentation](https:\u002F\u002Fdocs.langchain.com\u002Flangsmith\u002Fhome)\n\n## License\n\nMIT\n","Chat LangChain 是一个基于LangGraph构建的文档助手，旨在解答关于LangChain、LangGraph和LangSmith的相关问题。该项目利用了LangGraph进行代理编排与状态管理，并通过LangChain Agents创建支持中间件功能的代理，同时使用Guardrails确保对话内容紧扣主题。此外，项目还提供了一个Next.js前端界面以供用户交互。其核心功能包括官方文档搜索、Pylon知识库查询、链接有效性验证以及防止偏离主题的过滤机制。适用于需要快速获取上述技术栈相关信息或技术支持的场景，如开发者社区、在线学习平台等。","2026-06-11 03:37:22","high_star"]