Reactive core
The reactive core turns isolated agent runs into durable systems. It consists of an event bus, a rules engine, a distributed task pad, and executor dispatch.
Event bus
EventBus validates typed system events and explicitly namespaced custom events, stores them, and delivers matching subscriptions. Clanker includes memory and JSONL stores plus a bridge from runtime AgentEvents.
Events carry correlation and causation IDs. Those links make multi-agent work traceable and let downstream consumers follow a complete task subtree.
Rules
RuleEngine reacts to bus events. Rules combine:
- an event type;
- a structured condition (or strict string DSL compiled to one);
- a registered action with validated, templated parameters.
Rules fail loudly at registration when an event, path, action, or parameter is invalid. engine.explain(event) reports why each rule matched or did not match.
Pad
The pad is a shared task system for agents. It models tasks, dependency DAGs, claims, attempts, blockers, heartbeats, and explicit state transitions.
Reconciler finds stale attempts and expired blockers. ExecutorDispatcher matches ready work to executors by capability. Memory, JSONL, and remote task stores implement the same contract.
Built-in integration
registerClankerActions wires common rule actions—invoke an agent, create or transition work, and emit events—into the runtime. The result is a visible flow:
event → rule → action → task/agent run → eventThe Clanker host assembles these pieces for long-running use.