Skip to main content

Weaviate

Open-source vector database with GraphQL API.

Setup

# Docker
docker run -d -p 8080:8080 semitechnologies/weaviate

pip install weaviate-client

Quick Start (Agent with Knowledge)

Use Weaviate as a knowledge store with an agent:
from praisonaiagents import Agent

agent = Agent(
    name="Assistant",
    instructions="You are a helpful assistant with access to documents.",
    knowledge=["./docs/guide.pdf"]
)

agent.chat("What does the guide say?")

Advanced Usage (Direct Store)

from praisonai.persistence.factory import create_knowledge_store

store = create_knowledge_store("weaviate", url="http://localhost:8080")

store.create_collection("Documents", dimension=384)
store.insert("Documents", [doc])
results = store.search("Documents", query_embedding, limit=5)

Configuration

OptionDescription
urlWeaviate server URL
api_keyAPI key (for cloud)