Skip to main content

Overview

PostgreSQL as the persistent storage backend for agent memory, context, and conversation history. Benefits: ACID compliance, rich queries, JSONB support, full-text search, pgvector for semantic search

Features

Conversation History - Store and retrieve agent conversations
Long-term Memory - Store facts and knowledge with confidence scores
Semantic Search - pgvector for similarity-based memory retrieval
Full-Text Search - Built-in PostgreSQL text search

Data Models

Context - Conversation sessions with metadata
Messages - Chat history with embeddings for semantic search
Artifacts - Task outputs and generated content

Implementation

from bindu.storage import PostgresMemoryStore

memory = PostgresMemoryStore(
    dsn="postgresql://localhost/bindu",
    enable_vector_search=True
)

# Store conversation
await memory.store_conversation(
    agent_id="agent-123",
    context_id="ctx-456",
    messages=[...]
)

# Semantic search
results = await memory.search_similar(
    query="What does the user like?",
    limit=10
)

Status

🚀 In Progress - Schema design and core storage implementation

What’s Next

  • Discuss - Share your storage needs on Discord