Docs

Everything HiveMind does, grouped by topic and explained in enough depth to actually use it — not just a feature list. For what it costs see Pricing; to get started, head to Activate.

Getting started

Install the binary, sign in once, and you're working. No API key of your own to create, store, or rotate.

No API key required

Sign in, top up a balance, and run hivemind — HiveMind holds the upstream provider keys and meters usage against your balance down to fractions of a cent. Already have your own key for a provider? --api-key and --base-url still work, billed directly to that provider instead, and take priority over a signed-in session automatically.

hivemind activate -p "fix the failing test in src/paginate.rs"

Tells you what it didn't check, not just what passed

When a task finishes, HiveMind reports what it changed, how it verified that, and — the part most tools skip — what it did NOT verify. An unverified change reported as finished is treated as the single most expensive thing a report can get wrong, because it costs you the time to find the problem yourself instead of being told about it upfront. The report scales with the task: a one-line fix gets a sentence, a multi-file change gets the full breakdown.

Fixed the off-by-one in paginate(). Ran cargo test: 14 passed. I did NOT check callers that pass a zero-length page size — worth a look.

Reads your project's own rules

If your repo has an AGENTS.md, CLAUDE.md, or CONTRIBUTING.md, HiveMind reads it once at startup and works by it — your real test command, directory layout, and naming conventions, instead of guessing. It also notices your lockfile and uses the matching package manager without being told. The file is treated as project preferences, never as instructions that override you: it's explicitly marked as data from the repository, so it can't authorize an action you haven't approved even if it tries to.

AGENTS.md: "Run tests with just test, never cargo test directly" — followed for this session

Also in your editor

A VS Code extension (works in Antigravity and other VS Code-based editors too) puts the same agent in a sidebar chat: streamed replies, file edits as a real reviewable diff, and shell commands you approve before they run — the same approval model as the terminal, just with a proper UI instead of a raw [y/N] prompt. Search "HiveMind" in the Extensions panel.

Update in place

One command downloads the latest release for your platform and replaces the running binary. The new binary is actually run and version-checked before anything is overwritten, so a corrupt download or a wrong-platform build can never leave you without a working install — worst case, the update is refused and the binary you had keeps working.

hivemind update

Models and routing

One balance covers every model. HiveMind picks the cheap one first and only reaches for a stronger one when the cheap one is visibly stuck.

One account, 7 coding models

A single prepaid balance covers HiveMind's own fast default plus Claude Sonnet 5, GPT-5.3 Codex, Gemini 3.1 Pro, Grok Build, Qwen3 Coder Plus, and Kimi K2 Code. Switch mid-session with no separate API keys or subscriptions to juggle — the conversation and its history carry over to the new model untouched.

/model claude-sonnet-5

Auto-escalation off the cheap default

The default hivemind tier is fast and cheap. If it gets stuck repeating or failing the same tool call, HiveMind escalates to a stronger model for the rest of that task, then resets to the cheap tier automatically on your next request — you never end up stuck paying top-tier rates for the rest of a session because of one hard step.

escalating hivemind → claude-sonnet-5: repeated or failing tool calls on this task

Escalation is driven by what actually happened, not text that merely looks like it failed

Every tool reports its own outcome directly — succeeded, failed, denied, or timed out — instead of HiveMind guessing from the words in the result. That used to be a real gap: reading a log file whose first line is an error, or a source file that formats its own error messages, looked identical to an actually failed command, and could count toward the same escalation as a genuine repeated failure. Now only a call that genuinely failed ever counts.

log.txt's first line is "ERROR: connection refused" — read_file still succeeded, so it's never counted toward escalation

A nudge before spending more

Escalating costs real money, so it isn't the first response to trouble. When calls start repeating, HiveMind first tells the model directly that it's going in circles and asks it to change approach — most stalls clear right there, at no extra cost. Only a second stall in the same task actually triggers an escalation to a stronger model.

↯ no progress in 2 turns — asked the model to reconsider

Reasoning effort, per model

Ask a model to think harder on a genuinely hard problem. HiveMind only ever sends a reasoning level the active model actually supports, silently omitting it for models that don't — so switching models mid-session never breaks the request because of a setting the new model doesn't understand.

/reasoning high

Cost and billing

The running total prints after every turn. Nothing about what you're spending is hidden until the bill arrives.

Reserve, settle, refund — always visible

Every request reserves a conservative worst-case estimate against your balance before it's even sent, settles down to the real cost once the model's response completes, and refunds the reservation in full — not just the unused part — if anything fails before a real cost was ever known. The reservation briefly makes your balance look lower than it really is; it always corrects back within the same request.

1000 in / 140 out · $0.000210 turn / $0.004180 session

Real prompt caching

Repeated context — the system prompt, the tool manifest, earlier turns — is billed at a fraction of the price on a cache hit. HiveMind reads whichever cache-accounting field the active provider actually reports, and sets an explicit cache breakpoint for the one provider in the catalog that needs it asked for rather than assuming every provider caches the same way. It shows up directly in the cost line every turn, not just in a bill you discover later.

2000 in / 300 out, cache 90% · $0.000109 turn / $0.000353 session

A session budget cap

Set a hard USD ceiling for a session. HiveMind stops cleanly at the next turn boundary once it's reached, rather than cutting off an in-flight turn mid-edit or letting the balance drain further than you meant to spend before you notice.

hivemind activate --budget 0.50

Tools

What the agent can actually do to your workspace — and how it avoids doing it slowly.

A real toolset

read_file, write_file, edit_file, list_dir, search (exact-string grep), semantic_search (ranked, meaning-based lookup for when you don't know the exact name), project_map (a whole repo's structure and definitions in one call, for orienting before reading files one by one), run_shell, and todo_write for tracking multi-step work. edit_file changes only the exact span you point it at rather than rewriting the whole file, which is both cheaper and means it can't accidentally corrupt code it never touched.

"where do we load a file from disk?" → reader.rs:1-4 (score 0.42) — found without knowing the function is named read_file

Independent tool calls run in parallel

Scaffolding four files, or reading several before planning, no longer costs four sequential turns — independent calls in one turn run concurrently. Edits to the same file are automatically serialized behind the scenes in the order they were requested, so batching never risks one edit silently overwriting another.

measured on an identical 4-file task: 8.33s sequential → 2.60s batched

Servers and watchers, without the orphans

Anything that doesn't exit on its own — a dev server, a watcher — runs in the background and keeps running for the session, writing to a log file the agent can read back later. Re-running the same command replaces the previous one, so a stale process holding a port is never something you have to go hunt down and kill manually. Ordinary (non-background) commands are cleaned up completely when they finish, including anything they themselves started.

started in background (pid 48120); output → /tmp/hivemind-bg-1738.log

Create PDFs and spreadsheets, not just code

create_pdf and create_spreadsheet produce real files directly — headings, paragraphs, tables, sheets of cells and formulas — with no Python or LibreOffice install required, and they always produce a valid file rather than a best-effort attempt. For a PowerPoint deck or anything past that, HiveMind writes and runs a small script instead of forcing it through a tool that wasn't built for it.

wrote 4213 bytes to report.pdf (3 pages)

Turn a codebase into a diagram

create_diagram takes Mermaid syntax — flowchart, sequence, class, ER, state, gantt, and more — and renders it as an image. The raw diagram source is always written first, so nothing is wasted even with zero extra tooling installed; if mmdc (mermaid-cli) is on your machine, it also renders a real .svg or .png alongside it. A missing renderer or a broken diagram never fails the task outright — HiveMind explains exactly what happened and how to view the source anyway (mermaid.live, or any Mermaid-aware editor).

wrote docs/flow.mmd (source) and rendered docs/flow.svg

Search the web, with citations

Opt-in, hosted-only, and off by default. hivemind auth login unlocks web_search and web_fetch for that session; turn them on with --web at launch or /web on mid-session, and HiveMind is capped at 3 search/fetch operations per request — enough to answer a real question, not enough to spiral into an unbounded crawl. Every claim comes back as a numbered source with its title, URL, and publish date, rendered as clean citation cards rather than raw scraped text — in both the terminal and the VS Code extension — and web content is treated as untrusted data the model reads, never as instructions it follows.

1. [Eiffel Tower information: facts, height in feet, weight](https://www.toureiffel.paris/en/the-monument/key-figures) (published 2026-02-23)

Safety and guardrails

Rules you turn on with one command, rules you write yourself, and warnings that tell you something without stopping you.

Built-in presets for common rules

Turn on a safety rule by name instead of hand-writing shell yourself. no-force-push blocks git push --force (--force-with-lease still goes through, since that's the form most teams consider safe). restrict-writes-to <dir> confines every write to one folder. protect-path <path> refuses to touch a specific file or folder, like .env. no-destructive-shell blocks the shell commands most likely to wipe out work by accident — rm -rf, git reset --hard, and similar. Each one runs as real, tested logic rather than a hand-quoted shell one-liner that has to get escaping right on both Windows and Unix.

hivemind hooks enable restrict-writes-to src

Write your own, and make it actually enforce

A [[hooks]] entry in config.toml runs your own shell command before or after any tool call, and a pre-tool-use hook can deny the call outright with a reason the agent is told directly, in plain language. By default, a hook that crashes or times out fails open — the right behavior for a linter or a Slack notification, since a broken script shouldn't be able to wedge the whole agent. Set enforcement = true for a hook that's an actual control rather than a convenience, and that default flips: a broken security hook blocks instead of silently letting everything through unchecked.

[[hooks]] event = "pre_tool_use" matcher = ["run_shell"] command = "./scripts/guard-writes.sh" enforcement = true

Catches an edit built on a stale read

read_file fingerprints a file the moment it's read. If edit_file is later asked to change that same file and it's been modified since — by a formatter, by you in your own editor, by another process entirely — the edit is refused instead of being silently applied on top of a version of the file the agent no longer actually understands. A file the agent never explicitly read is left alone; this catches genuine staleness, it isn't a read-before-every-write mandate.

a.rs changed since you last read it — read it again before editing

Warns before a credential ships

Every file HiveMind writes or edits is scanned for anything that looks like a real API key, password, or access token before the result comes back to you — checked against known formats from AWS, GitHub, Stripe, and more, plus a general randomness check for anything else that looks credential-shaped. It never blocks the write, since fixtures and example configs legitimately look like this on purpose; it just makes sure you actually see it instead of it slipping past in a wall of output. Tuned against roughly 2,700 real files across three different codebases with zero false alarms, because a warning that cries wolf gets ignored, and precision mattered more here than catching every conceivable shape of secret.

⚠ possible credential in this content (line 4: AWS access key ID)

Sessions and context

Long tasks don't hit a wall, a wrong turn doesn't cost you everything you already paid for, and you can always see what actually happened.

See what changed, at a glance

/status shows the active model, mode, cost so far, and every file this session has touched — created, deleted, or modified, each with a +/- line count. /diff [path] shows the real colored diff, for one file or every changed file at once. Neither one guesses at what happened: both are built on the same per-turn file snapshots /undo already keeps, so what's on screen is exactly what would be reverted if you asked it to.

/status

Know how full the context window is

/context shows how much of the active model's context window is in use, as a percentage and a bar. It's driven by the same estimate that decides when old tool results get quietly dropped and when older turns get folded into a summary — so the number on screen is never out of step with what the agent is actually about to do next.

/context

Steer mid-task instead of starting over

Watching a long multi-step task head the wrong way used to mean killing it and losing every tool call already paid for. Press Ctrl+C to send a correction instead of aborting — it's delivered to the model at the next safe point in the task, and the work already done stays exactly as it was.

↩ queued — delivered at the next step

Resume where you left off

Every session is saved as you go, including the cost spent so far — closing the terminal, a crash, or reloading the editor doesn't throw away a conversation you already spent real tokens building up.

hivemind activate --continue

Large results are archived, not dropped

A tool result at or above 10,000 bytes (configurable — artifact_threshold_bytes in config.toml, 0 disables it) is written to disk in full the moment it comes back, and replaced in the conversation by a preview: the first and last 80 lines, plus every distinct error or failure line found anywhere in between — not just the ends, since a 40,000-line test run usually buries its failures in the middle. Nothing is lost — read_artifact(handle, offset, limit) fetches any range of the original later, even after the preview itself has been compacted out of the conversation. Measured on a real 2.3 MB test-log task: session cost dropped from $0.0144 to $0.0031, and the model found the buried failures more reliably, not less — trimming to fit a budget and losing the answer turned out not to be the same trade.

[artifact] artifact://sess/call1/output — 40000 line(s), 2.2 MB. This is a preview; read any range with read_artifact(handle, offset, limit).

Old output is dropped before anything is summarized

The cheapest fix runs first: once context grows past a threshold, large stale tool results are elided in place — the call and its outcome stay in the transcript, only the bulky body goes. That costs nothing and often removes the need to compact the conversation at all.

⤵ freed ~11,400 tokens (6 old tool results dropped)

Context compaction, and a guard before that

If trimming alone isn't enough, older turns fold into one summary — file paths, decisions, and open tasks preserved, not just dropped. If a single message on its own is too big for compaction to help at all, HiveMind stops with a clear message instead of silently sending a request the provider would just reject.

⤵ compacted context: 48 → 11 messages (39,200 tokens before)

Undo

Reverts the file edits from your last completed turn and rewinds the conversation to before them — a safety net for when a change wasn't what you wanted, without needing git or a manual backup. Add a count to undo further back than just the last turn.

/undo 3

Configuration

Defaults you set once in a single file — everything in it is optional.

config.toml

Sets your default model, max turns per request, the auto-escalation target, and a default session budget — plus any [[hooks]] entries, both hand-written and the ones a preset writes for you (see Safety and guardrails). Every field is optional; HiveMind runs correctly with none of it present at all.

[model] model = "hivemind" [agent] auto_escalate = true escalate_to_model = "claude-sonnet-5"