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("...", 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-powered extraction of important facts, preferences, and context from conversations.

Semantic Search

Find relevant memories using vector similarity search powered by pgvector.

Image Support

Automatic summarization of images in conversations. Supports base64, URLs, and file paths.

Duplicate Detection

Smart semantic similarity checks prevent storing redundant information.

Multiple Providers

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

Async Native

Built with async/await from the ground up for high-performance applications.

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