@memorilabs/openclaw-memori
v0.0.13
Published
Official MemoriLabs.ai long-term memory plugin for OpenClaw
Maintainers
Readme
Memori for OpenClaw
Memori gives OpenClaw agents a structured, long-term memory system. It automatically captures what happens and lets agents recall it on demand — so context survives across sessions without bloating the prompt.
Instead of relying solely on natural-language memory, Memori structures persistent memory from both conversation and agent trace — the agent's actions, tool results, decisions, and outcomes — so it can recall what actually happened when it matters.
The problem
OpenClaw's default memory works for simple use cases, but breaks at scale:
- Memory is stored as flat markdown files
- Context is lost due to compaction
- Important decisions and constraints disappear
- No relationships between facts
- Memory bleeds across users and projects
What Memori changes
Memori replaces flat memory with structured, scoped memory built from:
- Agent execution (tool calls, results, decisions, outcomes)
Instead of replaying history, agents retrieve exactly what they need.
How it works
Memori runs on two parallel systems:
1. Advanced augmentation
After each interaction, Memori converts raw session data into structured, reusable memories asynchronously.
- Transforms raw agent sessions into structured memory units
- Captures the agent's actions, reasoning, tool usage, responses, corrections, and failures
- Organizes into classes to enable efficient retrieval
- Generates embeddings for semantic retrieval
- Updates structured memory and the knowledge graph
This is how structured memory is continuously built and updated over time.
It runs after the agent responds and does not impact latency.
2. Agent-Controlled Intelligent Recall
Recall is explicit and initiated by the agent.
Memori separates memory creation from memory recall:
- Creation is automatic (advanced augmentation)
- Recall is intentional (agent-controlled)
Agents decide:
- When to recall
- What scope to recall from
- How much history to include
Memori does not automatically inject memory into the prompt. The agent retrieves only the context it needs, keeping token usage efficient.
Available tools:
memori_recall— query structured memory for facts, constraints, decisions, and patternsmemori_recall_summary— retrieve summaries and the daily briefmemori_feedback— report on memory quality to improve the system
Quickstart
Prerequisites
- OpenClaw
v2026.3.2or later - A Memori API key from app.memorilabs.ai
- An Entity ID to scope memory to a specific user, agent, or system
- A Project ID to scope memory to a specific project or workspace
1. Install
openclaw plugins install @memorilabs/openclaw-memori
openclaw plugins enable openclaw-memori2. Configure
openclaw memori init \
--api-key "YOUR_MEMORI_API_KEY" \
--entity-id "your-app-user-id" \
--project-id "my-project"3. Verify
openclaw gateway restart
openclaw memori status --checkExpected:
Status: Ready4. Test the memory loop
Tell the agent something durable:
"I always use TypeScript and prefer functional patterns."
Start a new session and ask:
"Write a hello world script in my preferred language."
Confirm the agent used
memori_recallto fetch your preferences:[Memori] memori_recall params: {"projectId":"my-project","query":"preferred programming language"}
If it works, you now have persistent memory across sessions.
Memory model
Memory is scoped to prevent noise and ensure relevance:
entity_id→ user, agent, or system contextproject_id→ project or workspace contextsession_id→ specific session (requiresproject_id)date_start/date_end→ time-bounded recall (defaults to all-time if omitted)source→ type of memory (recall only)signal→ how the memory was derived (recall only)
All timestamps are stored in UTC.
Agent behavior (read this)
Agents should:
- Retrieve a summary at the start of meaningful sessions
- Use targeted recall (not broad queries)
- Avoid recalling on every turn
- Use memory only when context is needed
- Send feedback when memory is missing or incorrect
See SKILL.md for full behavior guidelines.
Typical workflow
- Start session → retrieve summary
- During task → targeted recall
- Missing context → send feedback
- End of session → memory is captured automatically
Multi-agent ready
The plugin is fully stateless and thread-safe. You can run it across multiple agents in the same gateway without shared state or concurrency issues.
Contributing
We welcome contributions from the community! Please see our Contributing Guidelines for details on code style, standards, and submitting pull requests.
To build from source:
# Clone the repository
git clone https://github.com/memorilabs/openclaw-memori.git
cd openclaw-memori
# Install dependencies and build
npm install
npm run build
# Run formatting, linting, and type checking
npm run checkSupport
License
Apache 2.0 - see LICENSE

