Event bus topics
The topics protoAgent's core publishes, and the rules for subscribing to them. A plugin reacts to these with registry.on or sdk.react_on, and a console view through the view bridge.
The bus carries inter-plugin events. For direct calls, use registered plugin services. Plugins must not import one another's internals (ADR 0039). The bus is ephemeral: a small ring buffer lets a reconnecting subscriber catch up via since, but there is no durable log. Persist what you need to keep.
Matching
Topics are dot-namespaced. A subscription pattern may use two wildcards:
| Pattern | Matches | Doesn't match |
|---|---|---|
# | everything | — |
watch.* | watch.met | watch.a.b |
watch.# | watch, watch.met, watch.a.b | goal.changed |
watch.met | exactly that | anything else |
* matches one segment; # matches the tail. (Verified against topic_matches: watch.* vs watch.a.b → False, watch.# vs watch.a.b → True.)
Core topics
Generated by scanning every publish/emit call in the core packages, so this is what the runtime actually emits — not a list someone remembered to update. Payload keys are the union of what the emitting call sites pass; a key may be absent on a given event.
| Topic | Payload keys | Emitted from |
|---|---|---|
activity.message | context_id, error, inbox_id, origin, origin_session, priority, role, state, stimulus, task_id, text, trigger | src/server/a2a.py, src/server/interrupted_turns.py +1 |
background.completed | description, error, job_id, origin_session, result, status, subagent_type | src/background/manager.py, src/server/a2a.py |
background.progress | error, job_id, output, phase, task_id, tool, tool_call_id | src/background/manager.py, src/server/a2a.py |
background.started | description, job_id, origin_session, status, subagent_type | src/background/manager.py |
chat.progress | session_id, task_id | src/server/a2a.py |
chat.resumed | error, origin, session_id, state, task_id, text, trigger | src/server/a2a.py |
decision.changed | id, session_id, state | src/graph/decisions.py |
delegation.finished | completion, cost_usd, duration_ms, error, from, id, nudges, outcome, parent_id, run_id, to_instance, to_kind, to_name | src/graph/ledger.py |
delegation.progress | id, progress, to_name | src/graph/ledger.py |
delegation.started | (varies) | src/graph/ledger.py |
directive.changed | id, instance_wide, session_id | src/graph/directives.py |
fs.changed | paths, project, source | src/graph/fs_changes.py |
goal.achieved / goal.failed | condition, evidence, reason, session_id, status | src/graph/goals/controller.py |
goal.changed | session_id | src/graph/goals/store.py |
goal.iteration | condition, iteration, max_iterations, reason, session_id | src/graph/goals/controller.py |
inbox.item | delivery, id, needs_human, priority, session, source, text | src/operator_api/console_handlers.py, src/server/a2a.py |
inbox.reply | id, replied_at, source, text | src/tools/lg_tools.py |
media.saved | id, mime, plugin, url | src/graph/plugins/registry.py |
memory.hot_written | chunk_id, preview, source, source_type | src/knowledge/store.py |
model.fallback | fallback_index, fallback_model, primary_error, skipped_blocked | src/graph/agent.py |
persona.drift_detected | baseline_id, baseline_saved_at, rationale, score, signals, threshold | src/server/maintenance_loops.py |
persona.untooled_action_detected | count, findings, soul_revision, trigger | src/server/maintenance_loops.py |
plugin.changed | scope | src/server/settings_apply.py |
plugin.updated | by, id, reloaded, resolved_sha, version | src/server/maintenance_loops.py |
provider.usage | (varies) | src/observability/usage_store.py |
scheduler.changed | action, job_id | src/operator_api/console_handlers.py, src/scheduler/local.py +1 |
scheduler.completed | (varies) | src/server/a2a.py |
scheduler.fired | job_id, prompt, schedule | src/scheduler/local.py |
turn.finished | ok, origin, origin_session, session_id, state, task_id, trigger | src/background/manager.py, src/scheduler/local.py +1 |
turn.input_required | context_id, prompt, task_id | src/server/a2a.py |
turn.resumed | context_id, task_id | src/server/a2a.py |
turn.started | caller, origin, origin_session, session_id, summary, task_id, trigger | src/background/manager.py, src/scheduler/local.py +1 |
turn.usage | context_id, cost_usd, duration_ms, input_tokens, model, output_tokens, soul_rev, state, task_id | src/server/turn_telemetry.py |
ui.navigate | plugin, view | src/graph/plugins/registry.py |
watch.changed | id | src/graph/watches/store.py |
watch.expired | (varies) | src/graph/watches/controller.py |
watch.met | (varies) | src/graph/watches/controller.py |
watch.stalled | (varies) | src/graph/watches/controller.py |
watch.value_changed | (varies) | src/graph/watches/controller.py |
Publishing your own
registry.emit("created", {...}) publishes <your-plugin-id>.created — the namespace is forced, so a plugin can only publish under its own id. Declare your topics in the manifest (emits) so other plugins can discover the contract instead of reverse-engineering it, optionally with a payload schema (emits_schemas). Declarations are for discovery only — payloads are never validated at publish time.
Publishing is safe from any thread: an off-loop publish reroutes itself onto the bound event loop, so emitting from a sync middleware hook works. One exception — an off-loop publish before any loop is bound is dropped with a warning.
Related: Plugins ▸ Events · Plugin SDK · Lifecycle events