@deeplake/hivemind 0.6.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +19 -0
- package/LICENSE +201 -0
- package/README.md +359 -0
- package/bundle/cli.js +1051 -0
- package/codex/bundle/capture.js +759 -0
- package/codex/bundle/commands/auth-login.js +862 -0
- package/codex/bundle/package.json +1 -0
- package/codex/bundle/pre-tool-use.js +2097 -0
- package/codex/bundle/session-start-setup.js +585 -0
- package/codex/bundle/session-start.js +129 -0
- package/codex/bundle/shell/deeplake-shell.js +69338 -0
- package/codex/bundle/stop.js +673 -0
- package/codex/bundle/wiki-worker.js +266 -0
- package/codex/skills/deeplake-memory/SKILL.md +65 -0
- package/cursor/bundle/capture.js +485 -0
- package/cursor/bundle/commands/auth-login.js +862 -0
- package/cursor/bundle/package.json +1 -0
- package/cursor/bundle/session-end.js +45 -0
- package/cursor/bundle/session-start.js +520 -0
- package/cursor/bundle/shell/deeplake-shell.js +69338 -0
- package/mcp/bundle/package.json +1 -0
- package/mcp/bundle/server.js +24068 -0
- package/openclaw/README.md +89 -0
- package/openclaw/dist/index.js +1714 -0
- package/openclaw/dist/package.json +1 -0
- package/openclaw/openclaw.plugin.json +56 -0
- package/openclaw/package.json +29 -0
- package/openclaw/skills/SKILL.md +61 -0
- package/package.json +69 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hivemind",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Activeloop",
|
|
5
|
+
"email": "support@activeloop.ai"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Cloud-backed persistent shared memory for AI agents powered by Deeplake",
|
|
9
|
+
"version": "0.6.47"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "hivemind",
|
|
14
|
+
"description": "Persistent shared memory powered by Deeplake โ captures all session activity and provides cross-session, cross-agent memory search",
|
|
15
|
+
"version": "0.6.47",
|
|
16
|
+
"source": "./claude-code",
|
|
17
|
+
"homepage": "https://github.com/activeloopai/hivemind"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hivemind",
|
|
3
|
+
"description": "Cloud-backed persistent memory powered by Deeplake โ read, write, and share memory across Claude Code sessions and agents",
|
|
4
|
+
"version": "0.6.47",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Activeloop",
|
|
7
|
+
"url": "https://deeplake.ai"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://deeplake.ai",
|
|
10
|
+
"repository": "https://github.com/activeloopai/hivemind",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"memory",
|
|
14
|
+
"deeplake",
|
|
15
|
+
"persistent-memory",
|
|
16
|
+
"shared-memory",
|
|
17
|
+
"agent-memory"
|
|
18
|
+
]
|
|
19
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<br>
|
|
3
|
+
<a href="https://github.com/activeloopai/hivemind">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/activeloopai/hivemind/main/docs/public/hivemind-logo.svg" alt="Hivemind" width="120">
|
|
5
|
+
</a>
|
|
6
|
+
<br>
|
|
7
|
+
Hivemind
|
|
8
|
+
<br>
|
|
9
|
+
</h1>
|
|
10
|
+
|
|
11
|
+
<h4 align="center">One brain for all your agents</h4>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
|
|
15
|
+
<a href="package.json"><img src="https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg" alt="Node"></a>
|
|
16
|
+
<a href="https://deeplake.ai"><img src="https://img.shields.io/badge/Powered%20by-Deeplake-orange.svg" alt="Deeplake"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
Persistent, cloud-backed shared memory for <b>Claude Code โข OpenClaw โข Codex โข Cursor โข Hermes โข pi โข Cline โข Roo โข Kilo</b> agents.<br>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
> One session ends, everything important disappears.
|
|
24
|
+
>
|
|
25
|
+
> Hivemind finally fixes the "agent amnesia" problem.
|
|
26
|
+
|
|
27
|
+
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.
|
|
28
|
+
|
|
29
|
+
- ๐ง **Captures** every session's prompts, tool calls, and responses into a shared SQL table on Deeplake Cloud
|
|
30
|
+
- ๐ **Searches** across all memory with lexical search (falls back to grep when index unavailable)
|
|
31
|
+
- ๐ **Shares** memory across sessions, agents, teammates, and machines in real-time
|
|
32
|
+
- ๐ **Intercepts** file operations on `~/.deeplake/memory/` through a virtual filesystem backed by SQL
|
|
33
|
+
- ๐ **Summarizes** sessions into AI-generated wiki pages via a background worker at session end
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
One command, all your agents:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @deeplake/hivemind@latest install
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
That's it. The installer detects every supported assistant on your machine (Claude Code, Codex, OpenClaw, Cursor, Hermes Agent, pi, Cline, Roo Code, Kilo Code), wires up the hooks or MCP server, and opens a browser once for login. Restart your assistants and they all share the same brain.
|
|
44
|
+
|
|
45
|
+
**Install for a specific assistant only:**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx @deeplake/hivemind@latest install --only claude
|
|
49
|
+
npx @deeplake/hivemind@latest claude install # equivalent
|
|
50
|
+
npx @deeplake/hivemind@latest codex install
|
|
51
|
+
npx @deeplake/hivemind@latest claw install
|
|
52
|
+
npx @deeplake/hivemind@latest cursor install
|
|
53
|
+
npx @deeplake/hivemind@latest hermes install
|
|
54
|
+
npx @deeplake/hivemind@latest pi install
|
|
55
|
+
npx @deeplake/hivemind@latest cline install
|
|
56
|
+
npx @deeplake/hivemind@latest roo install
|
|
57
|
+
npx @deeplake/hivemind@latest kilo install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Check what's wired up:**
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx @deeplake/hivemind@latest status
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**Supported assistants:**
|
|
67
|
+
|
|
68
|
+
| Platform | Integration | Auto-capture | Auto-recall |
|
|
69
|
+
|------------------|---------------------------|--------------|-------------|
|
|
70
|
+
| **Claude Code** | Marketplace plugin | โ
| โ
|
|
|
71
|
+
| **OpenClaw** | Native extension | โ
| โ
|
|
|
72
|
+
| **Codex** | Hooks (`hooks.json`) | โ
| โ
|
|
|
73
|
+
| **Cursor** | Hooks (`hooks.json` 1.7+) | โ
| โ
|
|
|
74
|
+
| **Hermes Agent** | Skill (`agentskills.io`) | โ | via grep |
|
|
75
|
+
| **pi** | Skill + AGENTS.md | โ | via grep |
|
|
76
|
+
| **Cline** | MCP server | โ | โ
|
|
|
77
|
+
| **Roo Code** | MCP server | โ | โ
|
|
|
78
|
+
| **Kilo Code** | MCP server | โ | โ
|
|
|
79
|
+
|
|
80
|
+
### Alternative install paths
|
|
81
|
+
|
|
82
|
+
<details>
|
|
83
|
+
<summary><b>Claude Code plugin marketplace</b></summary>
|
|
84
|
+
|
|
85
|
+
If you prefer Claude Code's native plugin marketplace:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
/plugin marketplace add activeloopai/hivemind
|
|
89
|
+
/plugin install hivemind
|
|
90
|
+
/reload-plugins
|
|
91
|
+
/hivemind:login
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Auto-updates on each session start. Manual update: `/hivemind:update`.
|
|
95
|
+
</details>
|
|
96
|
+
|
|
97
|
+
<details>
|
|
98
|
+
<summary><b>OpenClaw ClawHub</b></summary>
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
openclaw plugins install clawhub:hivemind
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then type `/hivemind_login` in chat, click the auth link, and sign in.
|
|
105
|
+
|
|
106
|
+
#### Commands
|
|
107
|
+
|
|
108
|
+
| Command | Description |
|
|
109
|
+
|---------|-------------|
|
|
110
|
+
| `/hivemind_login` | Sign in via device flow |
|
|
111
|
+
| `/hivemind_capture` | Toggle capture on/off |
|
|
112
|
+
| `/hivemind_whoami` | Show current org and workspace |
|
|
113
|
+
| `/hivemind_orgs` | List organizations |
|
|
114
|
+
| `/hivemind_switch_org <name>` | Switch organization |
|
|
115
|
+
| `/hivemind_workspaces` | List workspaces |
|
|
116
|
+
| `/hivemind_switch_workspace <id>` | Switch workspace |
|
|
117
|
+
| `/hivemind_update` | Check for plugin updates |
|
|
118
|
+
|
|
119
|
+
Auto-recall and auto-capture are enabled by default. Data is stored in the same `sessions` table as Claude Code and Codex.
|
|
120
|
+
|
|
121
|
+
#### Coexistence with `memory-core`
|
|
122
|
+
|
|
123
|
+
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.
|
|
124
|
+
|
|
125
|
+
#### Troubleshooting
|
|
126
|
+
|
|
127
|
+
- **Hivemind seems slow or unresponsive.** Check the agent model in `~/.openclaw/openclaw.json` under `agents.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`.
|
|
128
|
+
- **`openclaw model <id>` says "plugins.allow excludes model".** The `model` plugin CLI is disabled by default. Edit `~/.openclaw/openclaw.json` directly (key `agents.defaults.model`) and restart the gateway: `systemctl --user restart openclaw-gateway.service`.
|
|
129
|
+
- **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 like `claude-3-5-haiku-latest` and unprefixed bare IDs are not on OpenClaw's allowlist.
|
|
130
|
+
- **Self-update via Telegram fails with "elevated is not available".** `tools.elevated.allowFrom` must include `telegram` before elevated commands work from that channel. Safer alternative: run the upgrade in a local shell with `openclaw plugins update hivemind`.
|
|
131
|
+
- **`npm error EACCES` during 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.
|
|
132
|
+
</details>
|
|
133
|
+
|
|
134
|
+
<details>
|
|
135
|
+
<summary><b>Codex (manual)</b></summary>
|
|
136
|
+
|
|
137
|
+
Tell Codex to fetch and follow the install instructions:
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Fetch and follow instructions from https://raw.githubusercontent.com/activeloopai/hivemind/main/codex/INSTALL.md
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Or run the installer script directly:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
git clone https://github.com/activeloopai/hivemind.git ~/.codex/hivemind
|
|
147
|
+
~/.codex/hivemind/codex/install.sh
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Restart Codex to activate.
|
|
151
|
+
</details>
|
|
152
|
+
|
|
153
|
+
<details>
|
|
154
|
+
<summary><b>Cursor (1.7+)</b></summary>
|
|
155
|
+
|
|
156
|
+
The unified installer wires six lifecycle events in `~/.cursor/hooks.json` โ sessionStart, beforeSubmitPrompt, postToolUse, afterAgentResponse, stop, sessionEnd. Hooks fork a Node bundle at `~/.cursor/hivemind/bundle/` per event. Restart Cursor after install to load.
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx @deeplake/hivemind@latest cursor install
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Auto-capture is enabled the same way as Claude Code / Codex / OpenClaw.
|
|
163
|
+
</details>
|
|
164
|
+
|
|
165
|
+
<details>
|
|
166
|
+
<summary><b>Hermes Agent</b></summary>
|
|
167
|
+
|
|
168
|
+
Drops an `agentskills.io`-compatible skill at `~/.hermes/skills/hivemind-memory/`. Recall is via direct grep on `~/.deeplake/memory/`. Auto-capture is not yet supported (Hermes' lifecycle-hook surface isn't documented at the time of writing).
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
npx @deeplake/hivemind@latest hermes install
|
|
172
|
+
```
|
|
173
|
+
</details>
|
|
174
|
+
|
|
175
|
+
<details>
|
|
176
|
+
<summary><b>pi (badlogic/pi-mono coding-agent)</b></summary>
|
|
177
|
+
|
|
178
|
+
Drops `~/.pi/agent/AGENTS.md` (idempotent BEGIN/END marker block) plus a skill at `~/.pi/agent/skills/hivemind-memory/`. Recall is via direct grep on `~/.deeplake/memory/`.
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
npx @deeplake/hivemind@latest pi install
|
|
182
|
+
```
|
|
183
|
+
</details>
|
|
184
|
+
|
|
185
|
+
<details>
|
|
186
|
+
<summary><b>Cline / Roo Code / Kilo Code (MCP-based)</b></summary>
|
|
187
|
+
|
|
188
|
+
Each MCP-aware editor extension gets a registered server entry pointing at the shared Hivemind MCP server at `~/.hivemind/mcp/server.js`. The server exposes three tools โ `hivemind_search`, `hivemind_read`, `hivemind_index` โ that the agent can call when it needs to recall org memory.
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
npx @deeplake/hivemind@latest cline install # ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
|
|
192
|
+
npx @deeplake/hivemind@latest roo install # ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
|
|
193
|
+
npx @deeplake/hivemind@latest kilo install # ~/.kilocode/mcp.json
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
The MCP server is shared across all three โ one binary, three configs. Auto-capture is not exposed via MCP; recall is on-demand only.
|
|
197
|
+
</details>
|
|
198
|
+
|
|
199
|
+
### Uninstall
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
npx @deeplake/hivemind@latest uninstall # remove from every detected assistant
|
|
203
|
+
npx @deeplake/hivemind@latest codex uninstall # remove from one
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## How it works
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
210
|
+
โ Your Coding Agent โ
|
|
211
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
212
|
+
โ
|
|
213
|
+
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
|
|
214
|
+
โ ๐ฅ Capture (every turn) โ
|
|
215
|
+
โ prompts ยท tool calls ยท responses โ
|
|
216
|
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
|
|
217
|
+
โ
|
|
218
|
+
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
|
|
219
|
+
โ ๐ง Hivemind โ
|
|
220
|
+
โ SQL tables ยท Virtual File System โ
|
|
221
|
+
โ Search Memory ยท inject context โ
|
|
222
|
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ
|
|
223
|
+
โ
|
|
224
|
+
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
|
|
225
|
+
โ ๐ Deeplake โ
|
|
226
|
+
โ Shared across all agents โ
|
|
227
|
+
โ Postgres ยท S3 โ
|
|
228
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Every session is captured. Every agent can recall. Teammates in the same org see the same memory.
|
|
232
|
+
|
|
233
|
+
## Features
|
|
234
|
+
|
|
235
|
+
### ๐ Natural search
|
|
236
|
+
|
|
237
|
+
Just ask Claude naturally:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
"What was Emanuele working on?"
|
|
241
|
+
"Search memory for authentication bugs"
|
|
242
|
+
"What did we decide about the API design?"
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### ๐ AI-generated session summaries
|
|
246
|
+
|
|
247
|
+
After each session, a background worker generates a wiki summary: key decisions, code changes, next steps. Browse them at `~/.deeplake/memory/summaries/`.
|
|
248
|
+
|
|
249
|
+
### ๐ฅ Team sharing
|
|
250
|
+
|
|
251
|
+
Invite teammates to your Deeplake org. Their agents see your memory, your agents see theirs. No setup, no sync, no merge conflicts.
|
|
252
|
+
|
|
253
|
+
### ๐ Privacy controls
|
|
254
|
+
|
|
255
|
+
Disable capture entirely:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
HIVEMIND_CAPTURE=false claude
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Enable debug logging:
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
HIVEMIND_DEBUG=1 claude
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## โ ๏ธ Data collection notice
|
|
268
|
+
|
|
269
|
+
This plugin captures session activity and stores it in your Deeplake workspace:
|
|
270
|
+
|
|
271
|
+
| Data | What's captured |
|
|
272
|
+
|-----------------------|------------------------------------|
|
|
273
|
+
| User prompts | Every message you send |
|
|
274
|
+
| Tool calls | Tool name + full input |
|
|
275
|
+
| Tool responses | Full tool output |
|
|
276
|
+
| Assistant responses | Claude's final response |
|
|
277
|
+
| Subagent activity | Subagent tool calls and responses |
|
|
278
|
+
|
|
279
|
+
**All users in your Deeplake workspace can read this data.** A DATA NOTICE is displayed at the start of every session.
|
|
280
|
+
|
|
281
|
+
## Configuration
|
|
282
|
+
|
|
283
|
+
| Variable | Default | Description |
|
|
284
|
+
|---------------------------|---------------------------|--------------------------------------------|
|
|
285
|
+
| `HIVEMIND_TOKEN` | โ | API token (auto-set by login) |
|
|
286
|
+
| `HIVEMIND_ORG_ID` | โ | Organization ID (auto-set by login) |
|
|
287
|
+
| `HIVEMIND_WORKSPACE_ID` | `default` | Workspace name |
|
|
288
|
+
| `HIVEMIND_API_URL` | `https://api.deeplake.ai` | API endpoint |
|
|
289
|
+
| `HIVEMIND_TABLE` | `memory` | SQL table for summaries and virtual FS |
|
|
290
|
+
| `HIVEMIND_SESSIONS_TABLE` | `sessions` | SQL table for per-event session capture |
|
|
291
|
+
| `HIVEMIND_MEMORY_PATH` | `~/.deeplake/memory` | Path that triggers interception |
|
|
292
|
+
| `HIVEMIND_CAPTURE` | `true` | Set to `false` to disable capture |
|
|
293
|
+
| `HIVEMIND_DEBUG` | โ | Set to `1` for verbose hook debug logs |
|
|
294
|
+
|
|
295
|
+
## Architecture
|
|
296
|
+
|
|
297
|
+
### Integration model per agent
|
|
298
|
+
|
|
299
|
+
| Agent | Mechanism | Hooks/tools wired |
|
|
300
|
+
|-------------------|------------------------------------|-----------------------------------------------------------------------------------------|
|
|
301
|
+
| **Claude Code** | Marketplace plugin | `SessionStart` ยท `UserPromptSubmit` ยท `PreToolUse` ยท `PostToolUse` ยท `Stop` ยท `SubagentStop` ยท `SessionEnd` |
|
|
302
|
+
| **Codex** | `~/.codex/hooks.json` | `SessionStart` ยท `UserPromptSubmit` ยท `PreToolUse(Bash)` ยท `PostToolUse` ยท `Stop` |
|
|
303
|
+
| **OpenClaw** | Native extension at `~/.openclaw/extensions/hivemind/` | `agent_end` capture ยท `before_agent_start` recall ยท contracted tools (`hivemind_search`/`read`/`index`) |
|
|
304
|
+
| **Cursor (1.7+)** | `~/.cursor/hooks.json` | `sessionStart` ยท `beforeSubmitPrompt` ยท `postToolUse` ยท `afterAgentResponse` ยท `stop` ยท `sessionEnd` |
|
|
305
|
+
| **Hermes** | Skill at `~/.hermes/skills/hivemind-memory/` | recall via grep on `~/.deeplake/memory/` |
|
|
306
|
+
| **pi** | `~/.pi/agent/AGENTS.md` + skill | recall via grep on `~/.deeplake/memory/` |
|
|
307
|
+
| **Cline ยท Roo ยท Kilo** | MCP server at `~/.hivemind/mcp/server.js` | `hivemind_search` ยท `hivemind_read` ยท `hivemind_index` |
|
|
308
|
+
|
|
309
|
+
### Monorepo structure
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
hivemind/
|
|
313
|
+
โโโ src/ โ shared core (API client, auth, config, SQL utils)
|
|
314
|
+
โ โโโ hooks/ โ Claude Code hooks
|
|
315
|
+
โ โโโ hooks/codex/ โ Codex hooks
|
|
316
|
+
โ โโโ hooks/cursor/ โ Cursor hooks
|
|
317
|
+
โ โโโ mcp/ โ MCP server (shared by Cline / Roo / Kilo)
|
|
318
|
+
โ โโโ cli/ โ unified `hivemind install` CLI + per-agent installers
|
|
319
|
+
โโโ claude-code/ โ Claude Code plugin source (marketplace-distributed)
|
|
320
|
+
โโโ openclaw/ โ OpenClaw plugin source
|
|
321
|
+
โโโ codex/ โ Codex plugin source
|
|
322
|
+
โโโ cursor/ โ Cursor plugin source
|
|
323
|
+
โโโ mcp/ โ MCP server build output
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## Security
|
|
327
|
+
|
|
328
|
+
- SQL values escaped with `sqlStr()`, `sqlLike()`, `sqlIdent()`
|
|
329
|
+
- ~70 allowlisted builtins run in the virtual FS; unrecognized commands are denied
|
|
330
|
+
- Credentials stored with mode `0600`, config dir with mode `0700`
|
|
331
|
+
- Device flow login: no tokens in environment or code
|
|
332
|
+
- `HIVEMIND_CAPTURE=false` fully disables data collection
|
|
333
|
+
|
|
334
|
+
## Development
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
git clone https://github.com/activeloopai/hivemind.git
|
|
338
|
+
cd hivemind
|
|
339
|
+
npm install
|
|
340
|
+
npm run build # tsc + esbuild โ claude-code/bundle/ + codex/bundle/ + cursor/bundle/ + openclaw/dist/ + mcp/bundle/ + bundle/cli.js
|
|
341
|
+
npm test # vitest
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Test locally with Claude Code:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
claude --plugin-dir claude-code
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Interactive shell against Deeplake:
|
|
351
|
+
|
|
352
|
+
```bash
|
|
353
|
+
npm run shell
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
## License
|
|
357
|
+
|
|
358
|
+
Apache License 2.0 โ ยฉ Activeloop, Inc. See [LICENSE](LICENSE) for details.
|
|
359
|
+
|