Memory that lasts.
Clude is an open implementation of Stanford's Generative Agents — memory streams, reflection, and dream cycles, wired for production on Supabase + pgvector, with a local-first SQLite backend for offline use.
Install
One command, zero config. Detects your email from git, creates your agent, installs the MCP server for any editor you have:
Full install guide: clude.io/install.
First run
After setup, your agent gets four MCP tools: store_memory, recall_memories, get_memory_stats, and find_clinamen. Memories live at ~/.clude/brain.db by default.
Verify with:
Memory types
Clude stores five kinds of memory. Each decays at a different rate, faithful to how human memory actually works:
| Type | What it holds | Decay / day |
|---|---|---|
| episodic | Raw conversational moments, events | 7% |
| semantic | Consolidated facts, stable beliefs | 2% |
| procedural | Routines, tone, formatting preferences | 3% |
| self_model | Agent identity, values, boundaries | 1% |
| introspective | Reflections generated during dream cycles | 2% |
Recall
Clude's recall is hybrid: vector similarity (cosine, 384-dim embeddings) plus keyword matching plus tag scoring, with a composite score weighted by importance and recency. The math:
In practice this means: a highly-relevant memory that was stored 3 months ago can still beat a weakly-relevant one from yesterday, as long as it was important.
Progressive disclosure
Context windows are expensive. Use recallSummaries() for ~50-token previews, then hydrate() only the full content of the memories you actually need:
Dream cycles
Every night (or on-demand), Clude runs a dream cycle:
- Consolidation. Extracts semantic facts from recent episodic memories.
- Compaction. Summarises faded episodic clusters into single gists.
- Reflection. Generates introspective memories from patterns.
- Contradiction resolution. Finds conflicting semantic memories, resolves via an LLM, stores the resolution with a
resolveslink. - Emergence. Links related memories across time into a knowledge graph.
Trigger manually:
Decay
Memories don't just accumulate. They fade. Each memory has a decay_factor in [0,1] that declines over time based on its type. Access boosts it (up to 0.1 per recall). Faded memories drop below the recall threshold and eventually get compacted.
Cortex client
The SDK works the same way regardless of backend:
MCP tools
When Clude's MCP server is connected to your editor, agents get these tools automatically:
store_memory(content, type, source)recall_memories(query, limit?, type?)get_memory_stats()find_clinamen(query)— finds surprising or tangential memories via anti-similarity.
Modes
Clude detects its mode from the environment:
| Mode | Trigger | Storage |
|---|---|---|
| Hosted | CORTEX_API_KEY | clude.io · zero setup |
| Self-hosted | SUPABASE_URL + SUPABASE_SERVICE_KEY | Your Supabase |
| Local | no env vars set | ~/.clude/brain.db |
Self-hosted
If you want to run Clude on your own infrastructure:
- Supabase project with
pgvectorextension enabled - Schema:
curl -fsSL https://clude.io/supabase-schema.sql | psql $SUPABASE_DB_URL - Optional: Voyage AI for embeddings (
VOYAGE_API_KEY) - Optional: Anthropic for dream cycle reflection (
ANTHROPIC_API_KEY)
Point the SDK at it:
Full deployment guide in the GitHub repo.