Coalent requires Python 3.10+.
Install the core
pip install coalent
The core has no required dependencies — it runs fully in-memory with a deterministic stub synthesizer, so you can try the whole loop without an API key or any services.
Optional: a model provider
For real, structured understanding you'll use an LLM. Install the provider you use:
pip install "coalent[openai]" # OpenAIProvider
pip install "coalent[anthropic]" # AnthropicProvider
from coalent import SemanticCache, LLMSynthesizer, OpenAIProvider
cache = SemanticCache(my_retriever, LLMSynthesizer(OpenAIProvider())) # reads OPENAI_API_KEY
Any object with a generate(*, model, system, user, max_tokens, temperature) -> str method works — wrapping a local or self-hosted model is a few lines.
Optional: a vector DB
Shipped adapters for the common vector databases — install the client extra you use (version floors, not pins, so your version is fine):
pip install "coalent[qdrant]" # QdrantRetriever
pip install "coalent[chroma]" # ChromaRetriever
pip install "coalent[pgvector]" # PgVectorRetriever
You bring your own client, configured your way — Coalent never constructs or pins it. Using a different store? Extend BaseVectorRetriever or wrap a function with FunctionRetriever — see The Retriever.
Verify
pip show coalent
python -c "from coalent import SemanticCache; print('ok')"
Next
Head to the Quickstart to build your first cache.