Open source & free to use

Long-term memory
for AI agents

Add persistent memory to your AI agents with semantic search and automatic fact extraction. Built on PostgreSQL + pgvector.

from cluttr import Cluttr

memory = Cluttr(config)

async with memory:
    # Store memories from conversations
    await memory.add( messages, user_id="user_123")

    # Search relevant memories
    results = await memory.search("programming language preferences", user_id="user_123")

Everything you need for agent memory

Cluttr handles the complexity of memory management so you can focus on building great AI experiences.

Automatic Extraction

LLM extracts important facts, preferences, and context from conversations automatically.

Smart Query Expansion

Queries are automatically optimized by LLM for better semantic vector matching.

Image Support

Images in conversations are automatically summarized and stored as searchable memories.

Duplicate Detection

LLM-powered deduplication prevents storing redundant or semantically similar facts.

Multiple Providers

Works with OpenAI (GPT-4o-mini) and AWS Bedrock (Claude + Titan embeddings).

PostgreSQL + pgvector

Built on battle-tested PostgreSQL with pgvector for reliable vector similarity search.

Quick Start

Get up and running in minutes.

1

Install the package

uv add cluttr
2

Configure your provider

config = {
    "vector_db": {
        "engine": "postgres",
        "host": "localhost",
        "database": "cluttr",
        "user": "postgres",
        "password": "secret",
    },
    "llm": {
        "provider": "openai", # or "bedrock"
        "api_key": "sk-...",
    },
}
3

Start using memories

memory = Cluttr(config)

async with memory:
    # Add memories from conversation
    await memory.add([
        {"role": "user", "content": "I love Python!"},
        {"role": "assistant", "content": "Great choice!"},
    ], user_id="user_123")

    # Search memories
    results = await memory.search(
        "programming preferences",
        user_id="user_123"
    )

Ready to add memory
to your agents?

Open source and free to use. Star us on GitHub!

View on GitHub