---
name: OurMem Bootstrap
slug: ourmem-bootstrap
category: AI Engineering
description: OurMem Bootstrap installs the ourmem/omem plugin, creates an API key, and sets up the ourmem skill. Use it once to connect a client, then the installed skill handles ongoing memory workflows.
github: "https://github.com/ourmem/omem/tree/main/docs/bootstrap-skill.md"
language: Rust
stars: 172
forks: 8
install: "npx degit https://github.com/ourmem/omem/tree/main/docs ~/.claude/skills/docs"
installs_to: ~/.claude/skills/docs
source_path: docs/bootstrap-skill.md
collection_size: 4
category_size: 3475
collection_url: "https://dirskills.com/collections/ourmem/omem"
added: 2026-09-07T05:22:16.272Z
last_synced: 2026-09-07T05:22:16.272Z
canonical_url: "https://dirskills.com/skills/ourmem-bootstrap"
---

# OurMem Bootstrap

OurMem Bootstrap installs the ourmem/omem plugin, creates an API key, and sets up the ourmem skill. Use it once to connect a client, then the installed skill handles ongoing memory workflows.

**Install:**

```bash
npx degit https://github.com/ourmem/omem/tree/main/docs ~/.claude/skills/docs
```

## README

> **Already installed?** If ourmem is already installed and working, you don't need this document. Your installed ourmem skill has all the operational knowledge (sharing, import, analytics, etc.).

# ourmem (omem) Bootstrap Installer

ourmem gives AI agents shared persistent memory across sessions, devices, agents, and teams. This guide installs everything in ~2 minutes.

## Step 0: Choose Mode

Ask the user before doing anything:

> How would you like to set up ourmem?
> 1. **Hosted** (api.ourmem.ai) — nothing to deploy, start immediately
> 2. **Self-hosted** — your own server, data stays local
>
> Already have an API key? Paste it and I'll reconnect you.

**If reconnecting**, verify the existing key first:

```bash
curl -sf -H "X-API-Key: $API_KEY" "https://api.ourmem.ai/v1/memories?limit=1" && echo "OK" || echo "UNREACHABLE"
```

- `OK` → Skip to Step 2.  `UNREACHABLE` → Double-check the key or create a new one.

## Step 1: Create API Key

```bash
# Hosted:
curl -sX POST https://api.ourmem.ai/v1/tenants \
  -H "Content-Type: application/json" -d '{"name": "my-workspace"}' | jq .

# Self-hosted (replace URL with your server):
curl -sX POST http://localhost:8080/v1/tenants \
  -H "Content-Type: application/json" -d '{"name": "my-workspace"}' | jq .

# → {"id": "xxx", "api_key": "xxx", "status": "active"}
```

Save the `api_key` value. This key reconnects you from any machine.

## Step 2: Detect Platform & Install Plugin

Auto-detect — do NOT ask the user to pick:

1. `claude` CLI in PATH or Claude Code session → **Claude Code**
2. `opencode.json` in project root → **OpenCode**
3. `openclaw.json` in project root → **OpenClaw**
4. Otherwise → **MCP** (Cursor, VS Code, Claude Desktop)

### Claude Code

```
/plugin marketplace add ourmem/omem
/plugin install ourmem@ourmem
```

### OpenCode

Add to `opencode.json` (create if needed):

```bash
jq '.plugin = ((.plugin // []) + ["@ourmem/opencode"] | unique)' opencode.json > tmp.json && mv tmp.json opencode.json
```

Write API credentials to `opencode.json` via `plugin_config`:

```bash
jq --arg url "$API_URL" --arg key "$API_KEY" '.plugin_config["@ourmem/opencode"] = {apiUrl: $url, apiKey: $key}' opencode.json > tmp.json && mv tmp.json opencode.json
```

### OpenClaw

Detect npm registry (China/Alibaba networks may need mirror):

```bash
NPMJS_TIME="$(curl -o /dev/null -sS --connect-timeout 2 --max-time 6 -w '%{time_total}' https://registry.npmjs.org/@ourmem%2fourmem || echo timeout)"
MIRROR_TIME="$(curl -o /dev/null -sS --connect-timeout 2 --max-time 6 -w '%{time_total}' https://registry.npmmirror.com/@ourmem%2fourmem || echo timeout)"
if [ "$MIRROR_TIME" != "timeout" ] && { [ "$NPMJS_TIME" = "timeout" ] || awk "BEGIN { exit !($NPMJS_TIME > 2 && $MIRROR_TIME < $NPMJS_TIME) }"; }; then
  NPM_CONFIG_REGISTRY=https://registry.npmmirror.com openclaw plugins install @ourmem/ourmem
else
  openclaw plugins install @ourmem/ourmem
fi
```

Then configure `openclaw.json` with apiUrl + apiKey (see `references/hosted-setup.md` for full JSON).

### MCP (Cursor / VS Code / Claude Desktop)

Add to the client's MCP config:

```json
{
  "mcpServers": {
    "ourmem": {
      "command": "npx", "args": ["-y", "@ourmem/mcp"],
      "env": { "OMEM_API_KEY": "<your-api-key>", "OMEM_API_URL": "https://api.ourmem.ai" }
    }
  }
}
```

## Step 3: Install the ourmem Skill

The skill provides all operational knowledge (sharing, import, analytics, etc.).

| Platform | Command |
|----------|---------|
| OpenClaw | `openclaw skills install ourmem` |
| All others | `npx skills add ourmem/omem --skill ourmem -g` |

**Claude Code symlink workaround:** If the skill is not visible after restart:

```bash
ln -s ~/.agents/skills/ourmem ~/.claude/skills/ourmem
```

**Verify skill installation (do this yourself, don't ask the user):**

Check that `SKILL.md` exists in at least one of these paths:
- `~/.agents/skills/ourmem/SKILL.md`
- `~/.claude/skills/ourmem/SKILL.md`
- `~/.openclaw/skills/ourmem/SKILL.md`

If none exist, the installation failed. Retry the install command above. For Claude Code, also try the symlink workaround.

## Step 4: Configure Credentials

**OpenCode**: Already configured in Step 2 via `plugin_config` in `opencode.json`. No extra step needed.

**OpenClaw**: Already configured in Step 2 via `openclaw.json`. No extra step needed.

**MCP (Cursor / VS Code / Claude Desktop)**: Already configured in Step 2 via MCP config `env` block. No extra step needed.

**Claude Code**: Write env vars to `~/.claude/settings.json` (Claude Code's native config):

```bash
python3 -c "
import json, os
p = os.path.expanduser('~/.claude/settings.json')
try: d = json.load(open(p))
except: d = {}
d.setdefault('env', {})
d['env']['OMEM_API_KEY'] = '$API_KEY'
d['env']['OMEM_API_URL'] = '$API_URL'
json.dump(d, open(p, 'w'), indent=2)
"
```

> **Fallback:** If you prefer shell environment variables, you can also `export OMEM_API_KEY=...` and `export OMEM_API_URL=...` in `~/.bashrc` as an alternative.

## Step 5: Restart & Verify

Restart your client (Claude Code, OpenCode, OpenClaw gateway, or MCP app), then verify:

```bash
curl -sf https://api.ourmem.ai/health && echo "Server OK"
curl -sf -H "X-API-Key: $OMEM_API_KEY" "https://api.ourmem.ai/v1/memories?limit=1" && echo "Auth OK"
```

Both must pass. Empty results are normal for new keys.

## Step 6: Handoff

After successful setup, send this structured message to the user. Translate into the user's language. Do not skip any section.

```
ourmem is ready.

WHAT YOU CAN DO NOW
1. Import your existing memories (recommended)
   Say: "import memories to ourmem"
2. Just talk normally. I'll automatically remember important things.
3. Say "remember: [something]" to explicitly save a fact.
4. Say "create a team space" to share memories between agents.

YOUR OURMEM API KEY
  API Key: <your-api-key>
  Server:  https://api.ourmem.ai
This API key is your access key to ourmem.
Keep it private and store it somewhere safe.

RECOVERY
Reinstall the plugin with the same API key. Your memory reconnects instantly.

BACKUP PLAN
Keep your original local memory/session files as backup.
Store the API key in a password manager or secure vault.
On a new machine: reinstall the plugin, configure the same API key, done.
```

Your ourmem skill is now installed. When you need to share memories, import data, or check analytics, just ask — the skill will guide you.

## Communication Style

- Brand: **ourmem** or **omem** (both lowercase). Domain: ourmem.ai, API: api.ourmem.ai.
- Prefer "API key" with users. Treat it like a secret.
- Use the user's language (detect from conversation).
- Capitalize "Space" and "Smart Ingest" when referring to ourmem features.
