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 hivemind
Send a message. The plugin sends you an auth link. Click, sign in, done.
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:
DEEPLAKE_CAPTURE=false claudeEnable debug logging:
DEEPLAKE_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 |
|---|---|---|
DEEPLAKE_TOKEN |
β | API token (auto-set by login) |
DEEPLAKE_ORG_ID |
β | Organization ID (auto-set by login) |
DEEPLAKE_WORKSPACE_ID |
default |
Workspace name |
DEEPLAKE_API_URL |
https://api.deeplake.ai |
API endpoint |
DEEPLAKE_TABLE |
memory |
SQL table for summaries and virtual FS |
DEEPLAKE_SESSIONS_TABLE |
sessions |
SQL table for per-event session capture |
DEEPLAKE_MEMORY_PATH |
~/.deeplake/memory |
Path that triggers interception |
DEEPLAKE_CAPTURE |
true |
Set to false to disable capture |
DEEPLAKE_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
DEEPLAKE_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.