> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Query and manage Chroma collections from Guild agents

> Give Guild agents governed access to Chroma. Create tenants, databases, and collections, run vector search, and monitor service health.

Integrations · Chroma

Guild agents create and query Chroma collections, run vector search, and monitor service health without handling credentials in code. Guild stores the API key server-side and injects it through its credential proxy, so the key never appears in agent code. Credential policies let you restrict which operations each agent can call before any request reaches Chroma.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Chroma.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Chroma to your first agent.

## What the Chroma integration exposes

The integration provides tools that cover tenants, databases, and collections: creating, retrieving, updating, and deleting each resource. Record tools support add, update, upsert, delete, get, and query operations, with dense, sparse, or hybrid vector search and metadata filtering. Additional tools return indexing status, service health, pre-flight readiness, and the current user identity. Functions can be attached to or detached from collections.

## How it works

**1. Open credentials and connect Chroma**

In Guild, go to Access & setup > Credentials, click Connect, and select chroma. See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped options.

**2. Paste your Chroma API key**

Enter the key in the API Key field. Guild sends it as the header x-chroma-token on every request, server-side.

**3. Import and use ChromaTools**

Import ChromaTools from the `guildai~chroma` package and spread it into your agent's tools object. Use pick() from the [SDK tools](https://docs.guild.ai/sdk/tools.md) to include only the tools your agent needs.

## Why Chroma access needs governing

Chroma operations range from read-only health checks to destructive deletes of databases and tenants. Guild's credential proxy enforces credential policies before any request leaves Guild: you write ALLOW and DENY rules scoped to specific operations, agents, or workspaces, and the proxy blocks anything not explicitly permitted. Because the API key is injected server-side, agents cannot extract it or bypass the policy check.

Credentials can be scoped to an account, a single workspace, a member, or one installed agent, so each agent resolves exactly the key you intend. Deleting the default allow-all policy switches the posture to deny-by-default. Compared with embedding a key in agent code and relying on the agent to self-limit, server-side enforcement via [credential policies](https://docs.guild.ai/platform/credential-policies.md) keeps control with the platform, not the model.

## About the Chroma integration

This integration lets agents create and manage Chroma tenants, databases, and collections. Agents can add, update, delete, and query records using dense, sparse, or hybrid vector search with metadata filtering. It also supports attaching functions to collections and monitoring service health and indexing status. The integration is `guildai~chroma`.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `x-chroma-token: <key>`

### Setup

**1. Connect Chroma**

In Guild, go to **Access & setup > Credentials**, click **Connect**, select **chroma**, and paste the key into **API Key**.

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { ChromaTools } from "@guildai-services/guildai~chroma"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt: "You work with Chroma.",
  tools: { ...ChromaTools },
})
```

### Selecting specific tools

Tools are named with the `chroma_` prefix. Use [`pick()`](https://docs.guild.ai/sdk/tools#selecting-specific-tools) to include only what your agent needs.

## Tools

Tools in the latest published version of `guildai~chroma`:

> [accordion] All 31 tools
>
> | Tool | What it does |
> | - | - |
> | `chroma_attach_function` | Attaches a function to a collection. |
> | `chroma_collection_add` | Adds records to a collection. |
> | `chroma_collection_count` | Returns the number of records in a collection. |
> | `chroma_collection_delete` | Deletes records in a collection. |
> | `chroma_collection_get` | Returns records from a collection by ID or metadata filter. |
> | `chroma_collection_query` | Queries a collection using dense vector search with metadata and full-text search filtering. |
> | `chroma_collection_search` | Searches records from a collection with dense, sparse, or hybrid vector search. |
> | `chroma_collection_update` | Updates records in a collection by ID. |
> | `chroma_collection_upsert` | Upserts records in a collection (create if not exists, otherwise update). |
> | `chroma_count_collections` | Returns the total number of collections in a database. |
> | `chroma_create_collection` | Creates a new collection in a database. |
> | `chroma_create_database` | Creates a new database for a tenant. |
> | `chroma_create_tenant` | Creates a new tenant. |
> | `chroma_delete_collection` | Deletes a collection in a database. |
> | `chroma_delete_database` | Deletes a database by name. |
> | `chroma_detach_function` | Detaches a function from a collection. |
> | `chroma_fork_collection` | Creates a fork of an existing collection. |
> | `chroma_get_attached_function` | Returns an attached function by name. |
> | `chroma_get_collection` | Returns a collection by ID or name. |
> | `chroma_get_collection_by_crn` | Returns a collection by Chroma Resource Name. |
> | `chroma_get_database` | Returns a database by name. |
> | `chroma_get_tenant` | Returns an existing tenant by name. |
> | `chroma_get_user_identity` | Returns the current user's identity, tenant, and databases. |
> | `chroma_healthcheck` | Returns the health status of the service. |
> | `chroma_heartbeat` | Returns a nanosecond timestamp of the current time. |
> | `chroma_indexing_status` | Returns the indexing status of a collection. |
> | `chroma_list_collections` | Lists all collections in a database. |
> | `chroma_list_databases` | Lists all databases for a tenant. |
> | `chroma_pre_flight_checks` | Returns basic readiness information. |
> | `chroma_update_collection` | Updates an existing collection's name or metadata. |
> | `chroma_update_tenant` | Updates an existing tenant by name. |

## Frequently asked questions

> [accordion] Can an agent run hybrid vector search on a Chroma collection?
>
> Yes. The chroma\_collection\_search tool searches records using dense, sparse, or hybrid vector search with metadata filtering. The chroma\_collection\_query tool runs dense vector search with metadata and full-text search filtering.

> [accordion] Can I limit an agent to read-only Chroma operations?
>
> Yes. Write DENY rules in a [credential policy](https://docs.guild.ai/platform/credential-policies.md) targeting operations such as chroma\_collection\_delete, chroma\_delete\_database, and chroma\_delete\_collection, then add a catch-all ALLOW rule. The proxy enforces the rules before any request reaches Chroma.

> [accordion] Does the Chroma integration support webhook events?
>
> No. The catalog entry for `guildai~chroma` lists no webhook events, so event-triggered runs from Chroma are not available.

> [accordion] Can I give one agent a different Chroma key than the rest of my workspace?
>
> Yes. Connect a dedicated credential from the installed agent's detail page. Guild uses that key for that agent ahead of any workspace or account credential, following the resolution order described in [Credentials](https://docs.guild.ai/platform/credentials.md).

## Put a governed agent on Chroma this week

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Chroma.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Chroma to your first agent.

## Related

**Also runs on Guild:** [Airtable](https://docs.guild.ai/integrations/airtable.md) · [AssemblyAI](https://docs.guild.ai/integrations/assemblyai.md) · [BigQuery](https://docs.guild.ai/integrations/bigquery.md) · [CockroachDB](https://docs.guild.ai/integrations/cockroachdb.md)

**Read:** Docs: [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Credentials](https://docs.guild.ai/platform/credentials.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
