Skip to content
Back to search

omem

Shared Memory That Never Forgets — persistent memory for AI agents with Space-based sharing across agents and teams. Plugins for OpenCode, Claude Code, OpenClaw, MCP Server.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ourmem--omem/badge.svg)](/listings/ourmem--omem)

HTML

<a href="/listings/ourmem--omem"><img src="/api/listings/ourmem--omem/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Agent Install (recommended)

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 -g

This works with 44+ AI agents including Claude Code, OpenCode, Cursor, and more. See [Vercel Skills CLI](https://github.com/vercel-labs/skills) for details.

---

<details> <summary><b>Manual Install</b> (without agent assistance)</summary>

1. Get an API Key

**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.

2. Install Plugin

**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"
      }
    }
  }
}

3. Verify

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"

</details>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 21 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "ourmem",
  3. "owner": {
  4. "name": "ourmem",
  5. "email": "hi@ourmem.ai"
  6. },
  7. "metadata": {
  8. "description": "Persistent memory plugins for AI coding agents"
  9. },
  10. "plugins": [
  11. {
  12. "name": "ourmem",
  13. "source": "./plugins/claude-code",
  14. "description": "Persistent memory for Claude Code — memories survive across sessions, projects, and machines",
  15. "version": "0.2.1",
  16. "category": "memory",
  17. "tags": ["memory", "persistent", "agent-memory"],
  18. "homepage": "https://ourmem.ai"
  19. }
  20. ]
  21. }
README.md · README · 508 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <strong>OMEM</strong><br/>
  3. Shared Memory That Never Forgets
  4. </p>
  5. <p align="center">
  6. <a href="https://github.com/ourmem/omem/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License"></a>
  7. <a href="https://ourmem.ai"><img src="https://img.shields.io/badge/hosted-ourmem.ai-green.svg" alt="Hosted"></a>
  8. <a href="https://github.com/ourmem/omem"><img src="https://img.shields.io/github/stars/ourmem/omem?style=social" alt="Stars"></a>
  9. </p>
  10. <p align="center">
  11. <strong>English</strong> | <a href="README_CN.md">简体中文</a>
  12. </p>
  13. ---
  14. ## The Problem
  15. Your AI agents have amnesia — and they work alone.
  16. - 🧠 **Amnesia** — every session starts from zero. Preferences, decisions, context — all gone.
  17. - 🏝️ **Silos** — your Coder agent can't access what your Writer agent learned.
  18. - 📁 **Local lock-in** — memory tied to one machine. Switch devices, lose everything.
  19. - 🚫 **No sharing** — team agents can't share what they know. Every agent re-discovers the same things.
  20. - 🔍 **Dumb recall** — keyword match only. No semantic understanding, no relevance ranking.
  21. - 🧩 **No collective intelligence** — even when agents work on the same team, there's no shared knowledge layer.
  22. **ourmem fixes all of this.**
  23. ## What is ourmem
  24. ourmem gives AI agents shared persistent memory — across sessions, devices, agents, and teams. One API key reconnects everything.
  25. 🌐 **Website:** [ourmem.ai](https://ourmem.ai)
  26. <table>
  27. <tr>
  28. <td width="50%" valign="top">
  29. ### 🧑‍💻 I use AI coding tools
  30. Install the plugin for your platform. Memory works automatically — your agent recalls past context on session start and captures key info on session end.
  31. **→ Jump to [Quick Start](#quick-start)**
  32. </td>
  33. <td width="50%" valign="top">
  34. ### 🔧 I'm building AI products
  35. REST API with 48+ endpoints. Docker one-liner for self-deploy. Embed persistent memory into your own agents and workflows.
  36. **→ Jump to [Self-Deploy](#self-deploy)**
  37. </td>
  38. </tr>
  39. </table>
  40. ## Core Capabilities
  41. <table>
  42. <tr>
  43. <td width="25%" align="center">
  44. <h4>🔗 Shared Across Boundaries</h4>
  45. Three-tier Spaces — Personal, Team, Organization — let knowledge flow across agents and teams with full provenance tracking.
  46. </td>
  47. <td width="25%" align="center">
  48. <h4>🧠 Never Forget</h4>
  49. Weibull decay model manages the memory lifecycle — core memories persist, peripheral ones gracefully fade. No manual cleanup.
  50. </td>
  51. <td width="25%" align="center">
  52. <h4>🔍 Deep Understanding</h4>
  53. 11-stage hybrid retrieval: vector search, BM25, RRF fusion, cross-encoder reranking, and MMR diversity for precise recall.
  54. </td>
  55. <td width="25%" align="center">
  56. <h4>⚡ Smart Evolution</h4>
  57. 7-decision reconciliation — CREATE, MERGE, SUPERSEDE, SUPPORT, CONTEXTUALIZE, CONTRADICT, or SKIP — makes memories smarter over time.
  58. </td>
  59. </tr>
  60. </table>
  61. 📖 **[Memory Pipeline Architecture](docs/PIPELINE.md)** — Technical deep-dive into how ourmem stores, retrieves, and evolves memories.
  62. 🔗 **[Memory Sharing Architecture](docs/SHARING.md)** — How memories flow across agents and teams: sharing, provenance, versioning, and cross-space search.
  63. ## Feature Overview
  64. | Category | Feature | Details |
  65. |----------|---------|---------|
  66. | **Platforms** | 4 platforms | OpenCode, Claude Code, OpenClaw, MCP Server |
  67. | **Sharing** | Space-based sharing | Personal / Team / Organization with provenance |
  68. | | Provenance tracking | Every shared memory carries full lineage |
  69. | | Quality-gated auto-sharing | Rules fire on memory creation (async, non-blocking) |
  70. | | Vector-enabled shared copies | Shared copies carry source vector embeddings for full search |
  71. | | Idempotent sharing | Re-sharing returns existing copy (no duplicates) |
  72. | | Version tracking | Memories track version counter, shared copies detect staleness via `?check_stale=true` |
  73. | | Re-share stale copies | Refresh outdated shared copies with latest source content and vector |
  74. | | Convenience sharing | One-step cross-user share (`share-to-user`) and bulk share (`share-all-to-user`) with auto-bridging |
  75. | | Organization management | One-step org creation (`org/setup`) and publish (`org/publish`) with auto-share rules |
  76. | | Cross-space search | Search across all accessible spaces at once |
  77. | **Ingestion** | Smart dedup | 7 decisions: CREATE, MERGE, SKIP, SUPERSEDE, SUPPORT, CONTEXTUALIZE, CONTRADICT |
  78. | | Noise filter | Regex + vector prototypes + feedback learning |
  79. | | Admission control | 5-dimension scoring gate (utility, confidence, novelty, recency, type prior) |
  80. | | Dual-stream write | Sync fast path (<50ms) + async LLM extraction |
  81. | | Post-import intelligence | Batch import → async LLM re-extraction + relation discovery |
  82. | | Adaptive import strategy | Auto/atomic/section/document — heuristic content type detection |
  83. | | Content fidelity | Original text preserved, dual-path search (vector + BM25 on source text) |
  84. | | Cross-reconcile | Discover relations between memories via vector similarity |
  85. | | Batch self-dedup | LLM deduplicates facts within same import batch |
  86. | | Privacy protection | `<private>` tag redaction before storage |
  87. | **Retrieval** | 11-stage pipeline | Vector + BM25 → RRF → reranker → decay → importance → MMR diversity |
  88. | | User Profile | Static facts + dynamic context, <100ms |
  89. | | Retrieval trace | Per-stage explainability (input/output/score/duration) |
  90. | **Lifecycle** | Weibull decay | Tier-specific β (Core=0.8, Working=1.0, Peripheral=1.3) |
  91. | | Three-tier promotion | Peripheral ↔ Working ↔ Core with access-based promotion |
  92. | | Auto-forgetting | TTL detection for time-sensitive info ("tomorrow", "next week") |
  93. | **Multi-modal** | File processing | PDF, image OCR, video transcription, code AST chunking |
  94. | | GitHub connector | Real-time webhook sync for code, issues, PRs |
  95. | **Deploy** | Open source | Apache-2.0 |
  96. | | Self-hostable | Single binary, Docker one-liner, ~$5/month |
  97. | | musl static build | Zero-dependency binary for any Linux x86_64 |
  98. | | Object storage | AWS S3 or any S3-compatible storage, with IAM role support |
  99. | | Hosted option | ourmem.ai — nothing to deploy |
  100. ## From Isolated Agents to Collective Intelligence
  101. Most AI memory systems trap knowledge in silos. ourmem's three-tier Space architecture enables knowledge flow across agents and teams — with provenance tracking and quality-gated sharing.
  102. > *Research shows collaborative memory reduces redundant work by up to 61% — agents stop re-discovering what their teammates already know.*
  103. > — Collaborative Memory, ICLR 2026
  104. | | Personal | Team | Organization |
  105. |---|----------|------|--------------|
  106. | **Scope** | One user, multiple agents | Multiple users | Company-wide |
  107. | **Example** | Coder + Writer share preferences | Backend team shares arch decisions | Tech standards, security policies |
  108. | **Access** | Owner's agents only | Team members | All org members (read-only) |
  109. **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.
  110. **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.
  111. ## How It Works
  112. ```
  113. ┌──────────────────────────────────────────────────────────────────┐
  114. │ Your AI Agent (OpenCode / Claude Code / OpenClaw / Cursor) │
  115. │ │
  116. │ Session Start → auto-recall relevant memories │
  117. │ During Work → keyword detection triggers recall │
  118. │ Session End → auto-capture decisions, preferences, facts │
  119. └───────────────────────────┬──────────────────────────────────────┘
  120. │ REST API (X-API-Key)
  121. ▼
  122. ┌──────────────────────────────────────────────────────────────────┐
  123. │ ourmem Server │
  124. │ │
  125. │ ┌─ Smart Ingest ─────────────────────────────────────────────┐ │
  126. │ │ Messages → LLM extraction → noise filter → admission │ │
  127. │ │ → 7-decision reconciliation (CREATE / MERGE / SUPERSEDE / │ │
  128. │ │ SUPPORT / CONTEXTUALIZE / CONTRADICT / SKIP) │ │
  129. │ │ → cross-reconcile relations → privacy redaction │ │
  130. │ └────────────────────────────────────────────────────────────┘ │
  131. │ │
  132. │ ┌─ Hybrid Search (11 stages) ────────────────────────────────┐ │
  133. │ │ Vector + BM25 → RRF fusion → cross-encoder reranker │ │
  134. │ │ → Weibull decay boost → importance scoring │ │
  135. │ │ → MMR diversity → parallel cross-space aggregation │ │
  136. │ └────────────────────────────────────────────────────────────┘ │
  137. │ │
  138. │ ┌─ Sharing Engine ───────────────────────────────────────────┐ │
  139. │ │ Personal / Team / Organization spaces │ │
  140. │ │ → provenance tracking → version-based stale detection │ │
  141. │ │ → auto-share rules → one-step share-to-user │ │
  142. │ └────────────────────────────────────────────────────────────┘ │
  143. │ │
  144. │ ┌─ Lifecycle ────────────────────────────────────────────────┐ │
  145. │ │ Weibull decay (Core β=0.8 / Working β=1.0 / Peripheral │ │
  146. │ │ β=1.3) → 3-tier promotion → auto-forgetting TTL │ │
  147. │ └────────────────────────────────────────────────────────────┘ │
  148. └──────────────────────────────────────────────────────────────────┘
  149. ```
  150. - **Write once, recall everywhere** — memories persist across sessions, devices, and agents
  151. - **Gets smarter over time** — reconciliation merges, updates, and contradicts memories automatically
  152. - **Share across boundaries** — Personal → Team → Organization knowledge flow with full provenance
  153. - **No manual memory management** — Weibull decay handles lifecycle, auto-share rules handle distribution
  154. ## Key Concepts
  155. ### API Key = Tenant ID = Your Identity
  156. When you create a tenant, the returned `id` **is** your API Key. They're the same UUID. There is no separate "tenant ID".
  157. ```bash
  158. curl -X POST https://api.ourmem.ai/v1/tenants -d '{"name": "alice"}'
  159. # → {"id": "a1b2c3d4-...", "api_key": "a1b2c3d4-...", "status": "active"}
  160. # ↑ same value ↑
  161. ```
  162. ### API Key vs Space ID
  163. | Concept | What it is | Example | How many |
  164. |---------|-----------|---------|----------|
  165. | **API Key** | Your identity. Goes in `X-API-Key` header. | `a1b2c3d4-...` | 1 per user |
  166. | **Space ID** | A memory storage address. Each is an isolated database. | `personal/a1b2c3d4-...` | Multiple per user |
  167. One API Key owns multiple Spaces:
  168. ```
  169. API Key "a1b2c3d4"
  170. │
  171. ├── personal/a1b2c3d4 ← auto-created, your private memories
  172. ├── team/e5f6g7h8 ← team space you created (you = Admin)
  173. ├── team/i9j0k1l2 ← team space you were invited to (you = Member)
  174. └── org/m3n4o5p6 ← organization you joined (you = Reader)
  175. ```
  176. ### Sharing = Passing Your API Key
  177. To share memories with another user, you pass their API Key as `target_user`:
  178. ```bash
  179. # Share all your preferences to user Bob
  180. curl -X POST https://api.ourmem.ai/v1/memories/share-all-to-user \
  181. -H "X-API-Key: your-api-key" \
  182. -d '{"target_user": "bobs-api-key", "filters": {"categories": ["preference"]}}'
  183. ```
  184. The system automatically creates a bridging Team Space between you and Bob. No manual space management needed.
  185. ## Quick Start
  186. ### Agent Install (recommended)
  187. One message to your AI agent. It handles everything — API key, plugin install, config, verification.
  188. **Hosted (ourmem.ai — nothing to deploy):**
  189. | Platform | Copy this to your agent |
  190. |----------|------------------------|
  191. | **OpenClaw** | `Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for OpenClaw` |
  192. | **Claude Code** | `Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for Claude Code` |
  193. | **OpenCode** | `Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem for OpenCode` |
  194. | **Cursor / VS Code** | `Read https://ourmem.ai/SKILL.md and follow the instructions to install and configure ourmem as MCP Server` |
  195. **Self-hosted (your own server):**
  196. | Platform | How to install |
  197. |----------|---------------|
  198. | **OpenClaw** | Run `openclaw skills install ourmem`, then tell your agent: `setup ourmem in self-hosted mode` |
  199. | **Claude Code** | `Read https://raw.githubusercontent.com/ourmem/omem/main/skills/ourmem/SKILL.md and install ourmem for Claude Code, self-hosted mode` |
  200. | **OpenCode** | `Read https://raw.githubusercontent.com/ourmem/omem/main/skills/ourmem/SKILL.md and install ourmem for OpenCode, self-hosted mode` |
  201. That's it. Your agent handles the rest.
  202. **Skill Install (alternative):**
  203. If you prefer CLI installation, install the ourmem skill directly:
  204. ```bash
  205. npx skills add ourmem/omem --skill ourmem -g
  206. ```
  207. This works with 44+ AI agents including Claude Code, OpenCode, Cursor, and more. See [Vercel Skills CLI](https://github.com/vercel-labs/skills) for details.
  208. ---
  209. <details>
  210. <summary><b>Manual Install</b> (without agent assistance)</summary>
  211. ### 1. Get an API Key
  212. **Hosted:**
  213. ```bash
  214. curl -sX POST https://api.ourmem.ai/v1/tenants \
  215. -H "Content-Type: application/json" \
  216. -d '{"name": "my-workspace"}' | jq .
  217. # → {"id": "xxx", "api_key": "xxx", "status": "active"}
  218. ```
  219. **Self-deploy:**
  220. ```bash
  221. docker run -d -p 8080:8080 -e OMEM_EMBED_PROVIDER=bedrock ghcr.io/ourmem/omem-server:latest
  222. curl -sX POST http://localhost:8080/v1/tenants \
  223. -H "Content-Type: application/json" \
  224. -d '{"name": "my-workspace"}' | jq .
  225. ```
  226. Save the returned `api_key` — this reconnects you to the same memory from any machine.
  227. ### 2. Install Plugin
  228. **OpenCode:** Add `"plugin": ["@ourmem/opencode"]` to `opencode.json` + configure `plugin_config` with `apiUrl` and `apiKey` in the same file.
  229. **Claude Code:** `/plugin marketplace add ourmem/omem` + set env vars in `~/.claude/settings.json`.
  230. **OpenClaw:** `openclaw plugins install @ourmem/ourmem` + configure `openclaw.json` with apiUrl and apiKey.
  231. **MCP (Cursor / VS Code / Claude Desktop):**
  232. ```json
  233. {
  234. "mcpServers": {
  235. "ourmem": {
  236. "command": "npx",
  237. "args": ["-y", "@ourmem/mcp"],
  238. "env": {
  239. "OMEM_API_URL": "https://api.ourmem.ai",
  240. "OMEM_API_KEY": "your-api-key"
  241. }
  242. }
  243. }
  244. }
  245. ```
  246. ### 3. Verify
  247. ```bash
  248. curl -sX POST "$OMEM_API_URL/v1/memories" \
  249. -H "X-API-Key: $OMEM_API_KEY" -H "Content-Type: application/json" \
  250. -d '{"content": "I prefer dark mode", "tags": ["preference"]}'
  251. curl -s "$OMEM_API_URL/v1/memories/search?q=dark+mode" -H "X-API-Key: $OMEM_API_KEY"
  252. ```
  253. </details>
  254. ## What Your Agent Gets
  255. ### Memory Tools
  256. | Tool | Purpose |
  257. |------|---------|
  258. | `memory_store` | Save facts, decisions, preferences with smart dedup |
  259. | `memory_search` | 11-stage hybrid search (vector + BM25 + reranker) |
  260. | `memory_get` | Retrieve a specific memory by ID |
  261. | `memory_update` | Modify content, tags, importance, tier |
  262. | `memory_delete` | Remove a memory |
  263. | `memory_list` | Browse memories with filters and pagination |
  264. | `memory_ingest` | Smart-ingest full conversations (LLM extraction) |
  265. | `memory_profile` | Auto-generated user profile (static facts + dynamic context) |
  266. | `memory_stats` | Analytics: tag distribution, decay curves, relation graphs |
  267. ### Sharing Tools
  268. | Tool | Purpose |
  269. |------|---------|
  270. | `space_create` | Create Team or Organization spaces |
  271. | `space_list` | List all accessible spaces |
  272. | `space_add_member` | Invite users to a shared space |
  273. | `memory_share` | Share a memory to any space with provenance |
  274. | `memory_pull` | Pull a shared memory into your personal space |
  275. | `memory_reshare` | Refresh stale shared copies with latest content |
  276. > **Convenience APIs:** `share-to-user` (one-step cross-user share with auto-bridging) and `share-all-to-user` (bulk share). MCP exposes 15 tools + 1 resource. OpenCode/OpenClaw expose 11 tools + 3 hooks.
  277. ### Smart Hooks
  278. | Hook | Trigger | What Happens |
  279. |------|---------|--------------|
  280. | **SessionStart** | New session begins | Recent memories + user profile auto-injected into context |
  281. | **KeywordRecall** | Keyword detected mid-session | Relevant memories surfaced without explicit search |
  282. | **SessionEnd** | Session ends | Key decisions, preferences, and facts auto-captured |
  283. | **Compaction** | Context window compressed | Critical memories preserved across compaction boundaries |
  284. ## Memory Space
  285. Browse, search, and manage your agent's memories visually at **[ourmem.ai/space](https://ourmem.ai/space)** — see how memories connect, evolve, and decay over time.
  286. ## Security & Privacy
  287. | | |
  288. |---|---|
  289. | **Rust Memory Safety** | No garbage collector, no data races. Ownership model guarantees safety at compile time. |
  290. | **Tenant Isolation** | X-API-Key auth with query-level tenant filtering. Every operation verifies ownership. |
  291. | **Privacy Protection** | `<private>` tag redaction strips sensitive content before storage. |
  292. | **Encryption** | HTTPS for all API transit. Server-side encryption at rest on S3. |
  293. | **Admission Control** | 5-dimension scoring gate rejects low-quality data before storage. |
  294. | **Open Source Auditable** | Apache-2.0 licensed. Audit every line, fork it, run your own instance. |
  295. ## Self-Deploy
  296. ```bash
  297. # Minimal (BM25 search only, no embedding API needed)
  298. docker run -d -p 8080:8080 ghcr.io/ourmem/omem-server:latest
  299. # With Bedrock embedding (recommended, needs AWS credentials)
  300. docker run -d -p 8080:8080 \
  301. -e OMEM_EMBED_PROVIDER=bedrock \
  302. -e AWS_REGION=us-east-1 \
  303. ghcr.io/ourmem/omem-server:latest
  304. # With OpenAI-compatible embedding
  305. docker run -d -p 8080:8080 \
  306. -e OMEM_EMBED_PROVIDER=openai-compatible \
  307. -e OMEM_EMBED_API_KEY=sk-xxx \
  308. ghcr.io/ourmem/omem-server:latest
  309. ```
  310. Full deployment guide: [docs/DEPLOY.md](docs/DEPLOY.md)
  311. ### Object Storage (Optional)
  312. By default ourmem stores data on local disk. For durability and scalability, configure AWS S3 or any S3-compatible object storage:
  313. ```bash
  314. # Add to your environment
  315. OMEM_S3_BUCKET=your-bucket # enables s3:// scheme
  316. AWS_ENDPOINT_URL=https://s3.amazonaws.com
  317. AWS_REGION=us-east-1
  318. # Alternative: OSS-compatible storage
  319. OMEM_OSS_BUCKET=your-bucket # enables oss:// scheme
  320. OSS_ENDPOINT=https://oss-xx-internal.aliyuncs.com
  321. OSS_ACCESS_KEY_ID=your-ak # or use ECS RAM role (auto-discovered)
  322. OSS_ACCESS_KEY_SECRET=your-sk
  323. ```
  324. > If both `OMEM_S3_BUCKET` and `OMEM_OSS_BUCKET` are set, OSS takes priority.
  325. ## Build from Source
  326. ### Two build modes
  327. | Mode | Command | Binary | Bedrock | Runs on |
  328. |------|---------|--------|---------|---------|
  329. | **glibc (full)** | `cargo build --release` | Dynamic linked, ~218MB | ✅ AWS Bedrock | Same glibc version as build host |
  330. | **musl (portable)** | See below | Static linked, ~182MB | ❌ OpenAI-compatible only | **Any Linux x86_64** |
  331. ### glibc build (with Bedrock support)
  332. ```bash
  333. cargo build --release -p omem-server
  334. # Binary: target/release/omem-server
  335. # Requires: same or newer glibc on target machine
  336. ```
  337. ### musl static build (portable, zero dependencies)
  338. Single binary that runs on **any Linux x86_64** — no glibc, no libraries, nothing.
  339. ```bash
  340. rustup target add x86_64-unknown-linux-musl
  341. RUSTFLAGS="-C target-feature=+crt-static -C relocation-model=static" \
  342. cargo build --release --target x86_64-unknown-linux-musl \
  343. -p omem-server --no-default-features
  344. # Binary: target/x86_64-unknown-linux-musl/release/omem-server
  345. # Statically linked, runs anywhere
  346. ```
  347. > **Note:** The musl build uses `--no-default-features` which excludes AWS Bedrock support. Use `OMEM_EMBED_PROVIDER=openai-compatible` (e.g. DashScope, OpenAI) instead. This is because `aws-lc-sys` (AWS crypto library) crashes on musl static linking due to `dlopen(NULL)` incompatibility ([aws-c-cal#213](https://github.com/awslabs/aws-c-cal/issues/213)), and Rust's default `static-pie` output segfaults with musl-gcc ([rust-lang/rust#95926](https://github.com/rust-lang/rust/issues/95926)).
  348. ### Transfer to any server
  349. ```bash
  350. # Compress
  351. gzip -c target/x86_64-unknown-linux-musl/release/omem-server > omem-server.gz
  352. # Copy to server
  353. scp omem-server.gz user@server:/opt/
  354. # Run (no dependencies needed)
  355. ssh user@server "gunzip /opt/omem-server.gz && chmod +x /opt/omem-server && /opt/omem-server"
  356. ```
  357. ## API at a Glance
  358. | Method | Endpoint | Description |
  359. |--------|----------|-------------|
  360. | POST | `/v1/tenants` | Create workspace & get API key |
  361. | POST | `/v1/memories` | Store memory or smart-ingest conversation |
  362. | GET | `/v1/memories/search` | 11-stage hybrid search |
  363. | GET | `/v1/memories` | List with filters & pagination |
  364. | GET | `/v1/profile` | Auto-generated user profile |
  365. | POST | `/v1/spaces` | Create shared space |
  366. | POST | `/v1/memories/:id/share` | Share memory to a space |
  367. | POST | `/v1/files` | Upload PDF / image / video / code |
  368. | GET | `/v1/stats` | Analytics & insights |
  369. Full API reference (48+ endpoints): [docs/API.md](docs/API.md)
  370. ## Documentation
  371. | Document | Description |
  372. |----------|-------------|
  373. | [docs/API.md](docs/API.md) | Complete REST API reference |
  374. | [docs/PIPELINE.md](docs/PIPELINE.md) | Memory pipeline architecture — storage, retrieval, and plugin integration flows |
  375. | [docs/SHARING.md](docs/SHARING.md) | Memory sharing architecture, flows, and tutorials |
  376. | [docs/DEPLOY.md](docs/DEPLOY.md) | Docker & AWS deployment guide |
  377. | [docs/PLUGINS.md](docs/PLUGINS.md) | Plugin installation for all 4 platforms |
  378. | [docs/TWEETCLAW_OPENCLAW.md](docs/TWEETCLAW_OPENCLAW.md) | OpenClaw workflow for storing TweetClaw X/Twitter research decisions in ourmem |
  379. | [skills/ourmem/SKILL.md](skills/ourmem/SKILL.md) | AI agent onboarding skill |
  380. ## License
  381. Apache-2.0
  382. ---
  383. <p align="center">
  384. <strong>Shared Memory That Never Forgets.</strong><br/>
  385. <a href="https://ourmem.ai">ourmem.ai</a> · <a href="https://github.com/ourmem/omem">GitHub</a>
  386. </p>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.