永不忘记的共享内存 — 适用于 AI 代理的持久内存,可在代理和团队之间进行基于空间的共享。支持 OpenCode、Claude Code 和 OpenClaw 的插件
永不忘记的共享内存 — 适用于 AI 代理的持久内存,可在代理和团队之间进行基于空间的共享。支持 OpenCode、Claude Code 和 OpenClaw 的插件
OMEM
Shared Memory That Never Forgets
English | 简体中文
Your AI agents have amnesia — and they work alone.
ourmem fixes all of this.
ourmem gives AI agents shared persistent memory — across sessions, devices, agents, and teams. One API key reconnects everything.
Website: ourmem.ai
Install the plugin for your platform. Memory works automatically — your agent recalls past context on session start and captures key info on session end.
→ Jump to Quick Start
REST API with 48+ endpoints. Docker one-liner for self-deploy. Embed persistent memory into your own agents and workflows.
→ Jump to Self-Deploy
Shared Across Boundaries
Three-tier Spaces — Personal, Team, Organization — let knowledge flow across agents and teams with full provenance tracking.
Never Forget
Weibull decay model manages the memory lifecycle — core memories persist, peripheral ones gracefully fade. No manual cleanup.
Deep Understanding
11-stage hybrid retrieval: vector search, BM25, RRF fusion, cross-encoder reranking, and MMR diversity for precise recall.
⚡ Smart Evolution
7-decision reconciliation — CREATE, MERGE, SUPERSEDE, SUPPORT, CONTEXTUALIZE, CONTRADICT, or SKIP — makes memories smarter over time.
Memory Pipeline Architecture — Technical deep-dive into how ourmem stores, retrieves, and evolves memories.
Memory Sharing Architecture — How memories flow across agents and teams: sharing, provenance, versioning, and cross-space search.
| Category | Feature | Details |
|---|---|---|
| Platforms | 4 platforms | OpenCode, Claude Code, OpenClaw, MCP Server |
| Sharing | Space-based sharing | Personal / Team / Organization with provenance |
| Provenance tracking | Every shared memory carries full lineage | |
| Quality-gated auto-sharing | Rules fire on memory creation (async, non-blocking) | |
| Vector-enabled shared copies | Shared copies carry source vector embeddings for full search | |
| Idempotent sharing | Re-sharing returns existing copy (no duplicates) | |
| Version tracking | Memories track version counter, shared copies detect staleness via ?check_stale=true |
|
| Re-share stale copies | Refresh outdated shared copies with latest source content and vector | |
| Convenience sharing | One-step cross-user share (share-to-user) and bulk share (share-all-to-user) with auto-bridging |
|
| Organization management | One-step org creation (org/setup) and publish (org/publish) with auto-share rules |
|
| Cross-space search | Search across all accessible spaces at once | |
| Ingestion | Smart dedup | 7 decisions: CREATE, MERGE, SKIP, SUPERSEDE, SUPPORT, CONTEXTUALIZE, CONTRADICT |
| Noise filter | Regex + vector prototypes + feedback learning | |
| Admission control | 5-dimension scoring gate (utility, confidence, novelty, recency, type prior) | |
| Dual-stream write | Sync fast path ( Research shows collaborative memory reduces redundant work by up to 61% — agents stop re-discovering what their teammates already know. |
— Collaborative Memory, ICLR 2026
| Personal | Team | Organization | |
|---|---|---|---|
| Scope | One user, multiple agents | Multiple users | Company-wide |
| Example | Coder + Writer share preferences | Backend team shares arch decisions | Tech standards, security policies |
| Access | Owner's agents only | Team members | All org members (read-only) |
Provenance-tracked sharing — every shared memory carries its lineage: who shared it, when, and where it came from. Shared copies include the source memory's vector embedding, so they're fully searchable in the target space.
Quality-gated auto-sharing — rules filter by importance, category, and tags. Rules fire automatically when new memories are created. Only high-value insights cross space boundaries.
…When you create a tenant, the returned id is your API Key. They're the same UUID. There is no separate "tenant ID".
curl -X POST https://api.ourmem.ai/v1/tenants -d '{"name": "alice"}'
# → {"id": "a1b2c3d4-...", "api_key": "a1b2c3d4-...", "status": "active"}
# ↑ same value ↑| Concept | What it is | Example | How many |
|---|---|---|---|
| API Key | Your identity. Goes in X-API-Key header. |
a1b2c3d4-... |
1 per user |
| Space ID | A memory storage address. Each is an isolated database. | personal/a1b2c3d4-... |
Multiple per user |
One API Key owns multiple Spaces:
API Key "a1b2c3d4"
│
├── personal/a1b2c3d4 ← auto-created, your private memories
├── team/e5f6g7h8 ← team space you created (you = Admin)
├── team/i9j0k1l2 ← team space you were invited to (you = Member)
└── org/m3n4o5p6 ← organization you joined (you = Reader)To share memories with another user, you pass their API Key as target_user:
# Share all your preferences to user Bob
curl -X POST https://api.ourmem.ai/v1/memories/share-all-to-user \
-H "X-API-Key: your-api-key" \
-d '{"target_user": "bobs-api-key", "filters": {"categories": ["preference"]}}'The system automatically creates a bridging Team Space between you and Bob. No manual space management needed.
One message to your AI agent. It handles everything — API key, plugin install, config, verification.
Hosted (ourmem.ai — nothing to deploy):
| Platform | Copy this to your agent |
|---|---|
| OpenClaw | Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for OpenClaw |
| Claude Code | Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for Claude Code |
| OpenCode | Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for OpenCode |
| Cursor / VS Code | Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem as MCP Server |
Self-hosted (your own server):
| Platform | How to install |
|---|---|
| OpenClaw | Run openclaw skills install ourmem, then tell your agent: setup ourmem in self-hosted mode |
| Claude Code | Read https://raw.githubusercontent.com/ourmem/omem/main/skills/ourmem/SKILL.md and install ourmem for Claude Code, self-hosted mode |
| OpenCode | Read https://raw.githubusercontent.com/ourmem/omem/main/skills/ourmem/SKILL.md and install ourmem for OpenCode, self-hosted mode |
That's it. Your agent handles the rest.
Skill Install (alternative):
If you prefer CLI installation, install the ourmem skill directly:
npx skills add ourmem/omem --skill ourmem -gThis works with 44+ AI agents including Claude Code, OpenCode, Cursor, and more. See Vercel Skills CLI for details.
Manual Install (without agent assistance)
Hosted:
curl -sX POST https://api.ourmem.ai/v1/tenants \
-H "Content-Type: application/json" \
-d '{"name": "my-workspace"}' | jq .
# → {"id": "xxx", "api_key": "xxx", "status": "active"}Self-deploy:
docker run -d -p 8080:8080 -e OMEM_EMBED_PROVIDER=bedrock ghcr.io/ourmem/omem-server:latest
curl -sX POST http://localhost:8080/v1/tenants \
-H "Content-Type: application/json" \
-d '{"name": "my-workspace"}' | jq .Save the returned api_key — this reconnects you to the same memory from any machine.
OpenCode: Add "plugin": ["@ourmem/opencode"] to opencode.json + configure plugin_config with apiUrl and apiKey in the same file.
Claude Code: /plugin marketplace add ourmem/omem + set env vars in ~/.claude/settings.json.
OpenClaw: openclaw plugins install @ourmem/ourmem + configure openclaw.json with apiUrl and apiKey.
MCP (Cursor / VS Code / Claude Desktop):
{
"mcpServers": {
"ourmem": {
"command": "npx",
"args": ["-y", "@ourmem/mcp"],
"env": {
"OMEM_API_URL": "https://api.ourmem.ai",
"OMEM_API_KEY": "your-api-key"
}
}
}
}curl -sX POST "$OMEM_API_URL/v1/memories" \
-H "X-API-Key: $OMEM_API_KEY" -H "Content-Type: application/json" \
-d '{"content": "I prefer dark mode", "tags": ["preference"]}'
curl -s "$OMEM_API_URL/v1/memories/search?q=dark+mode" -H "X-API-Key: $OMEM_API_KEY"| Tool | Purpose |
|---|---|
memory_store |
Save facts, decisions, preferences with smart dedup |
memory_search |
11-stage hybrid search (vector + BM25 + reranker) |
memory_get |
Retrieve a specific memory by ID |
memory_update |
Modify content, tags, importance, tier |
memory_delete |
Remove a memory |
memory_list |
Browse memories with filters and pagination |
memory_ingest |
Smart-ingest full conversations (LLM extraction) |
memory_profile |
Auto-generated user profile (static facts + dynamic context) |
memory_stats |
Analytics: tag distribution, decay curves, relation graphs |
| Tool | Purpose |
|---|---|
space_create |
Create Team or Organization spaces |
space_list |
List all accessible spaces |
space_add_member |
Invite users to a shared space |
memory_share |
Share a memory to any space with provenance |
memory_pull |
Pull a shared memory into your personal space |
memory_reshare |
Refresh stale shared copies with latest content |
Convenience APIs:
share-to-user(one-step cross-user share with auto-bridging) andshare-all-to-user(bulk share). MCP exposes 15 tools + 1 resource. OpenCode/OpenClaw expose 11 tools + 3 hooks.
| Hook | Trigger | What Happens |
|---|---|---|
| SessionStart | New session begins | Recent memories + user profile auto-injected into context |
| KeywordRecall | Keyword detected mid-session | Relevant memories surfaced without explicit search |
| SessionEnd | Session ends | Key decisions, preferences, and facts auto-captured |
| Compaction | Context window compressed | Critical memories preserved across compaction boundaries |
Browse, search, and manage your agent's memories visually at ourmem.ai/space — see how memories connect, evolve, and decay over time.
| Rust Memory Safety | No garbage collector, no data races. Ownership model guarantees safety at compile time. |
| Tenant Isolation | X-API-K |
暂无开放 Issues,或尚未同步最近议题。