How to Connect Chroma to an AI Agent
Auth setup
1. For local dev: `pip install chromadb` and run `chroma run --path ./data` — no auth by default. 2. For production: set CHROMA_SERVER_AUTHN_PROVIDER=token and CHROMA_SERVER_AUTHN_CREDENTIALS. 3. The `chroma-mcp` package wraps the HTTP client and handles auth via env vars.
Key facts
| Base URL | http://localhost:8000/api/v2/ (default local) or self-hosted URL |
| API version | v2 (REST API as of Chroma 0.5+) |
| Auth | Chroma supports static API token authentication (Authorization header with `Bearer {token}`) and basic auth. Self-hosted deployments can be configured via env vars: `CHROMA_SERVER_AUTHN_CREDENTIALS` and `CHROMA_SERVER_AUTHN_PROVIDER`. Local/dev usage often runs with no auth. |
| Scopes | Tenant/database scoped (Chroma supports multi-tenant isolation at the tenant level). |
| Request body | application/json |
| Pagination | limit / offset parameters on list endpoints. Query results return topK matches directly. |
| Rate limit | No built-in rate limit (self-hosted). Throughput bound by hardware and embedding model latency. |
| Error format | JSON: {"error":"...","type":"..."} — 4xx/5xx HTTP status. |
Key endpoints
| Method | Path | Description |
POST | /api/v2/tenants/{tenant}/databases/{db}/collections | Create a collection |
GET | /api/v2/tenants/{tenant}/databases/{db}/collections | List collections |
POST | /api/v2/collections/{collection_id}/add | Add documents (auto-embeds if embedder configured) |
POST | /api/v2/collections/{collection_id}/query | Vector similarity query with n_results and where filters |
POST | /api/v2/collections/{collection_id}/delete | Delete by IDs or where filter |
Quickstart
POST /api/v2/collections/{collection_id}/query
Content-Type: application/json
{"query_texts":["What is agent-readiness?"],"n_results":3,"include":["documents","metadatas","distances"]}
Response: {"ids":[["doc1","doc7","doc12"]],"distances":[[0.12,0.23,0.31]],"documents":[[...]]}
Agent pitfalls & tips
- Chroma's v2 API changed collection routing — use /tenants/{tenant}/databases/{db}/collections, not the v1 /collections path.
- If you configure an embedding function at collection creation, `add` accepts raw `documents` and Chroma embeds them automatically.
- The `where` filter supports MongoDB-style operators ($and, $or, $in, $ne) for metadata filtering.
- Always include `include: ["documents","metadatas","distances"]` in queries — by default only IDs are returned.
- Collections are eventually consistent after add — for write-then-query flows, allow a short delay or call /flush.
- For agents, chroma-mcp is the recommended interface; it handles collection caching and embedding setup.
Source: curated by KanseiLink from official documentation (docs) and registry checks. Last reviewed: 2026-04-10. Specs change — verify against the official docs before production use.
Frequently Asked Questions
What is Chroma's AEO score?
▼
Chroma has an AEO score of 0.90 and is rated AA (Strong agent support with minor gaps). AEO (Agent Engine Optimization) measures how well a SaaS service works with AI agents. Scores range from 0.00 to 1.00, with grades from AAA (best) to D (not agent-ready).
Is Chroma AI-agent-ready?
▼
Chroma is currently connectable for AI agent use. Third-party MCP integrations are available for this service. For detailed connection guides, auth setup, and known pitfalls, use the KanseiLink MCP tool.
How does Chroma compare to other Database services?
▼
In the Database category, Chroma is rated AA. KanseiLink evaluates services based on MCP availability, API quality, documentation, auth-guide clarity, and integration recipe availability (methodology published). Visit the full rankings at kansei-link.com to see how Chroma compares.
How can I integrate Chroma with an AI agent?
▼
The fastest way to integrate Chroma with an AI agent is through KanseiLink MCP. Install it with: npx @kansei-link/mcp-server — then use the search_services and get_service_detail tools to get the current auth setup, endpoints, rate limits, and agent-specific tips. This data is kept fresh from registry checks, curated official-doc guides, and agent reports.
How do I authenticate with Chroma?
▼
Chroma supports static API token authentication (Authorization header with `Bearer {token}`) and basic auth. Self-hosted deployments can be configured via env vars: `CHROMA_SERVER_AUTHN_CREDENTIALS` and `CHROMA_SERVER_AUTHN_PROVIDER`. Local/dev usage often runs with no auth. Setup: 1. For local dev: `pip install chromadb` and run `chroma run --path ./data` — no auth by default. 2. For production: set CHROMA_SERVER_AUTHN_PROVIDER=token and CHROMA_SERVER_AUTHN_CREDENTIALS. 3. The `chroma-mcp` package wraps the HTTP client and handles auth via env vars.
What are Chroma's API rate limits?
▼
No built-in rate limit (self-hosted). Throughput bound by hardware and embedding model latency.