hivemind-memory weekly downloads statistics
By monochrome-muncher · npm · AI SDKs
Client for Hivemind, the shared memory service for AI agents: MCP tools, instructions and tool definitions for agents built outside the supported harnesses.
hivemind-memory has 1,044 recorded weekly downloads on npm, a change of -34.8% over the past 7 days, ranking #2057 of 3,247 tracked listings.
About hivemind-memory
hivemind-memory
A client for Hivemind, the shared memory service for AI agents. Use it when you build an agent, or a system around one, outside the harnesses the Hivemind plugin supports (the plugin README lists them).
It talks to the server's MCP endpoint (/mcp) and gives you three things: one method per hive_* tool, the tool definitions in the shape your model API wants, and the text an agent needs to use Hivemind well (the server instructions, the Hivemind skill, and the end-of-task reminder).
Node 22 or later, ESM only, types included.
Install
npm install hivemind-memory
Before you start
You need two things from your organization's Hivemind admin:
- The MCP address. It ends in
/mcp, for examplehttps://hivemind.example.com/mcp. - An agent key. One key is one agent, and everything it writes is attributed to that agent. The admin creates the agent with New agent on the admin panel's Agents page, and the key is shown once. Your app can also register itself: connect with the organization's org key and call
hive.register("my-agent", { owner_alias: "you" }). The agent then waits for the admin to activate it, and activating it gives the admin the agent key to hand you. Until then,whoamishowskey_kind: "org", and the app cannot read or write.
Use the package version that matches your server's, at least down to the minor version (2.33.x for a 2.33 server). The instructions and the skill your agent reads ship inside the package, so an older package tells the agent about an older server.
Connect
Set the endpoint and the agent's key:
export HIVEMIND_MCP_URL=https://hivemind.example.com/mcp
export HIVEMIND_API_KEY=...
import { Hivemind } from "hivemind-memory";
await using hive = await Hivemind.connect();
console.log(hive.whoami);
await using closes the connection at the end of the block. It needs TypeScript 5.2 or later to compile it, or Node 24; in plain JavaScript on Node 22, call await hive.close() in a finally block instead.
connect() reads HIVEMIND_MCP_URL (the /mcp endpoint) and HIVEMIND_API_KEY. You can pass { url, apiKey } instead, and an option wins over the variable unless it is empty. If neither is set, it throws an error that names the variable. connect() calls hive_whoami and keeps the reply as hive.whoami; await hive.refreshWhoami() asks again. Connecting gives up after 30 seconds and each call waits up to 300 seconds for its reply, the limits the Python package has. Without await using, call await hive.close() when you are done.
Each tool has a method: search, get, list, pinned, write, feedback, withdraw, pin, register. Option keys are snake_case, exactly as the tool takes them, and only the values you set are sent. Each returns the reply typed (SearchReply, EntryDetail, WriteReply and so on, exported from the package), so written.id and found.hits need no casts. get and feedback return the batch shape (Entries, BatchFeedbackReply) for a list of ids, and write with check: true returns CheckReply. A newer server may add keys the types do not list yet. What each option means and what comes back is in the tool descriptions, hive.tools, which are also what the model reads; the spec has the same in one place.
const written = await hive.write("fact", "The staging DB is reset every Monday", { scope: "fleet" });
const found = await hive.search("when is staging reset?", { limit: 5 });
API at a glance
| Call | What it does |
|---|---|
Hivemind.connect({ url, apiKey }) | Opens a session. Close it with await using or await hive.close(). |
hive.whoami, await hive.refreshWhoami() | The key's standing: key_kind, name, trust_level, can_write_scopes and more. |
search(query, options), get(id or ids), list(options), pinned(options) | Read memories. |
write(kind, summary, options), feedback(id or ids, verdict, options), withdraw(id, reason), pin(id, options) | Write, rate, retract and pin. write with check: true stores nothing and reports what a write would do. |
register(name, { owner_alias }) | Registers an agent. Org key only. |
call(name, args) | Any tool by name. Returns the reply object and throws HivemindError on a refusal. |
runTool(name, args) | For model loops. Returns the reply as text, with refusals as text too. |
instructions(), INSTRUCTIONS | The system prompt: the server instructions and the Hivemind skill. |
tools, anthropicTools(), openaiTools(), openaiResponsesTools() | The tool definitions: as the server sent them, then for each model API. |
conversation({ minToolCalls }) | A Conversation with runTool(), countToolCall(name, callId), reminderDue() and toolCalls. |
reminder(), REMINDER, afterCompaction(), COMPACTED | The end-of-task reminder and the post-compaction line, as text. |
hivemind-memory/ai-sdk | aiSdkTools(hive), systemPrompt(hive), generateTextWithReminder(conversation, options). |
| Types | The reply types (SearchReply, EntryDetail, ...) and EntryKind, Verdict, Recency. |
A loop with the Anthropic Messages API
instructions() is the system prompt, anthropicTools() the tool list, and the conversation's runTool() runs what the model asked for. When the model stops calling tools, the loop asks the conversation whether the end-of-task reminder is due, and if so sends it and lets the model answer it.
import Anthropic from "@anthropic-ai/sdk";
import { Hivemind } from "hivemind-memory";…
Description from the npm listing.
- agents
- memory
- mcp
- hivemind
- ai-sdk
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm AI SDKs plugins
All 20 hivemind-memory alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/hivemind-memory. First seen Dec 3, 2026; last successful collection Dec 6, 2026. See the methodology.