hive
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 39 GitHub stars
Code Uyari
- network request — Outbound network request in benchmarks/tasks/cache-key-collision/oracle/tests/test_cache_keys.py
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
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.
Hive
Orchestration layer for AI agents — CPU-side action routing, context compression, and causal graph memory that keep mechanical work and context bloat off the LLM.
Why it matters
An agent loop spends most of its LLM calls on mechanical work — list the files, run the tests, read the file the traceback named, re-run the tests. Each of those is a paid call with the whole transcript attached. Hive answers those on the CPU and only escalates the decisions that actually need reasoning. The model sees less, pays less, and resolves the same tasks.
The headline — hard tier, n=15, held-out oracle
On a 6-task benchmark built to separate the arms (real repos, hidden pytest oracle injected only at grading, DeepSeek-V4.1-Flash, n=15, spec review equalized):
| baseline (LLM-everything) | context (escalate-only) | hive (CPU-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 | — | not_separable (p=1.0) | not_separable (p=1.0) |
Hive matches the LLM-everything baseline task-for-task at 58% fewer LLM calls and ~45% lower cost — the routing is free capability, not a capability tax. On the easier 10-task suite it's starker: identical 30/30 resolve at −83% LLM calls and −82% prompt tokens.
Full per-task tables, the three retracted runs that got us here, and the honest caveats: benchmarks/README.md · docs/benchmarks/PROVENANCE.md.
What it does
Three jobs, all on the CPU, before the LLM is involved:
- Routes mechanical decisions —
read_file,run_tests,apply_patchgo to a CPU policy. No LLM call. Out-of-distribution states escalate instead of guessing. - Compresses context — a content-aware classifier drops or distills the wax (stale logs, unchanged files) so the LLM sees only the honey.
- Remembers causally — a timestamped graph records cause → effect → supersession, so the agent stops re-deriving what it already learned.
agent request → HiveStack → { route, compress, remember } → LLM (only when needed)
Run it
Not yet on PyPI — install from source.
pip install hive-agent-memoryis
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 <openai-compatible-url> --api-key-env <KEY> --model <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 |
See the full API (route, compress, remember, recall, step) |
docs/USAGE.md |
| Wire it into an agent harness | docs/HARNESS_SETUP.md |
| Use it from Cursor / Claude Desktop / Codex | docs/MCP_SETUP.md |
| Understand the architecture & modules | docs/architecture.md |
| Deploy it (Docker, K8s, enterprise) | docs/ |
Status
v0.7.0 (Beta, unreleased — last release v0.6.1). Routing-accuracy numbers are in-distribution — see the OOD caveat in docs/architecture.md. PFN / busyBee-cpu training-mode integration is in progress (busyBee-cpu).
Roadmap
- Core orchestration (routing, compression, causal memory)
- Enterprise modules (auth, encryption, audit, rate limiting, multi-tenancy)
- Native Rust backend (hive-cpp) with multi-platform wheels
- Real-workload held-out A/B evaluation (three tiers, honest provenance)
- 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. Cite via .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: https://github.com/DJLougen/hive/issues · Discussions: https://github.com/DJLougen/hive/discussions
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi