LangSight uses a dual-storage architecture by default: PostgreSQL for metadata and ClickHouse for analytics. Both run viaDocumentation Index
Fetch the complete documentation index at: https://docs.langsight.dev/llms.txt
Use this file to discover all available pages before exploring further.
docker compose up -d.
Note: SQLite mode (mode: sqlite) remains available for local development and evaluation but is not supported for production. It is not recommended for multi-user deployments — usedualmode with Docker Compose for any shared or persistent installation.
Dual (default — production topology)
Routes each operation to the right backend automatically:- PostgreSQL (metadata): users, projects, API keys, model pricing, SLOs, invite tokens, alert config, audit logs
- ClickHouse (analytics): spans, traces, health results, reliability stats, costs, sessions
PostgreSQL only
Metadata operations only — no span analytics, nolangsight costs, no session tracing.
ClickHouse only
Analytics operations only — no user management, no RBAC, no API keys in DB.Migration path
Database migrations (PostgreSQL)
LangSight uses Alembic for schema migrations. When using PostgreSQL, run migrations after each update:| Revision | Description |
|---|---|
5a5d53a4c81a | Initial schema — api_keys, health_results, schema_snapshots, agent_slos |
e368ec31ce04 | Users and invite_tokens |
dc0bf058f21c | Projects and project_members |
0eaccc40f932 | model_pricing with seed data |
v0.7.0 schema changes (auto-applied on restart)
The following changes apply when upgrading to v0.7.0. No manual migration step is required — they are applied automatically when the API container starts.PostgreSQL
| Table | Change |
|---|---|
health_results | project_id column added via ALTER TABLE ... ADD COLUMN IF NOT EXISTS — no data loss, new rows tagged with project context |
audit_logs | project_id column added via ALTER TABLE ... ADD COLUMN IF NOT EXISTS — existing rows retain NULL for this column |
IF NOT EXISTS — safe to apply on a running instance and idempotent on repeated restarts.
ClickHouse
| Object | Change |
|---|---|
mv_agent_sessions | Materialized view rebuilt with project_id — the view is DROPped and re-created on startup, then backfilled from mcp_tool_calls. No span data is lost; the source table is unchanged. |
The
mv_agent_sessions rebuild may take a few seconds on large datasets while the backfill from mcp_tool_calls runs. The API is available immediately; sessions data returns to normal once the backfill completes.