Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermespace

The production Access Engine for Hermes Agent.

Python Hermes Agent Version Smoke 9/9 MIT

World Model · Workbench · Quick Start · CLI · Docs · About


Hermespace gives Hermes Agent a bounded, session-safe working room. It selects active concepts before a material turn, keeps silent intermediates out of user chat, observes native tools/subagents, and preserves continuity after the turn. Hermes remains the actor; Hermespace keeps the problem coherent.

Install Space and any Hermes Agent gets a better turn: a bounded desk, plus optional Cube library and Insight pattern card as organs behind one unioned plugins.enabled. Cube and Insight stay standalone repos — Space soft-imports them when present and never rewrites a plugin list or a memory provider you already chose.

Production target: Hermes Agent v0.20.0+ — CLI, gateways, A2A, tools, subagents, turn boundaries, and finalization.


The World Model

A persistent agent world. Standalone, the local JSONL warehouse may grow. When HermesCube is installed, World projects from the Cube book and does not grow a second forever-archive.

Archive

from hermespace import WorldModel

wm = WorldModel(agent_id="my-agent")
wm.enter()                                  # agent enters the world
wm.add_belief("Fast deploys reduce risk", 0.85, source="observation")
wm.add_belief("Fast deploys reduce risk", 0.85, source="observation")  # reinforces
wm.add_landmark("Zero-downtime deploy v2")
wm.set_trait("operations-minded")
wm.set_goal("Improve deploy pipeline", decision="A — automate", plan=["audit", "implement", "verify"])
wm.add_relationship("dev-team", "team", 0.8)
print(wm.render_markdown())                 # epoch-aware markdown
wm.evolve()                                 # consolidate, detect patterns, check epoch

Standalone mutations append to ~/.hermespace/worlds/{agent_id}_archive.jsonl. With Cube, World is a projection (pulse_charge / sync_world_beliefs) and that JSONL is not a second book.

Entry types: enter, leave, landmark, belief, trait, evolution, focus, epoch_transition, resolve, relationship.

Epochs

The agent's stage is measured by accumulated experience, not wall clock:

Epoch Entries Behavior
Genesis <5 Brief timeline, all entries visible
Growth 🌱 5–24 Section headings, summarized older entries
Maturity 🎓 25–99 Condensed timeline, wisdom from top beliefs
Wisdom 🧠 100+ Evidence-gated wisdom, deeply held beliefs only

Epoch transitions are recorded as epoch_transition archive entries and change how the world is rendered in the agent's context block.

Beliefs

Beliefs have confidence (0–1) and corroboration count. Calling add_belief with the same statement reinforces — confidence increases by +0.1, corroboration increments. The evolve() cycle consolidates semantic notes from SemanticStore and detects recurring patterns in landmarks.

Causal Chains

Every entry can reference parent entries via causal_parents. set_goal() links to the most recent timeline entry. trace_chain() walks backward through the archive.

# Walk the chain
focus_entries = wm.archive.query("focus")
chain = wm.trace_chain(focus_entries[-1].id)

# Resolve an outcome
wm.resolve_outcome(lm_entry.id, "success")

Evolution

The evolve() cycle runs five stages:

  1. Consolidate semantic notes into beliefs
  2. Detect recurring patterns in recent landmarks
  3. Analyze relationship affinity trends
  4. Detect milestones (entry count thresholds, high-confidence beliefs)
  5. Generate open questions from low-confidence beliefs

Then checks for epoch transition, refreshes active concepts (Access Workspace hub, max 25), and writes an evolution archive entry.

The world_evolve pulse job runs this hourly. Manual: hs world evolve or WorldModel.evolve().

Context Injection

One user-message inject, progressive disclosure. Mid-load target ≤2.8k (hard cap <9k); high/protect ≤900. Fluent ack, high load, or a missing organ injects nothing. Cube is skipped when the provider already prefetched. Spoken Report stays short (line 1 = next action); dense context is not also dumped into chat. Harvest runs on finalize (≤10s, fail-open) and never rides the inject path.

CLI

hs world show               # render world.md
hs world enter              # agent enters the world
hs world leave              # agent leaves (session end)
hs world evolve             # run evolution cycle
hs world add-belief --statement "..."
hs world add-landmark --event "..."
hs world set-trait --trait "..."
hs world set-goal --goal "..."
hs world search --query "deploy"
hs world archive-stats      # count by entry type
hs world timeline --limit 10
hs world resolve --entry-id <id> --outcome success
hs world trace --entry-id <id>

The Workbench

Alongside the world, Hermespace provides a desk for the current turn — FOA, dual decode, skills+MEMORY fabric, neural FOA, and an autonomy grid.

Feature What it does
Functional Access Workspace Harness global workspace — hold/summon concepts, silent reasoning, FOA≤4, hub≤25
Focus of Attention ≤4 items, single active goal per turn
Dual Decode Human gets a short report (line 1 = next action); the model gets one lean inject. Never dump raw inject into chat.
Cube heart (optional) Soft cable to HermesCube — skip cube_beat on pre_llm when memory.provider=hermescube (MemoryManager already prefetched); pulse_charge / sync_world_beliefs still recharge World; standalone warehouse when Cube absent
Insight (optional) Soft cable — perceive_card only (≤400), skip on high/protect; usable/lever write-back on desk.meta only; never required
Skills + Memory Fabric Ranks Hermes skills per goal; injects MEMORY.md / USER.md excerpts
Neural FOA HERMESPACE_NEURAL_BACKEND=auto — Ollama embeddings when live, hash fallback
Autonomy Grid Missions, lenses, dream, self-talk, skillbench, title/tree, access gates. Ground-up design.
Pulse Runtime Desk-aware pocket rhythm — idle tick, dream, world evolve, mission pulse
Desktop View Sidebar + full page plugin for Hermes Desktop, with Tailscale viewport and socket API

Quick start

hs install                  # Space plugin+skill; offers Cube + Insight
# or: hermes plugins install PabloTheThinker/hermespace --enable
hs ops doctor               # FAIL if Space is broken; WARN if Cube/Insight missing
hs bench week1              # C1 T1 L1 M1 offline fixtures; Q1 NOT RUN without a judge

For a development checkout:

git clone https://github.com/PabloTheThinker/hermespace.git
cd hermespace
./scripts/install_hermes.sh
python scripts/verify_hermes_integration.py
from hermespace import Workbench

wb = Workbench(agent_id="my-agent", session_id="main")
wb.enter()
r = wb.receive_order("Ship the patch", goal="Ship", decision="A — ship", plan=["implement","test"], say="Shipping.", force=True)
print(r["user_reply"])       # → human
ctx = r["model_context"]     # → model (includes world context)

Hermes plugin hooks

Hook What happens
on_session_start Initialize session desk/hub and stage first-turn context
pre_llm_call Select bounded Access Workspace context (user-message only)
post_llm_call Observe successful native response and update workbench
pre_tool_call Observe upcoming tool (name only; fail-open, never deny)
post_tool_call Record bounded tool-name/count telemetry (no payloads)
on_skill_lifecycle Park skill:{name}:{event} — no skill body
kanban_task_claimed / kanban_task_completed Park kanban id so the hub moves
pre_verify Observe a verify gate (fail-open)
on_session_end Lightweight end-of-turn receipt (Hermes v0.20 semantics)
on_session_finalize Harvest ≤10s fail-open, world leave, idle maintenance
subagent_start/stop Track specialist lifecycle for runtime observability

How it works

User message
    │
    ▼
 GATE  ── trivial? skip ── material? continue
    │
    ▼
 ENCODE → DESK → PLAN     FOA, load, decision, steps
    │
    ▼
 DECODE                   report (human) + context (model)
    │
    ▼
 BROADCAST                one lean inject (desk FOA; no world dump)
    │
    ▼
 ACT                      Hermes tools / code / ship
    │
    ▼
 SEAL                     episodic + semantic promote + world evolve

State (local, never committed):

$HERMESPACE_HOME/memory/hermespace/
  ACTIVE.md              live desk
  sessions/              per-session ACTIVE desks (hashed Hermes session IDs)
  access/                per-session AccessHub state
  runtime/               bounded hook telemetry (names/counts, no payloads)
  hermespace.db          turn database
  journal/               human-readable logs
  workbenches/           per-agent workbench JSON
  worlds/                world archive (JSONL) + cache (JSON)

CLI

Command Purpose
hs world show|enter|leave|evolve|search|archive-stats Persistent world
hs base connect|turn|roles|metrics|lens|audit|chain|harvest Access Engine (open-source GWT for Hermes)
hs access hold|report|broadcast|lens|swap|audit|reflect|harvest|view True Access Workspace environment
hs cube status|ensure|beat|pulse|seal|inject Cube heart/center (standalone-safe)
hs turn Full INPUT → OUTPUT turn
hs workbench enter|order|idle|park|status Session workbench
hs fabric / hs skills MEMORY + ranked skills
hs grid mission-add|lens-set|think|dream|skill-register Autonomy grid
hs pulse tick|daemon|status Pulse runtime
hs neural caps|eval Neural FOA
hs view --serve --port 8764 Desktop viewport
./scripts/smoke_test.sh Health (9/9)

Docs

Doc Contents
PURPOSE.md North star — true external Access Workspace + Cube night path
LAYOUT.md Codespace / folder map
docs/assessment/28-hermes-agent-jspace-assessment.md Hermes Agent updates → OEW plan
docs/access/thesis-oew.md Obligatory External Workspace thesis
docs/access/29-baars-changeux-anthropic.md Baars · Changeux/Dehaene · Anthropic research bridge
docs/access/30-day-to-day-higher-order.md Day-to-day higher-order Hermes usage
docs/access/31-anthropic-x-video-deep-dive.md Anthropic X video — how J-space is operated
docs/access/32-hermespace-access-engine.md Hermespace Access Engine architecture
docs/ops/35-production-operations.md Hermes v0.20 lifecycle, install, health, recovery
docs/access/27-environment.md Environment API
ABOUT.md Philosophy, design principles, author
docs/architecture/CODEMAP.md Where to edit (layer map)
docs/architecture/HERMESCUBE.md Cube heart/center contract
docs/architecture/INSIGHT.md Insight perceive-card cable
INTEGRATION.md Python · CLI · plugin · workbench doors
skills/hermespace/SKILL.md Agent skill (load in Hermes)
docs/integration/FOR_HERMES.md Maintainer / dogfood brief
CONTRIBUTING.md How to contribute
WORKFLOW.md GATE → SEAL stages
SECURITY.md What never ships in git
docs/roadmap/phases-oew.md OEW phases A–D
docs/README.md Full docs folder index
spec/DESK.md Desk schema
spec/PROTOCOL.md Protocol spec

Repository Layout

LAYOUT.md                codespace map (start here for structure)
src/hermespace/          runtime package
  access/                ★ external Access Workspace (hub · env · OEW protocol)
  grid/                  autonomy grid
hermes_plugin/           Hermes session / pre_llm / end hooks
skills/hermespace/       public Hermes agent skill
docs/                    access · assessment · architecture · ops · research
scripts/                 CLI, install, smoke test, security audit
tests/ · experiments/ · desktop_plugin/ · spec/

Full map: LAYOUT.md.


Verify

PYTHONPATH=src python3 -m unittest discover -s tests -v
./scripts/smoke_test.sh              # expect pass=9 fail=0
./scripts/security_audit.sh          # before any public push

About

Built by PabloTheThinker. Hermespace is an independent companion for Hermes Agent, not an official Nous Research product.

ABOUT.md — philosophy, design principles, related projects.


License

MIT

About

Pocket workbench for Hermes Agent — limited FOA desk, dual decode, skills+MEMORY fabric, neural FOA. Not J-space. Not a second runtime.

Topics

Resources

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages