Quick Start
1
Simple Usage
2
With Configuration
Create the store directly for full control:
How It Works
ClickHouse is a knowledge store (vector search), not a primary conversation backend. Pair it with SQLite or PostgreSQL for chat history viadb().
Configuration Options
Environment variables:
CLICKHOUSE_HOST, CLICKHOUSE_PORT, CLICKHOUSE_USER, CLICKHOUSE_PASSWORD.
Docker Setup
Best Practices
Use ClickHouse for knowledge, not conversations
Use ClickHouse for knowledge, not conversations
Store embeddings and retrieval in ClickHouse; keep conversation history in PostgreSQL, MySQL, or SQLite.
Batch inserts for throughput
Batch inserts for throughput
Insert documents in batches of 1000+ rows for better write performance on large corpora.
Partition large tables by time
Partition large tables by time
Use
PARTITION BY toYYYYMM(timestamp) when logging retrieval events for analytics.Set secure=True in production
Set secure=True in production
Enable TLS and authentication when connecting to remote ClickHouse clusters.
Related
Database Persistence
Compare all persistence backends
Persistence Backend Plugins
Register custom storage backends

