Skip to main content

Requirements

Install LangChat

uv is a fast Python package manager that replaces pip and venv.

Virtual environment

Environment variables

Create a .env file in your project root. All providers read credentials automatically — you never pass keys directly in code.
.env
Load .env in your script with one line:
Or use python-dotenv:
Add .env to your .gitignore. Never commit API keys.

Pinecone setup

You need a Pinecone index before LangChat can store or retrieve documents.
  1. Sign up at pinecone.io
  2. Create a Serverless index with these settings:
    • Dimensions: 3072 for text-embedding-3-large (default) or 1536 for text-embedding-3-small
    • Metric: cosine
  3. Add PINECONE_API_KEY to your .env

Supabase setup

LangChat creates its tables automatically — you just need a project.
  1. Create a project at supabase.com
  2. Copy Project URL and anon key (or service_role key for server-side usage)
  3. Add SUPABASE_URL and SUPABASE_KEY to your .env
On first run, LangChat creates:
  • chat_history — stores conversation messages
  • request_metrics — stores latency and error data

Verify installation

Next steps