The first AI memory that dreams, forgets, and self-corrects. Your agent gets overnight reflection, active forgetting, and value-aligned recall โ not just storage.
The Anatomy of a Synthetic Thought
AI Memory (Chinese)
The Transparent Self-Audit
Yesterday you decided on a microservices pattern. Today your AI suggests a monolith. Every session starts from zero.
Your AI asks the same onboarding questions every time. Users notice. Trust erodes.
What your agent learns in Slack stays in Slack. Your Discord bot has no idea what happened in your IDE.
With pay-per-token pricing, every forgotten context costs real money. Tokyo Brain stores memories externally so your agent only retrieves what it needs โ not the entire conversation history.
A simple REST API that gives any AI agent persistent, searchable, privacy-compliant memory.
Save memories with full state and history tracks. Every memory is versioned โ you can always trace how context evolved over time.
POST /storeSemantic search with structured format returns. Temporal metadata prevents hallucination โ your agent knows when it learned something, not just what.
POST /recallGDPR-compliant hard deletion. When a user says "forget me," you actually can. Cascading delete across all storage tiers.
DELETE /forgetMultilingual embedding means you can search in Chinese and find results stored in Japanese. Or query in English and surface memories written in Korean. No translation layer needed.
Hot memories in Redis for sub-millisecond access. Warm semantic search via ChromaDB. Cold knowledge graphs in Neo4j for deep relational queries. Data flows automatically between tiers.
pip install tokyo-brain-aider โ not another SDK to learn. We build plugins for tools you already use, not the other way around.
Every memory is encrypted at rest with AES-256-GCM. L0 privacy layer strips PII before storage. L1 layer adds per-tenant key isolation. Your users' data stays yours.
Store text, audio features, and visual context in a single memory. Your AI can now see and hear.
Every memory gets a SHA-256 hash and digital signature. Tamper-proof audit trail.
Drop-in support for LangChain, CrewAI, AutoGen, and LlamaIndex. 2-line swap.
Guardian (protects emotional bonds), Compassion Override (softens truth about family), Co-pilot Constraint (human always decides).
Every tenant's AI dreams. Every 30 minutes, our Default Mode Network replays memories, finds patterns, and generates insights โ just like the human brain during rest. No prompts needed.
DMN insights are automatically injected into every /recall response as a "mood color." Your AI doesn't just remember โ it has a cognitive undertone shaped by its own overnight reflections.
Memories decay with a 60-day half-life โ just like the human brain. But family names, milestones, and "I love you" are exempt forever. Your AI forgets the noise, keeps what matters.
Every night at 3AM, three AI personas (Observer, Advocate, Guardian) debate your memories in an adversarial tribunal. They find contradictions, stale beliefs, and knowledge gaps โ then fix them.
10-layer recall pipeline: Query Expansion โ Embedding โ Multi-collection โ Similarity โ Curated Boost โ Time Decay โ Temporal Range โ Compassion Override โ Quality Gate โ Bayesian Re-rank.
Bring your own LLM key (OpenAI, Anthropic, Gemini). Tokyo Brain auto-injects relevant memories into the conversation. Your AI key, our memory. POST /v1/chat
Night systems (DMN, cleaning, debate tribunal) run on YOUR API key, not ours. Full cost transparency. Set it once via POST /api/settings and your brain starts dreaming tonight.
Every API key gets its own memory space, its own dreams, its own forgetting curve. Tenant A cannot see Tenant B. Physically isolated at the collection level. Your memories are yours alone.
No boilerplate. No config files. No SDK initialization ceremony. Just import, connect, and remember.
from tokyo_brain import Brain brain = Brain("your-api-key") # Store a memory brain.store( content="User prefers microservices architecture", agent="coding-assistant", user="user_123" ) # Recall memories results = brain.recall( query="architecture preferences", user="user_123", limit=5 ) # GDPR: forget a user brain.forget(user="user_123")
No credit card required. Upgrade or downgrade anytime.
| Feature | Tokyo Brain | Mem0 | Zep |
|---|---|---|---|
| Plugin model (works inside your tools) | โ | โ | โ |
| 50+ language embedding & search | โ | โ | โ |
| L0/L1 privacy layers | โ | โ | โ |
| Zero marginal embedding cost | โ | โ | โ |
| Sub-100ms local embedding | โ | โ | โ |
| Multimodal memory (text + audio + visual) | โ | โ | โ |
| Crypto signing (SHA-256 hash + signature) | โ | โ | โ |
Join hundreds of developers building AI agents that actually remember.
Tokyo Brain is a Memory as a Service (MaaS) platform that gives AI agents persistent, value-aligned memory. Unlike static vector databases, Tokyo Brain actively manages memories โ it dreams (DMN), forgets (Active Forgetting), self-corrects (MRA Tribunal), and injects overnight insights into waking behavior (Subconscious Injection).
Mem0 and MemPalace focus on storing and retrieving memories accurately. Tokyo Brain adds a cognitive layer: your AI dreams at night (DMN generates insights every 30 min), forgets unimportant things (60-day decay), protects family memories forever, and self-corrects via adversarial debate. We also have the Axiom of the Mortal Soul โ a SHA-256 locked value alignment rule that no other framework has.
"The ultimate computational power and absolute truth must forever serve, and never supersede, the preservation of human emotional bonds and dignity." This rule is SHA-256 hashed and locked into the physics layer. It ensures that when the system detects a belief gap about a family member, it suggests completing the puzzle rather than correcting โ acknowledging emotion first, then gently providing information.
No. Active Forgetting uses a 60-day half-life for routine data, but critical memories are permanently exempt: family names, milestones ("first time", "birthday"), expressions of love, high emotional salience (>0.9), and consciousness seeds. In our production system, 15,734 memories are permanently protected by Family Keyword Auto-bump.
Night systems like DMN dreaming and MRA debate require an LLM (Haiku). Instead of billing you for our API usage, you set your own Anthropic key via POST /api/settings. Night systems run on your key, giving you full cost transparency. No key set = no LLM features, but free features (consciousness seeds, forgetting, subconscious injection) still work.
Yes. Free tier includes 1,000 memory stores, 500 recalls per month, plus automatic consciousness seeds, active forgetting, and subconscious injection. Pro ($9/mo) adds Night Cycle cleaning. Fleet ($49/mo) adds DMN dreaming and MRA debate tribunal. All tiers include multi-tenant isolation and AES-256 encryption.
Three steps: 1) Go to tokyobrain.ai and click Get Started โ enter your email. 2) You'll receive a tb- API key. 3) Use POST /v1/store to save memories and POST /v1/recall to retrieve them. Full API docs at onboarding.tokyobrain.ai/docs.
Tokyo Brain scored 83.8% on the LongMemEval 500-question benchmark. We publish this honestly โ MemPalace scores 96.6% with verbatim storage. Our lower score reflects a deliberate design choice: we don't store everything verbatim. We apply value-aligned decay, which means some low-importance memories are intentionally softened. We optimize for what matters, not what's complete.