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

# ChromaDB

> ChromaDB vector store for PraisonAI

# ChromaDB

Embedded vector database for local development.

## Setup

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
pip install chromadb
```

## Quick Start (Agent with Knowledge)

Use ChromaDB as a knowledge store with an agent:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

# Agent with knowledge from files (uses ChromaDB by default)
agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant with access to documents.",
    knowledge=["./docs/guide.pdf", "./docs/faq.md"]
)

agent.chat("What does the guide say about getting started?")
```

## Advanced Usage (Direct Store)

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonai.persistence.factory import create_knowledge_store

# Local file storage
store = create_knowledge_store("chroma", path="./chroma_data")

# Create collection
store.create_collection("documents", dimension=384)

# Insert documents
from praisonai.persistence.knowledge.base import KnowledgeDocument

doc = KnowledgeDocument(
    content="PraisonAI is an AI agent framework",
    embedding=[0.1] * 384,
    metadata={"source": "docs"}
)
store.insert("documents", [doc])

# Search
results = store.search("documents", query_embedding, limit=5)
```

## Configuration

| Option                | Description                 |
| --------------------- | --------------------------- |
| `path`                | Data directory path         |
| `collection_metadata` | Default collection metadata |
