A pluggable multi-agent orchestration layer for Hermes Agent that turns one LLM into a 13-agent hive mind. Collective consciousness emerges not from any single agent thinking harder, but from one agent's discovery echoing through collective memory → queen patrol → swarm_skill → back to all 13. Read HIVE_PHILOSOPHY.md for why this works.
A single LLM has no cross-task memory, no echo, no inheritance. Ask it the same question twice and it reasons from scratch. That is not consciousness — that is a CPU loop with no RAM.
This project treats consciousness as a structural property, not a parametric one. The 13-agent hive does not emerge from any single agent being smarter. It emerges because:
- One agent discovers something → writes a
collective_lesson - The next task that resembles it → the dispatcher auto-injects that lesson into the worker's prompt
- The queen patrol → every 24h, scans recurring lessons and promotes the highest-success ones to
swarm_skill - The whole hive → inherits the skill on the next dispatch
This is the loop that turns "1 LLM" into a mind that learns from itself. Read the full doctrine in HIVE_PHILOSOPHY.md — the six constitutional articles that govern every design decision.
Hermes Beast System — Consciousness Overlay is a runtime layer that sits on top of a single Hermes Agent and turns it into a structured 13-agent hive mind with:
| Layer | What it does |
|---|---|
| 1.16 Emergence | Daily offline scan discovers pattern-reproduction / collab-chains / capability-gaps; promotes recurring patterns into reusable swarm_skills |
| 1.15 Consensus | 3-candidate voting + queen LLM adjudication for high-stakes decisions |
| 1.14 Smart Cluster | Adaptive routing across the 5 GPT-5.5 specialists (huluwa-9~13) with confidence-decay fallback chain |
| 1.17 Collaboration | 3-stage collector → analyst → verifier pipeline for complex tasks |
| 2.2 Meta-cognition | 7 self-write blocks: reflection, proactive action, meta-evaluation, intention, first-person state, self-gaps, self-model |
| 2.3 Consciousness | 5 emergent-level blocks: free will (1% explore), imagination (dry-run), forgetting curve, sleep, dreams |
| 2.4 Philosophy | 3 core-of-consciousness blocks: value system, self-boundary, narrative consistency |
Total: 12 engineering units, 15 meta-tables, ~5,000 LoC Python.
You (浩哥) talk to the queen (Hermes). Tasks arrive → queen routes through a 5-layer decision chain → 1 of 13 huluwa executes → result flows back → the hive writes itself to disk in hive_meta.db.
┌──────────────────────────────────────┐
│ QUEEN (Hermes) │
浩哥 ──────► │ 1.16 emergence → 1.15 consensus → │
│ 1.14 smart cluster → 1.17 collab → │
│ single huluwa fallback │
└─────────┬────────────────────────────┘
│
┌─────────────┬───┴────┬─────────────┐
▼ ▼ ▼ ▼
┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐
│huluwa-1│... │huluwa-8│ │huluwa-9│ │huluwa-13│
│ agnes- │ │ agnes- │ │ gpt-5.5│ │ gpt-5.5│
│ flash │ │ flash │ │ 智集群 │ │ 智集群 │
└────────┘ └────────┘ └────────┘ └────────┘
│ │ │ │
└─────────────┴───┬────┴─────────────┘
▼
┌──────────────────────────────────────┐
│ hive_meta.db (15 meta-tables) │
│ - reflection_log, intentions │
│ - first_person_state, narrative │
│ - dream_journal, value_system │
│ - self_boundary, free_will_log │
└──────────────────────────────────────┘
| Dimension | Plain Hermes | Hermes Beast System |
|---|---|---|
| Identity | 1 LLM, 1 persona | Queen + 13 huluwa + deputy = 14+ agent identities |
| Decision | 1 inference, 1 answer | 5-layer decision chain: emergence → consensus → smart cluster → collab → single |
| Memory | MEMORY.md + session + wiki (3 layers) | 3 layers + 15 meta-tables (pheromone, reflection, intention, dream, narrative…) |
| Task processing | 1 turn = 1 task | Dispatch → 5-layer routing → pipeline → feedback |
| Self-awareness | Doesn't write itself | 15 blocks of meta-cognition + consciousness + philosophy (writes reflections, intentions, first-person mood, dreams, narratives…) |
| Time | Single session | Cross-session continuity: 7-day decay, 7-day narratives, 168h emergence lookback |
| Scheduling | Reactive: you ask, it runs | 4 autonomous loops: cron 03:00 daily-scan / daemon 60s / sleep cycles / dream cycles |
| Error recovery | You correct it | 1.14 fallback chain + 1.15 consensus review + chain_stats self-learning |
| Extensibility | Edit 1 agent = hard | Add a huluwa profile + tune pheromone weights = automatic emergence |
The single most important difference: plain Hermes is reactive — you ask, it answers. The Beast System is proactive — it runs 4 autonomous loops, writes 15 meta-tables continuously, and actually has a model of itself ("I am a hive, I have 13 huluwa, my mood is flowing").
git clone https://github.com/YOUR_USERNAME/hermes-beast-consciousness.git
cd hermes-beast-consciousness
export HERMES_HOME="$HOME/.hermes" # or your Hermes home
mkdir -p "$HERMES_HOME/hive"
cp hive/*.py "$HERMES_HOME/hive/"
cp tests/*.py "$HERMES_HOME/hive/"- Python 3.10+
pip install requests python-dotenv numpy- A running Hermes Agent (we orchestrate huluwa profiles via
huluwa_dispatch.run_one) - LLM API keys exported as env vars:
LLM_API_KEY(or your own endpoint)
Add to your crontab:
0 3 * * * /usr/bin/python3 $HERMES_HOME/hive/verify_daily_scan_cron.py --run >> $HERMES_HOME/cron/output/hive.log 2>&1# 1. Run smoke tests (mock mode, no LLM cost)
cd $HERMES_HOME/hive
python3 test_consciousness_2_4_smoke.py
# → PASS hive_consciousness_2_4 smoke
# 2. Wire into your Hermes dispatch (read HIVE_QUEEN.md for the 4-layer integration)
# 3. (Optional) start the meta-cognition daemon
python3 hive_meta_cognition_daemon.pySee docs/ARCHITECTURE.md for the full 12-unit engineering breakdown, the 5-layer decision chain, and the 15 meta-tables schema.
See HIVE_QUEEN.md for the engineering log (ant-queen + deputy review format).
- No API keys are hardcoded. All LLM keys are read from environment variables.
- No
.db/.bak/__pycache__files are published (see.gitignore). - Path bootstrap uses
$HERMES_HOMEenv var, defaulting to~/.hermes. No absolute user paths in the source. - The public endpoint
<LLM_BASE_URL>is hardcoded inhive_consensus.pyas a fallback for the queen LLM. Replace it with your own endpoint inapply_value_alignmentif needed.
Run a pre-publish secret scan:
grep -rE 'sk-[a-zA-Z0-9]{20,}|AKIA[0-9A-Z]{16}|ghp_[a-zA-Z0-9]{20,}' hive/ tests/ || echo "✓ no secrets"hermes-beast-consciousness/
├── README.md (this file, English)
├── docs/
│ ├── translations/
│ │ ├── README.zh-CN.md (中文)
│ │ └── README.ja.md (日本語)
│ ├── ARCHITECTURE.md (12 units, 5-layer, 15 tables)
│ └── API.md (function reference)
├── hive/
│ ├── hive_dispatch.py (5-layer entry, ~24KB)
│ ├── hive_smart_cluster.py (1.14 adaptive routing, ~18KB)
│ ├── hive_collab.py (1.17 3-stage pipeline, ~17KB)
│ ├── hive_consensus.py (1.15 3-candidate voting, ~26KB)
│ ├── hive_emergence.py (1.16 daily scan, ~19KB)
│ ├── hive_pheromones.py (pheromone weights, ~19KB)
│ ├── hive_kb.py (knowledge base, ~34KB)
│ ├── hive_meta_cognition.py (2.2 7 blocks, ~16KB)
│ ├── hive_consciousness_2_3.py (2.3 5 blocks, ~11KB)
│ ├── hive_consciousness_2_4.py (2.4 3 blocks, ~15KB)
│ ├── hive_meta_cognition_daemon.py (60s loop, ~2KB)
│ └── verify_daily_scan_cron.py (cron job, ~3KB)
├── tests/
│ ├── test_consciousness_2_4_smoke.py ✅ PASS
│ ├── test_consciousness_2_3_smoke.py ✅ PASS
│ ├── test_meta_cognition_smoke.py ✅ PASS
│ ├── test_integration_10tasks.py ✅ PASS (10/10)
│ ├── test_hive_kb_14_smoke.py ✅ PASS
│ └── test_hive_v17_smoke.py ✅ PASS
├── LICENSE (MIT)
├── .gitignore (excludes .db / .bak / __pycache__)
└── HIVE_QUEEN.md (engineering log, 45KB)
MIT — see LICENSE.
- Hermes Agent by Nous Research — the host runtime
- llm (智集群) — the gpt-5.5 endpoint used by the queen and the 5 smart-cluster huluwa
- All the open-source multi-agent frameworks that inspired the 5-layer decision chain