AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Hive

mcp-djlougen-hive · by DJLougen

CPU-side action routing, context compression, and causal memory for AI agents — matches an LLM-everything agent at 58% fewer LLM calls and ~45% lower cost. Glues busyBee-cpu, honey-comb, and rust-brain.

— No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add mcp-djlougen-hive

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • ✓ Prompt-injection patterns
  • ✓ Secret / credential exfiltration
  • ✓ Dangerous shell & filesystem operations
  • ✓ Untrusted network calls
  • ✓ Known-malicious package signatures

What it can access

  • ✓ Network access No
  • ✓ Filesystem access No
  • ✓ Shell / process execution No
  • ✓ Environment & secrets No
  • ✓ Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-djlougen-hive)

Reliability & compatibility

✓ Security review passed
0 installs to date
— no reviews yet
● 7d ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Hive? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Hive

Keep the reasoning on the LLM. Move the routine work to the CPU.

Hive is an orchestration layer for AI agents: route mechanical tool calls locally, trim repetitive context, and recall prior fixes. Add it to your agent loop without replacing your model.

[](https://github.com/DJLougen/hive/releases/latest) [](https://python.org) [](https://github.com/DJLougen/hive/actions/workflows/ci.yml) [](https://opensource.org/licenses/MIT)

[Quickstart](#run-it) · [Benchmark results](benchmarks/README.md) · [Integrate your agent](docs/HARNESS_SETUP.md)


Why it matters

Your agent shouldn't need a paid reasoning call just to re-run tests after a patch. Hive can handle observable workflow transitions on the CPU and escalate decisions that need the model. Context compression and causal memory help reduce the material your agent sends and the work it repeats.

The evidence: fewer paid decisions

In the published hard-tier benchmark, Hive used fewer LLM calls and less total API spend than an agent that asked the LLM to choose every action. Real tool execution, six tasks, hidden grading tests, and repeated runs with DeepSeek-V4.1-Flash:

| | baseline (LLM-everything) | context (escalate-only) | hive (rule-routed) | |---|---|---|---| | Resolve rate | 77/90 (86%) | 74/90 (82%) | 74/90 (82%) | | Mean LLM calls | 7.31 | 7.20 | 3.04 | | Total cost | $0.368 | $0.394 | $0.214 | | McNemar vs baseline | — | notseparable (p=1.0) | notseparable (p=1.0) |

The opportunity is lower orchestration cost—not a claim of higher intelligence. This table measures the rule-based routing path; [the trained CPU router has a separate evaluation](benchmarks/README.md). Resolve counts were lower than baseline, and “not separable” does not prove equal quality. These small, project-authored benchmarks support a pilot, not a guarantee for your workload.

[Explore the results and reproduce the runs](benchmarks/README.md) · [Audit the provenance and retractions](docs/benchmarks/PROVENANCE.md)

What it does

Three capabilities you can wire into your existing agent:

  1. Spend model calls on reasoning. Route supported mechanical steps from observable state; escalate when the policy cannot make an accepted, executable decision.
  2. Keep useful context, trim repetition. Compress tool output and logs before they enter the next model call.
  3. Reuse what worked. Recall prior fixes through causal memory instead of starting every repeat from scratch.
   agent request → HiveStack → { route, compress, remember } → LLM (only when needed)

Best fit: developers who own an agent's tool loop and want to measure its routing and context costs. Start with a controlled pilot against your existing harness, keep your task-quality checks, and compare total cost per successful task. Hosted semantic routing is optional and is not the source of the headline result.

Run it

> Not yet on PyPI — install from source. pip install hive-agent-memory is > planned but the name does not resolve on PyPI yet.

git clone https://github.com/DJLougen/hive && cd hive
pip install -e .                           # base: rule_fast + rust_brain
from hive import HiveStack

stack = HiveStack()
result = stack.step(
    {"goal": "Fix auth bug", "step": 1},
    [("user", "login is failing"), ("assistant", "checking logs...")],
)
result["decision"]    # RouteDecision — CPU-routed or escalated
result["compressed"]  # CompressedTurn — what the LLM actually sees

Reproduce the benchmark:

python scripts/hive_bench.py --backend openai \
    --endpoint  --api-key-env  --model  \
    --suite benchmarks/tasks/suite.hard.json --arm all --repeat 15

Where to go next

| I want to… | Read | |---|---| | Understand the benchmark numbers | [benchmarks/README.md](benchmarks/README.md) | | See the full API (route, compress, remember, recall, step) | [docs/USAGE.md](docs/USAGE.md) | | Wire it into an agent harness | [docs/HARNESS_SETUP.md](docs/HARNESSSETUP.md) | | Use it from Cursor / Claude Desktop / Codex | [docs/MCP_SETUP.md](docs/MCPSETUP.md) | | Understand the architecture & modules | [docs/architecture.md](docs/architecture.md) | | Deploy it (Docker, K8s, enterprise) | [docs/](docs/) | | Contribute or report a security issue | [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md) · [.github/SECURITY.md](.github/SECURITY.md) |

Status

v0.7.0 (Beta, unreleased — last release v0.6.1; see [docs/CHANGELOG.md](docs/CHANGELOG.md) and [docs/RELEASE_NOTES.md](docs/RELEASENOTES.md)). Routing-accuracy numbers are in-distribution — see the OOD caveat in [docs/architecture.md](docs/architecture.md). PFN / busyBee-cpu training-mode integration is in progress (busyBee-cpu).

Roadmap

  • [x] Core orchestration (routing, compression, causal memory)
  • [x] Enterprise modules (auth, encryption, audit, rate limiting, multi-tenancy)
  • [x] Native Rust backend (hive-cpp) with multi-platform wheels
  • [x] Real-workload held-out A/B evaluation (three tiers, honest provenance)
  • [x] MCP + FastAPI agent extras ([agents], [server], [mcp])
  • [ ] PFN-based busyBee training mode (inference + campaign retrain from FeedbackBuffer)
  • [ ] Durable distributed memory backend (gossip replication in place; durability pending)
  • [ ] Kubernetes operator for autoscaling
  • [ ] Broader out-of-distribution routing coverage

License & citation

MIT — see [LICENSE](LICENSE). Cite via [.github/citation.cff](.github/citation.cff):

@software{hive2026,
  title  = {Hive: orchestration layer for AI agents},
  author = {Lougen, Daniel J.},
  year   = {2026},
  url    = {https://github.com/DJLougen/hive}
}

Issues: · Discussions:

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.