Multi-Agent Orchestration for Hermes Agent. Code constrains AI โ not the other way around.
Project description
๐ HIVE
Code constrains AI โ not the other way around.
Multi-Agent Orchestration for Hermes.
Architect โ Planner โ Coder โ Reviewer. All driven by a deterministic state machine,
none driven by prompt prayers.
pip install hermes-hive
Why HIVE?
Every multi-agent framework tells LLMs "please follow these rules."
HIVE doesn't ask. It enforces.
| Framework | How it constrains LLMs | Can LLM break it? |
|---|---|---|
| CrewAI | Prompts describe roles | โ Yes โ LLM forgets it's a Coder |
| AutoGen | Agents negotiate via chat | โ Yes โ two LLMs agree on a mistake |
| MetaGPT | SOP written in prompts | โ Yes โ LLM skips a step, no one notices |
| LangGraph | Graphs, but LLM can route edges | โ Yes โ LLM takes wrong path |
| HIVE | State machine in Python code | โ No โ code is the guard |
HIVE's orchestrator is a deterministic state machine (transitions library, 12 states, 23 transitions). LLMs are called only at specific states (Architect, Planner, Reviewer). They cannot skip steps, change the flow, or override constraints.
Quick Start
pip install hermes-hive
hive init
hive build "A CLI calculator"
That's it. HIVE orchestrates 4 agents across your project. You watch it build.
Upgrade
pip install --upgrade hermes-hive
# No hive init needed โ SKILL.md auto-updates on next startup
Maintenance (tell your Hermes)
- "Upgrade HIVE" โ
pip install --upgrade hermes-hive - "Check HIVE health" โ
hive doctor - "Clean up HIVE" โ
hive cleanup
Upgrade
pip install --upgrade hermes-hive
# No need to re-run hive init โ SKILL.md auto-updates on next startup
The 4-Agent Pipeline
You: "Build a calculator"
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐๏ธ Architect (v4-pro) โ
โ Multi-turn requirements dialogue โ
โ โ User confirms โ
โ โผ โ
โ project_brief.json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Planner (v4-flash) โ
โ Splits into DAG tasks: โ
โ T1: Core engine (reasonix) โ
โ T2: Deploy verify (toolman) โ
โ T3: Cleanup (toolman) โ
โ โ โ
โ โผ โ
โ tasks/*.json โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โจ๏ธ Coder (Reasonix / LLM fallback) โ
โ Writes code + pytest self-verify โ
โ T1 โ calculator.py โ
โ โ โ
โ โผ โ
โ src/*.py โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Reviewer (v4-flash) โ
โ Audits every output: โ
โ โ
pass โ next layer โ
โ ๐ก minor โ retry โ
โ ๐ด fatal โ replan โ
โ โ โ
โ โผ โ
โ โ
DONE โ projects/ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Every transition between boxes? Python code, not an LLM decision.
HIVE is a Hermes plugin. No extra desktop app needed.
~/.hermes/
โโโ config.yaml โ HIVE reads your model/API config
โโโ .env โ HIVE reads your API keys
โโโ skills/hive/ โ SKILL.md teaches Hermes when to invoke hive
โโโ hive/
โโโ hive.json โ ๐ Global config
โโโ projects/ โ Built projects
โโโ chroma_db/ โ L3 vector memory
โโโ skill_registry.json
From Hermes CLI or Desktop: "Build me a web scraper" โ Hermes loads the hive skill โ runs hive build.
What HIVE Manages
| Capability | Description |
|---|---|
| Project lifecycle | Versioned briefs, changelogs, task progress |
| Skill evolution | DONE triggers skill extraction; review โ approve/reject/merge |
| L3 Memory (ChromaDB) | 3-domain vector memory, BGE embeddings (optional) |
| Crash recovery | Atomic file-system checkpoints; resume skips done tasks |
| Parallel execution | ThreadPoolExecutor, max 3 concurrent agents |
| Entropy control | Stale workspace cleanup, dormant skill archival |
| Full audit trail | Every action โ JSON file. Debuggable, replayable |
| LLM fallback | Coder: Reasonix (Go) preferred, LLM auto-fallback |
| Multi-Provider | DeepSeek / OpenAI / Anthropic / OpenRouter |
| Bilingual CLI | lang zh / lang en instant switch |
| Open framework | Add custom agents via config files โ no code changes needed |
Customize & Extend
HIVE is an open framework. Every agent is defined by configuration files, not hardcoded logic. You โ or your Hermes agent โ can add new agent roles, tune behavior, and manage the ecosystem without touching Python code.
Agent Configuration (3 files per role)
profiles/{role}/
โโโ config.yaml โ model, tools, memory settings
agents/{role}/
โโโ soul.md โ agent identity & behavior rules
โโโ skills.md โ domain knowledge & patterns
โโโ model.yaml โ model parameters
Constitution (agents/constitution.md)
Global rules injected into every agent. All agents share this โ define cross-cutting constraints here.
Ecosystem Management (governance/)
| File | Purpose |
|---|---|
skill_governor.py |
Skill registry โ conflict detection, lifecycle |
hive_memory.py |
ChromaDB L3 memory โ three-domain vector store |
entropy.py |
Cleanup โ stale workspaces, dormant skills |
profile_manager.py |
Profile validation on startup |
Global Configuration (hive.json)
All HIVE behavior is controlled by a single file at ~/.hermes/hive/hive.json. Deployed automatically by hive init.
๐ Safety guarantee: If you delete this file, corrupt the JSON, or set invalid values โ HIVE runs with code defaults. Each field falls back independently. You cannot break HIVE by misconfiguring it.
{
"orchestrator": // max_children, max_retries, parallel_workers โฆ
"provider_defaults": // deepseek / openai / anthropic / openrouter
"coder": // engine: auto | reasonix | llm
"memory": // ChromaDB enabled, embedding model, top_k
"language": // default: zh | en
"skills": // auto_approve, merge_threshold
"entropy": // workspace TTL, skill lifecycle days
"agent_overrides": // per-role temperature / max_tokens
}
Full reference: see hive.json in the repository.
Adding a New Agent
- Create
profiles/{my-agent}/config.yaml - Create
agents/{my-agent}/soul.md - Add to
constitution.mdif global rules apply - Register in
orchestrator/protocol.pyif new task types needed
No Python code changes required for basic agents. The state machine discovers profiles from the filesystem.
Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HIVE Orchestrator โ
โ (Pure Python State Machine) โ
โ โ
โ IDLE โ ARCHITECTING โ PLANNING โ โ
โ DISPATCH โ EXECUTING โ REVIEWING โ โ
โ DONE / REPLAN / RETRY โ
โ โ
โ ๐ LLMs cannot cross state boundaries โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโผโโโโ โโโโโผโโโโโ โโโโผโโโโโโโ
โArchitectโ โPlanner โ โReviewer โ
โ(v4-pro) โ โ(v4-flash)โ(v4-flash)โ
โโโโโโโโโโ โโโโโโโโโโ โโโโโโโโโโโ
โ
โโโโโโโผโโโโโโ
โ Reasonix โ
โ (Go binary)โ
โโโโโโโโโโโโโ
Communication: File system + JSON
Concurrency: Atomic file renames
Auditability: Every action = one JSON file
Design Philosophy
1. Code Constrains LLMs. If the rule can be expressed in code, it's in code. Prompts are for creative work, not enforcement.
2. File System as Protocol. Agents communicate via JSON files in agreed directories. cat any file to see exactly what happened.
3. No Trust. LLMs fill fields โ code validates and may override. Reviewer misses a task? Code fills in default pass. LLM misjudges? Code override corrects it.
4. Local-First. Everything runs locally. Orchestration, memory, and state stay on your machine.
Requirements
- Hermes Agent โ github.com/NousResearch/hermes-agent
- Python 3.12+
- API key in
~/.hermes/.env(DeepSeek / OpenAI / Anthropic / OpenRouter) - Reasonix (optional โ LLM Coder auto-fallback)
vs. The Competition
| Feature | HIVE | CrewAI | AutoGen | LangGraph |
|---|---|---|---|---|
| Constraint | Code state machine | Prompt roles | Prompt negotiation | Graph + LLM routing |
| LLM breaks flow? | โ No | โ Yes | โ Yes | โ Yes |
| Crash recovery | โ Checkpoint | โ | โ | โ |
| Parallel execution | โ ThreadPool | โ sequential | โ conversation | โ graph |
| Auditability | Every action = file | Logs | Logs | Traces |
| Memory | 3-domain ChromaDB | Single vector DB | History | Checkpoints |
| Skill evolution | โ Auto-extract | โ | โ | โ |
| Hermes native | โ Plugin | โ | โ | โ |
| Install size | <300KB | pip + deps | pip + deps | pip + deps |
FAQ
Q: Do I need to know multi-agent systems?
No. Type hive build "your idea" and watch.
Q: What if the LLM makes a mistake? Reviewer catches it. Minor โ retry. Fatal โ replan. Code override prevents LLM misjudgments from derailing builds.
Q: Can I use OpenAI instead of DeepSeek? Yes. HIVE reads Hermes's provider config. Set provider in profile configs.
Q: What if my computer crashes mid-build?
hive resume picks up from the last checkpoint.
Q: Is this just a fancy prompt chain? No. The orchestrator is a Python state machine. LLMs are called at 4 specific points. Everything between is deterministic code.
Q: Do I need Hermes? Yes โ HIVE is a Hermes plugin. It uses Hermes's AIAgent engine and provider management.
Built for the Hermes ecosystem. v2.0.2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hermes_hive-2.0.23-py3-none-any.whl.
File metadata
- Download URL: hermes_hive-2.0.23-py3-none-any.whl
- Upload date:
- Size: 116.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
368ad53fb4472ddf652e7021457bcd74d1b1deb545c753f1540f126220963175
|
|
| MD5 |
5befdc533389ea403de1f0901908a962
|
|
| BLAKE2b-256 |
8e8ebe8df03c2416a455139b9acb186e57d44cdaa37da7502cda793fdc9b1c51
|