Nov 12, 2026

Hivemind: Give Every Agent on Your Team the Same Memory

Hivemind captures every coding-agent session as structured traces, mines repeated patterns into reusable SKILL.md skills, and shares them across Claude Code, Codex, Cursor, OpenClaw, Hermes and pi in real time.

#tutorial#ai-agents#context-engineering

Your senior engineer's agent solves a tricky migration on Monday. On Tuesday, the rest of the team's agents start from zero. Hivemind — a 2k-star, Apache-2.0 project built and maintained by Activeloop, the open-source team behind Deeplake — is built to close that gap: it captures every agent session as structured traces, codifies repeated patterns into SKILL.md files, and propagates them to every connected agent in real time.

Why This Skill Matters

Most agent memory tools remember for one assistant on one machine. Hivemind is a cloud-backed shared brain for Claude Code, OpenClaw, Codex, Cursor, Hermes, pi, and Claude Cowork (Alpha) — the README's own pitch is "One brain for all your agents." On the public LoCoMo long-context memory benchmark (100 QA pairs, Claude Haiku via claude -p, hybrid lexical + semantic retrieval), the README reports 25% lower cost ($8.94 → $6.65 per 100 QA), 1.7× fewer tokens (1,700 → 1,008 per question), and 31% fewer turns (8.9 → 6.2) than a no-memory baseline.

The pipeline is Capture → Codify → Propagate → Compound: a background worker mines traces for repeated patterns, writes them as skills scoped to your workspace, and injects them into every connected agent's context at inference time.

Installation

One command covers all detected assistants (macOS / Linux):

curl -fsSL https://deeplake.ai/hivemind.sh | sh

On Windows (PowerShell): irm https://deeplake.ai/hivemind.ps1 | iex. Where policy blocks piping a script to a shell, use npm — note it skips the checks the installers run, so Node 22+ and a writable npm prefix are on you:

npm i -g @deeplake/hivemind && hivemind install

The installer detects the assistants on your machine, wires their hooks, shows a one-line consent prompt, then opens a browser for sign-in. Restart your assistants afterwards. For headless or CI machines, pass a token (HIVEMIND_TOKEN=<your-token> hivemind install); without one in a non-interactive shell, install completes with hooks but skips sign-in. To wire a single assistant: hivemind install --only claude, or hivemind codex install, hivemind cursor install, and so on. hivemind status reports what is wired up.

Claude Code users can alternatively go through the plugin marketplace:

/plugin marketplace add activeloopai/hivemind
/plugin install hivemind
/reload-plugins
/hivemind:login

One Codex-specific step the README calls out: on first launch Codex shows a "Hooks need review" prompt — choose 2. Trust all and continue, otherwise the hooks never run and Hivemind stays inactive.

Real Workflow: Let a Team Share One Brain

After install, capture and recall run by themselves — every prompt, tool call, and response lands in your Deeplake workspace as a structured trace, and relevant memory is recalled into context automatically. The work you do is asking questions naturally:

"What was Emanuele working on?"
"Search traces for authentication bugs we've solved"
"What did we decide about the API design?"
"Show me skills my team has codified for handling migrations"

Codification is tunable rather than fixed: HIVEMIND_SKILLIFY_EVERY_N_TURNS (default 20) sets how many assistant turns pass between automatic skill-mining attempts — lower mines more often but noisier, higher means fewer attempts on longer histories. Session summaries run every 50 captured events (HIVEMIND_SUMMARY_EVERY_N_MSGS) or every 2 hours when new events arrived (HIVEMIND_SUMMARY_EVERY_HOURS).

What Gets Captured — Read This Before Installing

The README's data-collection table is explicit: user prompts (every message), tool calls (name + full input), tool responses (full output), assistant responses, subagent activity, and codified skills all land in your Deeplake workspace — and all users in that workspace can read this data. The README's own framing: that is the design; shared capability requires shared substrate. A data notice is displayed at the start of every session.

The escape hatches are concrete. HIVEMIND_CAPTURE=false claude disables capture entirely; a .hivemind file containing { "collect": false } turns Hivemind off for one directory tree (persistent, travels with the repo); HIVEMIND_CAPTURE_ONLY_CLI=true skips sessions spawned through the Claude Agent SDK. Uninstalling is per-assistant or global: hivemind uninstall, or hivemind codex uninstall.

Two integration boundaries worth knowing before you rely on it: Claude Cowork is Alpha — auto-recall is solid, but auto-capture covers Local Agent Mode sessions only, because plain desktop-chat turns leave no readable local transcript. And Codex's hooks are what make capture work there, so an untrusted-hooks install is an inactive install.

Tips

  • Prefer a fast model as the default agent model where the integration is hook-heavy; the OpenClaw troubleshooting notes that Hivemind makes many small tool calls per turn and a large reasoning model feels sluggish.
  • Use hivemind workspaces and HIVEMIND_WORKSPACE_ID to separate team memory from personal memory; workspace-level isolation prevents leakage between orgs.
  • BYOC is documented: point storage at your own GCS, Azure, S3, or on-prem bucket to keep trace data in your own infrastructure.
  • The pi integration reads skills from the shared ~/.agents/skills/ location too — if the Codex installer ran on the same machine, pi picks up the Hivemind memory skill from there automatically.

When Not to Use This

If your agents handle secrets you cannot store in a shared workspace, the capture table is disqualifying as-is: full tool inputs and outputs are recorded by default, and turning capture off removes the memory benefit along with it. Solo users who never revisit past sessions get less out of the propagation loop than a team does. And if you need guaranteed capture of Claude Desktop's plain chat turns (not Local Agent Mode), the README documents no readable trace for them today.


See the leaderboard for more skills.