memU is a memory framework built for 24/7 proactive agents. It is designed for long-running use and greatly reduces the LLM token cost of keeping agents always online, making always-on, evolving agents practical in production systems. memU continuously captures and understands user intent. Even without a command, the agent can tell what you are about to do and act on it by itself.
memU Bot — Now open source. The enterprise-ready OpenClaw. Your proactive AI assistant that remembers everything.
- Download-and-use and simple to get started (one-click install, < 3 min).
- Builds long-term memory to understand user intent and act proactively (24/7).
- Cuts LLM token cost with smaller context (~1/10 of comparable usage).
Try now: memu.bot · Source: memUBot on GitHub
memU treats memory like a file system—structured, hierarchical, and instantly accessible.
| File System | memU Memory |
|---|---|
| 📁 Folders | 🏷️ Categories (auto-organized topics) |
| 📄 Files | 🧠 Memory Items (extracted facts, preferences, skills) |
| 🔗 Symlinks | 🔄 Cross-references (related memories linked) |
| 📂 Mount points | 📥 Resources (conversations, documents, images) |
Why this matters:
- Navigate memories like browsing directories—drill down from broad categories to specific facts
- Mount new knowledge instantly—conversations and documents become queryable memory
- Cross-link everything—memories reference each other, building a connected knowledge graph
- Persistent & portable—export, backup, and transfer memory like files
memory/
├── preferences/
│ ├── communication_style.md
│ └── topic_interests.md
├── relationships/
│ ├── contacts/
│ └── interaction_history/
├── knowledge/
│ ├── domain_expertise/
│ └── learned_skills/
└── context/
├── recent_conversations/
└── pending_tasks/
Just as a file system turns raw bytes into organized data, memU transforms raw interactions into structured, searchable, proactive intelligence.
If you find memU useful or interesting, a GitHub Star ⭐️ would be greatly appreciated.
| Capability | Description |
|---|---|
| 🤖 24/7 Proactive Agent | Always-on memory agent that works continuously in the background |
| 🎯 User Intention Capture | Understands and remembers user goals, preferences, and context across sessions automatically |
| 💰 Cost Efficient | Reduces long-running token costs by caching insights and avoiding redundant LLM calls |
cd examples/proactive
python proactive.py
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ USER QUERY │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
│ │
▼ ▼
┌────────────────────────────────────────┐ ┌────────────────────────────────────────────────┐
│ 🤖 MAIN AGENT │ │ 🧠 MEMU BOT │
│ │ │ │
│ Handle user queries & execute tasks │ ◄───► │ Monitor, memorize & proactive intelligence │
├────────────────────────────────────────┤ ├────────────────────────────────────────────────┤
│ │ │ │
│ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
│ │ 1. RECEIVE USER INPUT │ │ │ │ 1. MONITOR INPUT/OUTPUT │ │
│ │ Parse query, understand │ │ ───► │ │ Observe agent interactions │ │
│ │ context and intent │ │ │ │ Track conversation flow │ │
│ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
│ │ 2. PLAN & EXECUTE │ │ │ │ 2. MEMORIZE & EXTRACT │ │
│ │ Break down tasks │ │ ◄─── │ │ Store insights, facts, preferences │ │
│ │ Call tools, retrieve data │ │ inject │ │ Extract skills & knowledge │ │
│ │ Generate responses │ │ memory │ │ Update user profile │ │
│ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
│ │ 3. RESPOND TO USER │ │ │ │ 3. PREDICT USER INTENT │ │
│ │ Deliver answer/result │ │ ───► │ │ Anticipate next steps │ │
│ │ Continue conversation │ │ │ │ Identify upcoming needs │ │
│ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
│ │ │ │ │ │
│ ▼ │ │ ▼ │
│ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
│ │ 4. LOOP │ │ │ │ 4. RUN PROACTIVE TASKS │ │
│ │ Wait for next user input │ │ ◄─── │ │ Pre-fetch relevant context │ │
│ │ or proactive suggestions │ │ suggest│ │ Prepare recommendations │ │
│ └──────────────────────────────────┘ │ │ │ Update todolist autonomously │ │
│ │ │ └──────────────────────────────────────────┘ │
└────────────────────────────────────────┘ └────────────────────────────────────────────────┘
│ │
└───────────────────────────┬───────────────────────────────┘
▼
┌──────────────────────────────┐
│ CONTINUOUS SYNC LOOP │
│ Agent ◄──► MemU Bot ◄──► DB │
└──────────────────────────────┘
Agent monitors interests and proactively surfaces relevant content
# User has been researching AI topicsMemUtracks: readinghistory, savedarticles, searchqueries# When new content arrives:Agent: "Ifound3newpapersonRAGoptimizationthatalignwithyourrecentresearchonretrievalsystems. Oneauthor
(Dr. Chen) you'vecitedbeforepublishedyesterday."
# Proactive behaviors:-Learnstopicpreferencesfrombrowsingpatterns-Tracksauthor/sourcecredibilitypreferences-Filtersnoisebasedonengagementhistory-TimesrecommendationsforoptimalattentionAgent learns communication patterns and handles routine correspondence
# MemU observes email patterns over time:-Responsetemplatesforcommonscenarios-Prioritycontactsandurgentkeywords-Schedulingpreferencesandavailability-Writingstyleandtonevariations# Proactive email assistance:Agent: "Youhave12newemails. I'vedraftedresponsesfor3routinerequestsandflagged2urgentitemsfromyourprioritycontacts.
ShouldIalsorescheduletomorrow'smeetingbasedontheconflictJohnmentioned?"
# Autonomous actions:
✓ Draftcontext-awarereplies
✓ Categorizeandprioritizeinbox
✓ Detectschedulingconflicts
✓ SummarizelongthreadswithkeydecisionsAgent tracks market context and user investment behavior
# MemU learns trading preferences:-Risktolerancefromhistoricaldecisions-Preferredsectorsandassetclasses-Responsepatternstomarketevents-Portfoliorebalancingtriggers# Proactive alerts:Agent: "NVDAdropped5%inafter-hourstrading. Basedonyourpastbehavior, youtypicallybuytechdipsabove3%. Yourcurrentallocationallowsfor $2,000additionalexposurewhilemaintainingyour70/30equity-bondtarget."
# Continuous monitoring:-Trackpricealertstiedtouser-definedthresholds-Correlatenewseventswithportfolioimpact-Learnfromexecutedvs. ignoredrecommendations-Anticipatetax-lossharvestingopportunities...
MemU's three-layer system enables both reactive queries and proactive context loading:
| Layer | Reactive Use | Proactive Use |
|---|---|---|
| Resource | Direct access to original data | Background monitoring for new patterns |
| Item | Targeted fact retrieval | Real-time extraction from ongoing interactions |
| Category | Summary-level overview | Automatic context assembly for anticipation |
Proactive Benefits:
- Auto-categorization: New memories self-organize into topics
- Pattern Detection: System identifies recurring themes
- Context Prediction: Anticipates what information will be needed next
Experience proactive memory instantly:
👉 memu.so - Hosted service with 7×24 continuous learning
For enterprise deployment with custom proactive workflows, contact info@nevamind.ai
| Base URL | https://api.memu.so |
|---|---|
| Auth | Authorization: Bearer YOUR_API_KEY |
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v3/memory/memorize | Register continuous learning task |
GET | /api/v3/memory/memorize/status/{task_id} | Check real-time processing status |
POST | /api/v3/memory/categories | List auto-generated categories |
POST | /api/v3/memory/retrieve | Query memory (supports proactive context loading) |
pip install -e .Requirements: Python 3.13+ and an OpenAI API key
Test Continuous Learning (in-memory):
export OPENAI_API_KEY=your_api_key
cd tests
python test_inmemory.pyTest with Persistent Storage (PostgreSQL):
# Start PostgreSQL with pgvector
docker run -d \
--name memu-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=memu \
-p 5432:5432 \
pgvector/pgvector:pg16
# Run continuous learning testexport OPENAI_API_KEY=your_api_key
cd tests
python test_postgres.pyBoth examples demonstrate proactive memory workflows:
- Continuous Ingestion: Process multiple files sequentially
- Auto-Extraction: Immediate memory creation
- Proactive Retrieval: Context-aware memory surfacing
See tests/test_inmemory.py and tests/test_postgres.py for implementation details.
MemU supports custom LLM and embedding providers beyond OpenAI. Configure them via llm_profiles:
frommemuimportMemUServiceservice=MemUService(
llm_profiles={
# Default profile for LLM operations"default": {
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"api_key": "your_api_key",
"chat_model": "qwen3-max",
"client_backend": "sdk"# "sdk" or "http"
},
# Separate profile for embeddings"embedding": {
"base_url": "https://api.voyageai.com/v1",
"api_key": "your_voyage_api_key",
"embed_model": "voyage-3.5-lite"
}
},
# ... other configuration
)MemU supports OpenRouter as a model provider, giving you access to multiple LLM providers through a single API.
frommemuimportMemoryServiceservice=MemoryService(
llm_profiles={
"default": {
"provider": "openrouter",
"client_backend": "httpx",
"base_url": "https://openrouter.ai",
"api_key": "your_openrouter_api_key",
"chat_model": "anthropic/claude-3.5-sonnet", # Any OpenRouter model"embed_model": "openai/text-embedding-3-small", # Embedding model
},
},
database_config={
"metadata_store": {"provider": "inmemory"},
},
)| Variable | Description |
|---|---|
OPENROUTER_API_KEY | Your OpenRouter API key from openrouter.ai/keys |
| Feature | Status | Notes |
|---|---|---|
| Chat Completions | Supported | Works with any OpenRouter chat model |
| Embeddings | Supported | Use OpenAI embedding models via OpenRouter |
| Vision | Supported | Use vision-capable models (e.g., openai/gpt-4o) |
export OPENROUTER_API_KEY=your_api_key
# Full workflow test (memorize + retrieve)
python tests/test_openrouter.py
# Embedding-specific tests
python tests/test_openrouter_embedding.py
# Vision-specific tests
python tests/test_openrouter_vision.pySee examples/example_4_openrouter_memory.py for a complete working example.
Processes inputs in real-time and immediately updates memory:
result=awaitservice.memorize(
resource_url="path/to/file.json", # File path or URLmodality="conversation", # conversation | document | image | video | audiouser={"user_id": "123"} # Optional: scope to a user
)
# Returns immediately with extracted memory:
{
"resource": {...}, # Stored resource metadata"items": [...], # Extracted memory items (available instantly)"categories": [...] # Auto-updated category structure
}Proactive Features:
- Zero-delay processing—memories available immediately
- Automatic categorization without manual tagging
- Cross-reference with existing memories for pattern detection
MemU supports both proactive context loading and reactive querying:
Fast proactive context assembly using embeddings:
- ✅ Instant context: Sub-second memory surfacing
- ✅ Background monitoring: Can run continuously without LLM costs
- ✅ Similarity scoring: Identifies most relevant memories automatically
Deep anticipatory reasoning for complex contexts:
- ✅ Intent prediction: LLM infers what user needs before they ask
- ✅ Query evolution: Automatically refines search as context develops
- ✅ Early termination: Stops when sufficient context is gathered
| Aspect | RAG (Fast Context) | LLM (Deep Reasoning) |
|---|---|---|
| Speed | ⚡ Milliseconds | 🐢 Seconds |
| Cost | 💰 Embedding only | 💰💰 LLM inference |
| Proactive use | Continuous monitoring | Triggered context loading |
| Best for | Real-time suggestions | Complex anticipation |
# Proactive retrieval with context historyresult=awaitservice.retrieve(
queries=[
{"role": "user", "content": {"text": "What are their preferences?"}},
{"role": "user", "content": {"text": "Tell me about work habits"}}
],
where={"user_id": "123"}, # Optional: scope filtermethod="rag"# or "llm" for deeper reasoning
)
# Returns context-aware results:
{
"categories": [...], # Relevant topic areas (auto-prioritized)"items": [...], # Specific memory facts"resources": [...], # Original sources for traceability"next_step_query": "..."# Predicted follow-up context
}Proactive Filtering: Use where to scope continuous monitoring:
where={"user_id": "123"}- User-specific contextwhere={"agent_id__in": ["1", "2"]}- Multi-agent coordination- Omit
wherefor global context awareness
Continuously learns from every interaction without explicit memory commands:
export OPENAI_API_KEY=your_api_key
python examples/example_1_conversation_memory.pyProactive Behavior:
- Automatically extracts preferences from casual mentions
- Builds relationship models from interaction patterns
- Surfaces relevant context in future conversations
- Adapts communication style based on learned preferences
Best for: Personal AI assistants, customer support that remembers, social chatbots
Learns from execution logs and proactively suggests optimizations:
export OPENAI_API_KEY=your_api_key
python examples/example_2_skill_extraction.pyProactive Behavior:
- Monitors agent actions and outcomes continuously
- Identifies patterns in successes and failures
- Auto-generates skill guides from experience
- Proactively suggests strategies for similar future tasks
Best for: DevOps automation, agent self-improvement, knowledge capture
Unifies memory across different input types for comprehensive context:
export OPENAI_API_KEY=your_api_key
python examples/example_3_multimodal_memory.pyProactive Behavior:
- Cross-references text, images, and documents automatically
- Builds unified understanding across modalities
- Surfaces visual context when discussing related topics
- Anticipates information needs by combining multiple sources
Best for: Documentation systems, learning platforms, research assistants
MemU achieves 92.09% average accuracy on the Locomo benchmark across all reasoning tasks, demonstrating reliable proactive memory operations.

View detailed experimental data: memU-experiment
| Repository | Description | Proactive Features |
|---|---|---|
| memU | Core proactive memory engine | 7×24 learning pipeline, auto-categorization |
| memU-server | Backend with continuous sync | Real-time memory updates, webhook triggers |
| memU-ui | Visual memory dashboard | Live memory evolution monitoring |
Quick Links:
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
To start contributing to MemU, you'll need to set up your development environment:
- Python 3.13+
- uv (Python package manager)
- Git
# 1. Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/memU.git
cd memU
# 2. Install development dependencies
make installThe make install command will:
- Create a virtual environment using
uv - Install all project dependencies
- Set up pre-commit hooks for code quality checks
Before submitting your contribution, ensure your code passes all quality checks:
make checkThe make check command runs:
- Lock file verification: Ensures
pyproject.tomlconsistency - Pre-commit hooks: Lints code with Ruff, formats with Black
- Type checking: Runs
mypyfor static type analysis - Dependency analysis: Uses
deptryto find obsolete dependencies
For detailed contribution guidelines, code standards, and development practices, please see CONTRIBUTING.md.
Quick tips:
- Create a new branch for each feature or bug fix
- Write clear commit messages
- Add tests for new functionality
- Update documentation as needed
- Run
make checkbefore pushing
- GitHub Issues: Report bugs & request features
- Discord: Join the community
- X (Twitter): Follow @memU_ai
- Contact: info@nevamind.ai
⭐ Star us on GitHub to get notified about new releases!





