Home/AI Agents/chat-langchain
chat-langchain logo

chat-langchain

Enrichment pending
langchain-ai/chat-langchain

chat-langchain

GraphCanon updated today · GitHub synced today

6.4k
Stars
1.5k
Forks
49
Open issues
48
Watchers
today
Last push
TypeScript MITCreated Jan 16, 2023

Trust & integrity

Full report
Maintenance
Very active (0d since push)
As of today · Source: github_public_v1
Provenance
Not a fork · Organization account
As of today · Source: github_public_v1
Security (OSV)
No lockfile
As of today · Source: none

Public GitHub metadata and optional OSV dependency scans. Signals, not a guarantee. Trust methodology.

Backing

Company and funding context for LangChain. Display-only - not part of trust score or organic ranking.

Company
LangChain·GitHub org profile·today
Funding
$25,000,000 (2024-02)·GraphCanon curated seed (public press)·today
Commercial model
Open core·GraphCanon curated seed·today

Capability facts

Languages
typescript, python

Source: github.language+pyproject.toml · Jul 11, 2026

Categories

Graph entities

Compatibility

Sourced claims from the README excerpt - not unsourced marketing copy.

Anthropic APIAnthropic API

Source: README excerpt (regex_v1, Jul 11, 2026)

| `ANTHROPIC_API_KEY` | Anthropic API key (or use another provider)
Source link
LangChain integrationLangChain

Source: README excerpt (regex_v1, Jul 11, 2026)

# Chat LangChain
Source link
LangGraph integrationLangGraph

Source: README excerpt (regex_v1, Jul 11, 2026)

is a documentation assistant agent that helps answer questions about LangChain, LangGraph, and LangSmith. It demonstrates how to build a production-ready agent using:
Source link
Python runtimePython

Source: README excerpt (regex_v1, Jul 11, 2026)

- Python 3.11+
Source link

Tags

README

Chat 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
  • 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

VariableDescription
ANTHROPIC_API_KEYAnthropic API key (or use another provider)
MINTLIFY_API_URLMintlify API base URL for docs search (e.g. https://api-dsc.mintlify.com/v1/search/docs.langchain.com)
MINTLIFY_API_KEYMintlify API key for docs search
PYLON_API_KEYPylon API key for support KB
PYLON_KB_IDPylon knowledge base ID for support articles
USE_LOCAL_PROMPTSOptional. 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). Auth, guest issuance, and LangSmith operations go through the managed identity and connector surface.

Project Structure

├── agent.py                    # Managed Deep Agent entrypoint
├── identity.py                 # MDA identity contract (Supabase + guest)
├── instructions.md             # Managed Deep Agent system prompt
├── connectors/
│   ├── langsmith.py            # LangSmith feedback + trace connector
│   └── mcp.py                  # Managed MCP connector declaration
├── src/
│   ├── agent/
│   │   ├── docs_graph.py      # Legacy LangGraph agent module retained for now
│   │   └── config.py          # Model configuration
│   ├── tools/
│   │   ├── docs_tools.py      # Documentation search
│   │   ├── pylon_tools.py     # Support KB tools
│   │   └── link_check_tools.py # URL validation
│   ├── prompts/
│   │   └── docs_agent_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:

  1. Guardrails Check - Validates the query is LangChain-related
  2. Documentation Search - Searches official docs via Mintlify
  3. Knowledge Base - Searches Pylon for known is