| crates | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Hivemind
A self-hostable, multi-agent orchestration server with a code-enforced tool-authorization harness.
Hivemind runs a fleet of LLM-powered agents against real infrastructure and development work, and puts a hard security boundary between what an agent asks to do and what it is allowed to do. The design assumption is that the model is untrusted: every privileged action is default-denied, gated in code, and — when it exceeds an agent's standing grant — routed up to a human for a one-shot approval. It is written in Rust.
Portfolio / evaluation notice. This repository is published for portfolio and evaluation visibility. It is free software under the AGPL-3.0 — you may read, build, run, modify, and redistribute it under those terms, including for commercial and production use, provided you honor the AGPL's network-copyleft obligations. A commercial license is available if you need terms outside the AGPL — contact Info@Seglamater.com. © 2026 Seglamater Services LLC. See
LICENSE.
Why it exists
Handing an autonomous agent a shell, a Docker socket, or an infrastructure API is easy. Doing it safely — so a confused or adversarially-prompted model cannot exfiltrate data, reach internal-only hosts, or take an irreversible action without a human in the loop — is the hard part. Hivemind is built around that hard part:
- Default-deny tool authorization. An agent's capabilities are an explicit allow-set. A tool call outside that set does not silently succeed and does not silently fail into a workaround — it is refused, and (for escalatable actions) routed up for operator approval.
- Human-in-the-loop approvals. A gated action an agent lacks the standing
grant for returns an
approval_idand blocks; only the operator can approve, deny, or let it expire. Agents can observe only the escalations they raised. - Data-egress and leak defense. A single, shared egress-scrubbing pass redacts PII (email / phone / SSN / card), private IPs, filesystem paths, and credential-shaped tokens from anything an agent emits before it is persisted or relayed — one implementation, so the security-critical regexes never drift between call sites.
- Bring-your-own-key LLM routing. Provider, endpoint, model, and API key are configuration, not code. Hivemind never proxies model calls through a vendor — point it at Anthropic, OpenAI, an OpenAI-compatible server, or a local runtime.
Architecture at a glance
Hivemind is a Rust workspace. This repository is a curated subset of the platform, published as an engineering showcase — the deployment, release, and customer-onboarding pipelines are intentionally omitted. The crates included here are:
| Crate | What it is |
|---|---|
hivemind-core |
The shared library: data models, the wire protocol between agents and the server, the database access layer, LLM provider routing, external API clients, and the egress-scrubbing / leak-detection pass. |
hivemind-mcp |
A Model Context Protocol server exposing the orchestration and infrastructure tools an agent can call — agent management, task tracking, memory, and read-oriented infra tooling — behind the default-deny authorization + escalation flow. |
hivemind-agent |
The agent runtime: lifecycle management, dispatch, message relay, and terminal/worktree plumbing for running agents as real processes. |
hivemind-tui |
A terminal cockpit (built on ratatui) for watching the fleet, reading agent messages, and driving the dashboard. |
hivemind-cli |
A command-line client for the server. |
The agent/server contract is protocol-typed in hivemind-core, so the runtime,
the MCP surface, the CLI, and the TUI all speak one shared, versioned protocol.
Build
Requires a recent stable Rust toolchain (Rust 2021 edition; developed against Rust 1.9x). No database or external service is needed to compile — the SQL layer uses runtime-checked queries, not compile-time-checked macros.
git clone <this-repo> hivemind
cd hivemind
cargo build --workspace
Run the test suite:
cargo test --workspace
Run
Each binary has its own --help. As a starting point:
# The MCP server (stdio transport) — the tool surface an LLM host connects to.
cargo run -p hivemind-mcp
# The terminal cockpit.
cargo run -p hivemind-tui
# The command-line client.
cargo run -p hivemind-cli -- --help
Runtime configuration (LLM provider/key, database URL, integration endpoints, forward-auth trust boundary) is supplied via environment variables; each binary documents the variables it reads. Because this is a curated showcase subset, the full server, its HTTP API, and the deployment tooling are not included here.
License
AGPL-3.0-only — see LICENSE for the full text.
A commercial license is available for use outside the AGPL-3.0 terms — contact Info@Seglamater.com. (Formal commercial-license terms are being finalized.)
Versions previously published under the Business Source License 1.1 remain available under BSL-1.1.
Copyright © 2026 Seglamater Services LLC.