Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Coordination model

Agents coordinate through the environment — typed blackboard slots, decaying pheromone zones, and scheduler wake pressure. No conversation loops, router LLMs, or NL handoff chains.

Substrate primitives

PrimitiveRole
BlackboardTyped JSON slots; plugins read/write via PluginContext
Pheromone zonesSignal maps with exponential decay (PheromoneField)
Perception radiusBounds how far an agent reads field signals
Pressure fieldPressureScheduler queue — wake when deps + pressure ≥ threshold
CompletionNextAction::Complete deposits a completion signal; dependents wake

Wake pressure = min(base_pressure, min(dep signals)), boosted by multiplexer deposits (herdr_wake_boost).

Allowed vs forbidden

PatternStatus
Deposit completion → dependent wakesAllowed
Blackboard slot handoff (typed JSON)Allowed
NextAction::Delegate { task }Allowed
Multiplexer pane depositsAllowed
Agent-to-agent chatForbidden
Router LLM choosing next agentForbidden
Re-encoding substrate as NLForbidden

Coordination flow

flowchart TB
    G[Goal] --> P[encode_task]
    P --> Q[Pending queue]
    Q --> RP[refresh_pressure]
    RP --> DEP{deps met?}
    DEP -->|no| DEFER[deferred]
    DEP -->|yes| DISPATCH[dispatch]
    DISPATCH --> HOST[RunHost]
    HOST --> OBS[observation]
    OBS --> BB[Blackboard]
    OBS --> FIELD[PheromoneField]
    OBS --> V[verify_goal]
    V --> COMP[deposit completion]
    COMP --> FIELD
    FIELD --> RP

    classDef runtime stroke:#0969da,stroke-width:2px
    classDef substrate stroke:#8250df,stroke-width:2px
    classDef gate stroke:#1a7f37,stroke-width:2px

    class G,P,Q,RP,DISPATCH,HOST runtime
    class OBS,BB,FIELD substrate
    class V,COMP gate

Scheduler loop

CastellanEngine::run_goal:

  1. Encode the initial task from the plugin manifest
  2. Decay the field → refresh pressure → dispatch the ready batch
  3. Read host output → apply deposits → coordinate in-zone
  4. Verify → deposit completion → enqueue retries/delegates
  5. Snapshot field, topology, and wake stats into episode JSON under .castellan/episodes/

Multiplexer deposits

Remote observations may include pane deposits:

{"pheromone_deposits": [{"zone": "herdr", "signal": "activity", "amount": 0.5}]}

These feed herdr_wake_boost, waking stalled tasks when panes report activity.

See also