Sign inSign up

teddylee777/langgraph-qna-agent

By teddylee777

Updated over 1 year ago

LangGraph Q&A agent that answers questions about LangChain and LangGraph documentation.

Image
Machine learning & AI
1

10K+

teddylee777/langgraph-qna-agent repository overview

LangGraph Q&A Agent

LangGraph Q&A Agent

Overview

LangGraph Q&A Agent is a ReAct agent built with LangGraph and LangChain that answers questions about LangChain and LangGraph documentation. It leverages the langchain-dev-docs MCP server to access official LangChain AI documentation, TeddyNote wikidocs, tutorials, and more.

This Docker image allows anyone to easily run their own personalized LangChain/LangGraph Q&A agent.

Quick Start

# Create a .env file with your API keys
cat > .env << EOL
ANTHROPIC_API_KEY=your_anthropic_api_key
LANGSMITH_API_KEY=your_langsmith_api_key
EOL

# Run with Docker Compose
docker compose up -d

Docker Compose Configuration

volumes:
    langgraph-data:
        driver: local
services:
    langgraph-redis:
        image: redis:6
        healthcheck:
            test: redis-cli ping
            interval: 5s
            timeout: 1s
            retries: 5
    langgraph-postgres:
        image: postgres:16
        ports:
            - "5433:5432"
        environment:
            POSTGRES_DB: postgres
            POSTGRES_USER: postgres
            POSTGRES_PASSWORD: postgres
        volumes:
            - langgraph-data:/var/lib/postgresql/data
        healthcheck:
            test: pg_isready -U postgres
            start_period: 10s
            timeout: 1s
            retries: 5
            interval: 5s
    langgraph-api:
        image: "teddylee777/langgraph-qna-agent:latest"
        ports:
            - "7777:8000"
        depends_on:
            langgraph-redis:
                condition: service_healthy
            langgraph-postgres:
                condition: service_healthy
        env_file:
            - .env
        environment:
            REDIS_URI: redis://langgraph-redis:6379
            LANGSMITH_API_KEY: ${LANGSMITH_API_KEY}
            POSTGRES_URI: postgres://postgres:postgres@langgraph-postgres:5432/postgres?sslmode=disable

Required Environment Variables

  • ANTHROPIC_API_KEY: Your Anthropic API key (uses Claude Sonnet 3.7 Latest model)
  • LANGSMITH_API_KEY: Your LangSmith API key

API Keys

Using with TeddyFlow.com

This agent can be connected to TeddyFlow.com for a user-friendly chat interface:

  1. Sign up at TeddyFlow.com (use beta key: teddynote-youtube)
  2. Click "New App Connection"
  3. Enter app name and click "Connect"
  4. Select "LangGraph" tab and enter:
    • Endpoint: http://localhost:7777
    • Graph: agent
  5. Click "Save" and then "Connect App"

GitHub Repository

For more detailed instructions and the source code, visit: https://github.com/teddynote-lab/langgraph-qna-agent

License

MIT License

Tag summary

Content type

Image

Digest

sha256:76e8c5371

Size

203.5 MB

Last updated

over 1 year ago

docker pull teddylee777/langgraph-qna-agent