Skip to content

Chroma vector store

Chroma is an embedding database that can run as a server or a local persistent client, selected via VECTOR_STORE_PROVIDER=chroma.

Enable it

bash
VECTOR_STORE_PROVIDER=chroma
CHROMA_HOST=localhost
CHROMA_PORT=8000
CHROMA_PERSIST_DIR=./chroma_data

Install the client: pip install chromadb.

Configuration

VariableDefaultDescription
VECTOR_STORE_PROVIDERpgvectorSet to chroma to use this store.
CHROMA_HOST(none)Host of a running Chroma server. When set, an HTTP client is used.
CHROMA_PORT8000Port of the Chroma server.
CHROMA_PERSIST_DIR./chroma_dataLocal path used for a persistent client when CHROMA_HOST is unset.

Notes

  • Unit-tested against a mocked client, not integration-tested against a real Chroma instance. Smoke-test before production use.
  • keyword_search is degraded: Chroma has no BM25/ts_rank, so it falls back to a scoped fetch plus term-overlap scoring. pgvector is the optimal backend for hybrid keyword search.
  • Metadata is scalar-only. Non-scalar payload values (e.g. metadata, related_memory_ids) are JSON-encoded under a _json__ prefix; they round-trip faithfully but are not filterable server-side, unlike pgvector's JSONB.
  • increment_access and partial payload writes are read-modify-write because Chroma's update replaces metadata rather than merging, so concurrent bumps of the same id can lose an increment.
  • list ordering and offset are approximate: with no ORDER BY, rows are fetched and ordered by created_at client-side, so pages beyond the fetch window are approximate.

The memory layer for AI agents.