Knowledge Storage

Vector store backends for knowledge and document retrieval

Knowledge Storage

Knowledge uses vector stores to index and retrieve documents. Choose the right backend for your use case.

Quick Setup

python
from praisonaiagents import Agent

# Default: Chroma (zero-config, local)
agent = Agent(knowledge=["docs/"])

# With specific provider (chroma ships out of the box)
agent = Agent(
    knowledge={
        "sources": ["docs/"],
        "vector_store": {
            "provider": "chroma",
            "config": {"collection_name": "my_docs"}
        }
    }
)

Supported Vector Stores

Choosing a Vector Store

Use CaseRecommendedWhy
Local developmentChromaZero config, embedded
Production (hosted)PineconeManaged, scalable
Production (self-hosted)Qdrant/WeaviatePerformant, open-source
PostgreSQL stackPGVectorSame infrastructure
EnterpriseMilvusHigh availability

Configuration Examples

Chroma

python
agent = Agent(
    knowledge={
        "sources": ["docs/"],
        "vector_store": {
            "provider": "chroma",
            "config": {
                "collection_name": "my_docs",
                "path": ".praison/chroma"
            }
        }
    }
)

Qdrant

python
agent = Agent(
    knowledge={
        "sources": ["docs/"],
        "vector_store": {
            "provider": "qdrant",
            "config": {
                "url": "http://localhost:6333",
                "collection_name": "my_docs"
            }
        }
    }
)

Pinecone

python
agent = Agent(
    knowledge={
        "sources": ["docs/"],
        "vector_store": {
            "provider": "pinecone",
            "config": {
                "api_key": "your-api-key",
                "index_name": "my-index"
            }
        }
    }
)

Related