Tokyo Brain
Give your AI agent a memory that never forgets.
Tokyo Brain is universal memory infrastructure for AI agents. Store, recall, and forget — with one API call.
Install
pip install tokyo-brain
Quickstart
from tokyo_brain import Brain
brain = Brain(api_key="tb-...")
# Store a memory
brain.store("User prefers dark mode and speaks Japanese", track="preferences")
# Recall relevant memories
result = brain.recall("What language does the user speak?")
for memory in result.memories:
print(f"[{memory.score:.2f}] {memory.document}")
# Forget specific memories
brain.forget(ids=["mem_abc123"])
# Health check
health = brain.health()
print(f"Status: {health.status} | Version: {health.version}")
Features
| Feature | Description |
|---|---|
| 🌍 50+ Languages | Multilingual embeddings — store in Japanese, recall in English |
| 🏗️ 3-Tier Architecture | Hot (Redis) → Warm (Postgres+pgvector) → Cold (S3) |
| 🔌 Plugin-First | Drop-in memory for LangChain, CrewAI, AutoGen, OpenClaw |
| 🔒 Encryption at Rest | AES-256 encryption for all stored memories |
| 📊 Tracks | Organise memories by track — history, preferences, knowledge |
| ⚡ Sub-50ms Recall | Optimised vector search with HNSW indexing |
API Reference
Brain(api_key, base_url, timeout)
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | Your API key (starts with tb-) |
base_url |
str |
https://api.tokyobrain.ai |
API endpoint |
timeout |
int |
30 |
Request timeout in seconds |
brain.store(document, track, metadata)
Store a memory document. Returns StoreResult.
brain.recall(query, format, top_k)
Recall memories matching a natural-language query. Returns RecallResult with a list of Memory objects.
brain.forget(ids, where)
Delete memories by ID list or filter. Returns ForgetResult.
brain.health()
Check API health. Returns HealthResult.
Comparison
| Tokyo Brain | Mem0 | Zep | |
|---|---|---|---|
| Multilingual (50+ langs) | ✅ | ❌ | ⚠️ Limited |
| 3-tier storage | ✅ Hot/Warm/Cold | ❌ Single tier | ⚠️ 2-tier |
| Plugin ecosystem | ✅ LangChain, CrewAI, OpenClaw | ⚠️ LangChain only | ⚠️ LangChain only |
| Encryption at rest | ✅ AES-256 | ❌ | ✅ |
| Track-based organisation | ✅ | ❌ | ❌ |
| Sub-50ms recall | ✅ | ❌ | ⚠️ |
| Self-host option | ✅ | ✅ | ✅ |
| Pricing | Free tier + usage | Free tier + usage | Per-seat |
Self-Hosting
docker run -p 9500:9500 tokyobrain/server:latest
Then point the SDK at your local instance:
brain = Brain(api_key="tb-local", base_url="http://localhost:9500")
Documentation
Full documentation at tokyobrain.ai.
License
MIT — see LICENSE for details.
Metadata
Release files for tokyo-brain 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tokyo_brain-0.1.0.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tokyo_brain-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / tokyo_brain-0.1.0.tar.gz
| Download URL | tokyo_brain-0.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025689fcb8934ab1717b770bcb01db543d10b826eed724f1218e850ba442b79f
|
|
BLAKE2b-256 checksum How to use checksums |
91b1739c93ae307d23b56c04b05298c667c66f8853ca5c125c4f0aa4b339294f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / tokyo_brain-0.1.0-py3-none-any.whl
| Download URL | tokyo_brain-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae9f751f3d901d961a6e6a2e21633d43ead2315de1e37535607ea825d3f018db
|
|
BLAKE2b-256 checksum How to use checksums |
607dcf7549cd5cc2e8204c6f13b97d4dce6aeef5fc68199eebe65ac3429c35d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|