activeloopai/hivemind

Hivemind turns your traces into reusable skills across agents

Hivemind – Shared Memory for AI Coding Agents

What it is – Hivemind is a tool that lets multiple AI‑coding assistants (Claude Code, OpenClaw, Codex, Cursor, Hermes, pi, and the early‑stage Claude Cowork) share a common “brain”. Every time an assistant runs, Hivemind records the prompts, tool calls, and responses in a Deeplake database, mines those logs for recurring patterns, turns the patterns into reusable SKILL.md files, and makes those skills instantly available to all other agents on the same machine or team.

Why it matters – Without a shared memory, each agent has to rediscover the same solutions over and over, which costs extra API tokens, more model calls, and longer conversations. Hivemind’s benchmarks on the LoCoMo long‑context memory test show a 25 % cost reduction, 1.7× fewer tokens, and 31 % fewer dialogue turns compared to a baseline with no shared memory.

How it works

  1. Capture – Hooks are installed in each supported assistant (via plugins, JSON hook files, or MCP servers). The hooks write every session event to a Deeplake table called sessions.
  2. Codify – A background worker scans the stored traces, detects repeated code‑or‑workflow patterns, and writes them as markdown skill files (SKILL.md).
  3. Propagate – When any agent starts a new session, Hivemind injects the relevant skills and performs a hybrid lexical‑plus‑semantic search over the stored traces, so the model can recall prior solutions instantly.
  4. Summarize – Periodic workers generate AI‑written wiki pages that summarise a session, making the knowledge searchable for future agents.

Key features

  • Natural search – Ask the assistant in plain language (e.g., “What authentication bugs have we solved?”) and Hivemind retrieves matching traces or skills.
  • Hybrid retrieval – Uses embeddings when enabled; otherwise falls back to fast lexical matching.
  • Virtual filesystem – Intercepts file operations under ~/.deeplake/memory/ via a SQL‑backed virtual FS, letting agents read/write shared data as if it were a normal directory.
  • Skill sharing – Skills are stored per‑workspace and automatically loaded by every connected agent.
  • Privacy controls – Capture can be disabled globally (HIVEMIND_CAPTURE=false) or per‑directory by dropping a .hivemind file with { "collect": false }.
  • Bring‑Your‑Own‑Cloud (BYOC) – Data can live in your own GCS, Azure, S3 bucket, or on‑prem storage; you keep full control of where the traces are stored.

Supported assistants

Assistant Integration method Auto‑capture Auto‑recall
Claude Code Marketplace plugin ✅ ✅
OpenClaw Native extension ✅ ✅
Codex JSON hooks ✅ ✅
Cursor (≥1.7) JSON hooks ✅ ✅
Hermes Agent Shell hooks + MCP server ✅ ✅
pi (badlogic) Extension API ✅ ✅
Claude Cowork (Alpha) MCP server only Alpha (captures Local Agent Mode) ✅

Getting started – Installation is a one‑liner for macOS/Linux (curl … | sh), PowerShell on Windows, or via npm (npm i -g @deeplake/hivemind && hivemind install). The installer detects which assistants are present, writes the appropriate hook files, and prompts you to log in to your Deeplake account.

Configuration – Environment variables control the workspace/organization IDs, API endpoint, which tables are used, how often the background workers run, and whether embeddings are enabled. A per‑directory .hivemind file can override these settings for a specific project.

Limitations – Claude Cowork’s capture works only for Local Agent Mode sessions; plain desktop‑chat conversations are not recorded because they never hit the local transcript files.

Bottom line – Hivemind turns a fleet of AI coding assistants into a collaborative team that learns from each other’s past work, cutting down on repeated reasoning, saving API spend, and surfacing useful patterns as reusable skills.

Related

  • Project
  • Project
  • Project
  • Project
  • Project