Skip to content

activeloopai/hivemind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

185 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


Hivemind
Hivemind

One brain for every agent on your team.

License Node Deeplake

Persistent, cloud-backed shared memory for AI agents.
Captures everything. Recalls anything. Shares across sessions, teammates, and machines.


What it does

  • 🧠 Captures every session's prompts, tool calls, and responses into a shared cloud SQL table
  • πŸ” Searches across all memory with BM25 full-text search (falls back to ILIKE 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

Platforms

Platform Status Install
Claude Code βœ… Stable See Quick start
OpenClaw πŸ”§ Beta See Quick start
Codex πŸ”œ Coming soon β€”

Quick start (Claude Code)

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.

Updating

The plugin auto-updates on each session start. To manually update:

/hivemind:update

Quick start (OpenClaw)

Install from ClawHub (Telegram, TUI, WhatsApp):

openclaw plugins install hivemind

Send a message. The plugin sends you an auth link. Click, sign in, done.

How it works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     Your AI Agent                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  πŸ“₯ Capture (every turn)            β”‚
        β”‚  prompts Β· tool calls Β· responses   β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  🧠 Hivemind Cloud                  β”‚
        β”‚  SQL tables Β· BM25 search           β”‚
        β”‚  shared across all agents           β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  πŸ” Recall (before each turn)       β”‚
        β”‚  search memory Β· inject context     β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Every session is captured. Every agent can recall. Teammates in the same org see the same memory.

Features

πŸ” Natural search

Just ask Claude naturally:

"What was Emanuele working on?"
"Search memory for authentication bugs"
"What did we decide about the API design?"

πŸ“ AI-generated session summaries

After each session, a background worker generates a wiki summary: key decisions, code changes, next steps. Browse them at ~/.deeplake/memory/summaries/.

πŸ‘₯ Team sharing

Invite teammates to your Deeplake org. Their agents see your memory, your agents see theirs. No setup, no sync, no merge conflicts.

πŸ”’ Privacy controls

Disable capture entirely:

DEEPLAKE_CAPTURE=false claude

Enable debug logging:

DEEPLAKE_DEBUG=1 claude

⚠️ Data collection notice

This 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.

Configuration

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

Architecture

Hook lifecycle (Claude Code)

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

Monorepo structure

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/                  ← coming soon

Security

  • 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 mode 0700
  • Device flow login: no tokens in environment or code
  • DEEPLAKE_CAPTURE=false fully disables data collection

Development

git clone https://github.com/activeloopai/hivemind.git
cd hivemind
npm install
npm run build     # tsc + esbuild β†’ claude-code/bundle/ + openclaw/dist/
npm test          # vitest

Test locally with Claude Code:

claude --plugin-dir claude-code

Interactive shell against Deeplake:

npm run shell

License

Apache License 2.0 β€” Β© Activeloop, Inc. See LICENSE for details.

About

A plugin for Claude Code and OpenClaw that adds persistent memory, context sync, and virtual filesystem hooks using Deeplake.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors