The garbage collection engine for AI agent memory.
Vector databases retrieve similar text, but cannot resolve contradiction or time. Sieve scores memories, supersedes outdated facts, and prunes stale context with ~0.2ms local latency—without burning tokens on per-turn LLM calls.
- [DECISION] Our primary database is configured as PostgreSQL 15 on port 5432. - [TASK] TODO: Deploy staging cluster before Friday's investor presentation.
Score → Supersede → Prune Pipeline #
How Sieve manages agent memories in three simple stages. It runs locally in your Python agent loop or as a background service with ~0.2ms latency in local mock benchmarks.
Filter Out Noise
Every memory an agent records is scored in ~0.2ms. Sieve separates key decisions and tasks from casual conversation ("hello", "thanks", small talk), keeping only what truly matters.
Spot Changing Facts
When a user updates instructions (like switching from PostgreSQL to MongoDB), standard vector search gets confused. Sieve compares facts pairwise and immediately identifies that the older record is now outdated.
Keep Prompts Clean
Before calling your LLM, Sieve evicts all outdated facts from the prompt. Your agent only sees the latest single source of truth—preventing hallucinations and slashing token costs by up to 70%.
- [DECISION] Primary database configured as PostgreSQL 15 on port 5432. - [DECISION] AWS ECS Fargate container selected for deployment runtime. - [CHAT] haha yeah sounds good, let's connect later today! - [TASK] TODO: Deploy staging cluster before Friday's investor demo. - [DECISION] Actually, we migrated to MongoDB 7.0 for document schemas.
- [DECISION] Actually, we migrated to MongoDB 7.0 for document schemas. - [TASK] TODO: Deploy staging cluster before Friday's investor presentation.
Honest Performance & Scale #
Evaluated across 1,000 conversational turns simulating evolving architecture decisions and tasks. Tests run on Apple M-Series and Linux x86_64.
| Architecture Approach | Contradiction Resolution | Per-Turn Latency | 10k Turn API Cost | Context Window Impact |
|---|---|---|---|---|
| Vector Stores (Chroma, Pinecone) | Blind to Time | 15ms | $0.00 | Returns both outdated and current facts |
| Generative LLM Triage (Mem0, Letta) | 95% Accurate | 850ms – 2,200ms | ~$13.50 | Constrained, introduces latency bottlenecks |
| Sieve (Local Heuristic Engine) | Deterministic Pipeline | ~0.18ms | $0.00 | Pruned & bounded locally without GPU |
| Sieve (Neural Laya Model on GPU) | Calibrated ModernBERT | ~25ms | $0.00 | True probability-calibrated supersession |
Watch Supersession Detection in Real-Time #
Watch an autonomous agent session execute below in real time. As new conversation turns arrive and facts change, Sieve's deterministic pairwise engine instantly supersedes stale memories and prunes the prompt.
- [DECISION] We decided to deploy PostgreSQL as our primary database engine. - [TASK] TODO: Provision staging cluster environment before Friday's demo.
Engineered for Your Existing Stack #
Drop Sieve into Python agent loops, LangChain LCEL chains, Chroma vector stores, or run as a standalone FastAPI microservice.
# 1. Initialize persistent memory store (pure Python, SQLite + FTS5) from sieve import SieveMemory memory = SieveMemory("agent_memory.db") # 2. Record conversation turns scoped to a session/tenant memory.remember("Primary database is PostgreSQL.", namespace="user_88") memory.remember("TODO: Email weekly summary to team.", namespace="user_88") # User updates their architecture preference later in the session: memory.remember("Actually, we migrated to MongoDB instead of PostgreSQL.", namespace="user_88") # 3. Sweep prunes outdated PostgreSQL note (superseded_by: MongoDB) memory.sweep(namespace="user_88") # 4. Formatted, clean context string ready for system prompt system_prompt_context = memory.get_context(namespace="user_88")