> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ChromaDB Async

> Insert knowledge and run an agent with ainsert() and aprint_response() on a ChromaDB backend.

## Code

```python async_chroma_db.py theme={null}
import asyncio

from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.chroma import ChromaDb

vector_db = ChromaDb(collection="recipes", path="tmp/chromadb", persistent_client=True)

knowledge = Knowledge(
    vector_db=vector_db,
)

agent = Agent(knowledge=knowledge)

if __name__ == "__main__":
    asyncio.run(
        knowledge.ainsert(url="https://docs.agno.com/agents/overview.md")
    )

    asyncio.run(
        agent.aprint_response("What is the purpose of an Agno Agent?", markdown=True)
    )
```

## Usage

<Snippet file="create-venv-step.mdx" />

**1. Install dependencies**

```bash theme={null}
uv pip install -U chromadb pypdf openai agno
```

**2. Set environment variables**

```bash theme={null}
export OPENAI_API_KEY=xxx
```

**3. Run Agent**

```bash theme={null}
python async_chroma_db.py
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.