What you need
A server with Docker or a Python environment (3.10+).
MemUbot installed: `pip install memubot` or using the Docker image.
A model provider API key.
Understanding of what context your agents need to remember.
Step 1: Understand the three memory layers
Short-term memory holds current session context — recent messages, current task details. It resets when the session ends.
Working memory stores active task information that persists across sessions but has a configurable expiration.
Long-term memory captures learned preferences, approved knowledge, and persistent patterns. It is indexed and searchable.
Step 2: Configure retention policies
Each memory layer has configurable retention: max items, TTL (time to live), and importance scoring.
Short-term: keep 50 most recent items, TTL of 1 hour.
Working memory: keep 200 items, TTL of 7 days.
Long-term: unlimited items, no TTL, but importance score below 0.3 is auto-archived.
Step 3: Set up the memory backend
MemUbot uses SQLite by default for local deployments. All memory is stored on your infrastructure.
For production, configure the Postgres backend for better scalability and query performance.
The memory vault is compatible with Obsidian — you can browse and edit the agent's memory directly.
Step 4: Configure data sensitivity rules
Sensitive data can be restricted to short-term memory only — it will not persist in working or long-term storage.
Define patterns: 'Any data matching email addresses, API keys, or phone numbers stays in short-term only.'
Audit rules ensure compliance with data privacy requirements like GDPR right to erasure.
Step 5: Test context retrieval
Start a session, give the agent several instructions with specific preferences.
End the session and start a new one. Ask the agent about the preferences from the previous session.
Verify it correctly retrieves long-term memories and recognizes the user.
Step 6: Optimize for your use case
For research agents: extend long-term retention and add automatic importance scoring based on citation frequency.
For customer support: shorten short-term TTL and increase working memory capacity for active ticket context.
For personal assistants: enable cross-session learning so the agent adapts to user preferences over time.
FAQ
Does MemUbot support multi-user memory isolation?
Yes. Each user has an isolated memory namespace. Agents can be configured to access shared memory pools for team contexts.
Can I export memory for backup?
Yes. The memory database can be backed up like any SQLite or Postgres database. Export to JSON or CSV is supported.
How much memory can MemUbot handle?
With Postgres backend, MemUbot can handle billions of memory entries. The layered architecture ensures retrieval stays fast regardless of total stored data.
Configure MemUbot Memory
- Install MemUbot: pip install memubot
- Configure three memory layers with retention policies
- Set up the memory backend (SQLite or Postgres)
- Define data sensitivity rules
- Test context retrieval across sessions
- Optimize retention settings for your use case
Ready to see the full catalog?
Browse all 42 agent-ready business kits. Each includes pre-configured agent roles, prompts, workflows, install steps, and approval gates.
Shop all business kits