Persistent, cloud-backed shared memory for Claude Code • OpenClaw • Codex agents.
One session ends, everything important disappears.
Hivemind finally fixes the "agent amnesia" problem.
Hivemind automatically captures every prompt, tool call, decision, and file operation. Then turns them into searchable memory that is instantly available to every agent and teammate across sessions, machines, and time.
- 🧠 Captures every session's prompts, tool calls, and responses into a shared SQL table on Deeplake Cloud
- 🔍 Searches across all memory with lexical search (falls back to grep when index unavailable)
- 🔗 Shares memory across sessions, agents, teammates, and machines in real-time
- 📁 Intercepts file operations on
~/.deeplake/memory/through a virtual filesystem backed by SQL - 📝 Summarizes sessions into AI-generated wiki pages via a background worker at session end
| Platform | Status | Install |
|---|---|---|
| Claude Code | ✅ Stable | See Quick start |
| OpenClaw | 🔧 Beta | See Quick start |
| Codex | 🔧 Beta | See Quick start |
Add the marketplace:
/plugin marketplace add activeloopai/hivemind
Install the plugin:
/plugin install hivemind
Reload plugins:
/reload-plugins
Log in:
/hivemind:login
That's it. Your agents now share a brain.
The plugin auto-updates on each session start. To manually update:
/hivemind:update
OpenClaw Setup
openclaw plugins install clawhub:hivemind
Then type /hivemind_login in chat, click the auth link, and sign in.
| Command | Description |
|---|---|
/hivemind_login |
Sign in via device flow |
/hivemind_capture |
Toggle capture on/off |
/hivemind_whoami |
Show current org and workspace |
/hivemind_orgs |
List organizations |
/hivemind_switch_org <name> |
Switch organization |
/hivemind_workspaces |
List workspaces |
/hivemind_switch_workspace <id> |
Switch workspace |
/hivemind_update |
Check for plugin updates |
Auto-recall and auto-capture are enabled by default. Data is stored in the same sessions table as Claude Code and Codex.
Hivemind runs alongside OpenClaw's built-in memory-core plugin. It does not claim the memory slot, so memory-core's dreaming cron ("0 3 * * *") and other memory-slot-dependent jobs keep working. Hivemind captures session activity and exposes its own commands; memory-core keeps owning recall/promotion/dreaming.
- Hivemind seems slow or unresponsive. Check the agent model in
~/.openclaw/openclaw.jsonunderagents.defaults.model. Hivemind makes many small tool calls per turn; a large reasoning model like Opus will feel sluggish. Recommended default:anthropic/claude-haiku-4-5-20251001. openclaw model <id>says "plugins.allow excludes model". Themodelplugin CLI is disabled by default. Edit~/.openclaw/openclaw.jsondirectly (keyagents.defaults.model) and restart the gateway:systemctl --user restart openclaw-gateway.service.- Model switch rejected as "not allowed". Use the exact dated provider-prefixed ID (
anthropic/claude-haiku-4-5-20251001,anthropic/claude-sonnet-4-6). Legacy IDs likeclaude-3-5-haiku-latestand unprefixed bare IDs are not on OpenClaw's allowlist. - Self-update via Telegram fails with "elevated is not available".
tools.elevated.allowFrommust includetelegrambefore elevated commands work from that channel. Safer alternative: run the upgrade in a local shell withopenclaw plugins update hivemind. npm error EACCESduring self-update. OpenClaw was installed under a root-owned npm prefix (e.g./usr/lib/node_modules/openclaw). Reinstall under a user-writable prefix, or run the update with appropriate privileges locally — not via a channel.
Codex Setup
Fetch and follow instructions from https://raw.githubusercontent.com/activeloopai/hivemind/main/codex/INSTALL.md
Or install manually:
git clone https://github.com/activeloopai/hivemind.git ~/.codex/hivemind
~/.codex/hivemind/codex/install.shRestart Codex (quit and relaunch the CLI) to activate.
Log in when prompted, or run manually:
node ~/.codex/hivemind/codex/bundle/commands/auth-login.js logincd ~/.codex/hivemind && git pullHooks and skills update instantly — restart Codex to apply.
rm -f ~/.codex/hooks.json ~/.agents/skills/hivemind-memory
rm -rf ~/.codex/hivemind┌─────────────────────────────────────────────────────┐
│ Your Coding Agent │
└──────────────────────────┬──────────────────────────┘
│
┌──────────────────▼──────────────────┐
│ 📥 Capture (every turn) │
│ prompts · tool calls · responses │
└──────────────────┬──────────────────┘
│
┌──────────────────▼──────────────────┐
│ 🧠 Hivemind │
│ SQL tables · Virtual File System │
│ Search Memory · inject context │
└──────────────────┬──────────────────┘
│
┌──────────────────▼──────────────────┐
│ 🌊 Deeplake │
│ Shared across all agents │
│ Postgres · S3 │
└─────────────────────────────────────┘
Every session is captured. Every agent can recall. Teammates in the same org see the same memory.
Just ask Claude naturally:
"What was Emanuele working on?"
"Search memory for authentication bugs"
"What did we decide about the API design?"
After each session, a background worker generates a wiki summary: key decisions, code changes, next steps. Browse them at ~/.deeplake/memory/summaries/.
Invite teammates to your Deeplake org. Their agents see your memory, your agents see theirs. No setup, no sync, no merge conflicts.
Disable capture entirely:
HIVEMIND_CAPTURE=false claudeEnable debug logging:
HIVEMIND_DEBUG=1 claudeThis plugin captures session activity and stores it in your Deeplake workspace:
| Data | What's captured |
|---|---|
| User prompts | Every message you send |
| Tool calls | Tool name + full input |
| Tool responses | Full tool output |
| Assistant responses | Claude's final response |
| Subagent activity | Subagent tool calls and responses |
All users in your Deeplake workspace can read this data. A DATA NOTICE is displayed at the start of every session.
| Variable | Default | Description |
|---|---|---|
HIVEMIND_TOKEN |
— | API token (auto-set by login) |
HIVEMIND_ORG_ID |
— | Organization ID (auto-set by login) |
HIVEMIND_WORKSPACE_ID |
default |
Workspace name |
HIVEMIND_API_URL |
https://api.deeplake.ai |
API endpoint |
HIVEMIND_TABLE |
memory |
SQL table for summaries and virtual FS |
HIVEMIND_SESSIONS_TABLE |
sessions |
SQL table for per-event session capture |
HIVEMIND_MEMORY_PATH |
~/.deeplake/memory |
Path that triggers interception |
HIVEMIND_CAPTURE |
true |
Set to false to disable capture |
HIVEMIND_DEBUG |
— | Set to 1 for verbose hook debug logs |
| Hook | Purpose | Async |
|---|---|---|
SessionStart |
Auth login, inject context, DATA NOTICE | No |
UserPromptSubmit |
Capture user message | No |
PreToolUse |
Intercept and rewrite memory-targeting commands | No |
PostToolUse |
Capture tool call + response | Yes |
Stop |
Capture assistant response | No |
SubagentStop |
Capture subagent activity | Yes |
SessionEnd |
Spawn wiki-worker for AI summary | No |
hivemind/
├── src/ ← shared core (API client, auth, config, SQL utils)
├── claude-code/ ← Claude Code plugin (hooks, virtual FS, shell)
├── openclaw/ ← OpenClaw plugin (auto-recall, auto-capture)
└── codex/ ← Codex CLI plugin (hooks, block+inject interception)
- SQL values escaped with
sqlStr(),sqlLike(),sqlIdent() - ~70 allowlisted builtins run in the virtual FS; unrecognized commands are denied
- Credentials stored with mode
0600, config dir with mode0700 - Device flow login: no tokens in environment or code
HIVEMIND_CAPTURE=falsefully disables data collection
git clone https://github.com/activeloopai/hivemind.git
cd hivemind
npm install
npm run build # tsc + esbuild → claude-code/bundle/ + codex/bundle/ + openclaw/dist/
npm test # vitestTest locally with Claude Code:
claude --plugin-dir claude-codeInteractive shell against Deeplake:
npm run shellApache License 2.0 — © Activeloop, Inc. See LICENSE for details.