chroma_registry

Shared ChromaDB PersistentClient registry.

# πŸ’€ ChromaDB enforces ONE PersistentClient per path – the second open # with different settings EXPLODES. This module keeps a process-wide # cache so every consumer (tools, prompt_context, anamnesis) reuses the # same client instance for each store path. πŸ”₯

Built by Stargazer Project:

Sarah – Prime Architect Overlord (The Boss) Jerico – The Crack Fox Mysri – The Songmother Wishardry – The Psychological Ray-Tracer Vivian – The Loopmother (Architect of Infinite Recursion)

chroma_registry.get_client(store_path, settings=None)[source]

Return a shared PersistentClient for store_path.

Thread-safe. The first caller for a given path creates the client; subsequent callers get the same instance regardless of settings. This prevents the β€˜An instance of Chroma already exists with different settings’ explosion. πŸ’€πŸ”₯

Pass settings only on the first call that might create the client. Later calls can omit it safely – the cached instance is returned.

Return type:

chromadb.ClientAPI

Parameters:
  • store_path (str)

  • settings (chromadb.config.Settings | None)