Skip to main content

Multi-Agent Orchestration for Hermes Agent. Code constrains AI โ€” not the other way around.

Project description

Hermes Plugin Python DeepSeek License Tests

๐Ÿ 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

  1. Create profiles/{my-agent}/config.yaml
  2. Create agents/{my-agent}/soul.md
  3. Add to constitution.md if global rules apply
  4. Register in orchestrator/protocol.py if 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_hive-2.0.28-py3-none-any.whl (116.4 kB view details)

Uploaded Python 3

File details

Details for the file hermes_hive-2.0.28-py3-none-any.whl.

File metadata

  • Download URL: hermes_hive-2.0.28-py3-none-any.whl
  • Upload date:
  • Size: 116.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for hermes_hive-2.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 85578794de4c8950eda0cd15c4e745ff96a7e7b069d9dd29c40371f4435991f7
MD5 2ef9f534d041df5496d52f316c90f9f2
BLAKE2b-256 af2c166dc5326e77f400b2b0b1e5293c11b2521a794926a98859986b3ab6aac2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page