Event Types

Every action in the rebuno kernel produces events that form an immutable audit trail. Events are persisted in the event store and can be queried via the API or the rebuno CLI.

Event Structure

Every event has the following fields:

FieldTypeDescription
idUUIDUnique event identifier
execution_idstringThe execution this event belongs to
step_idstringAssociated step ID (empty for execution-level events)
typestringEvent type (see below)
schema_versionintPayload schema version
timestampdatetimeWhen the event was created
payloadobjectType-specific payload (see below)
causation_idUUIDID of the event or action that caused this event
correlation_idUUIDShared ID linking a chain of related events
idempotency_keystringDeduplication key
sequenceintMonotonically increasing sequence number within the execution

Event Categories

Events are classified into three categories:

  • State-mutating: Change the state of an execution or step. These are the primary events that drive the state machine.
  • Decisional: Record policy decisions (accept/deny) on intents.
  • Informational: Record notable occurrences that do not change state.

Persisted vs. Transient Events

Persisted events are stored in the event store and can be queried via GET /v0/executions/{id}/events. All event types listed below are persisted.

Transient SSE push events are sent over Server-Sent Events connections but are not stored in the event store:

Event TypePushed ToDescription
execution.assignedAgent SSENotifies an agent that an execution has been assigned to it
tool.resultAgent SSEDelivers a remote tool step result to the agent
signal.receivedAgent SSEDelivers a signal to the agent
approval.resolvedAgent SSENotifies the agent that an approval request has been resolved
job.assignedRunner SSEDispatches a tool execution job to a runner

These transient events are delivery mechanisms. The underlying state changes are captured by persisted events (e.g., execution.started, step.completed).

Execution Events

execution.created

Emitted when a new execution is created via POST /v0/executions.

{
  "agent_id": "researcher",
  "input": {"query": "what is event sourcing?"},
  "labels": {"env": "dev"}
}
FieldTypeDescription
agent_idstringTarget agent ID
inputobjectExecution input data
labelsobjectKey-value labels attached to the execution

execution.started

Emitted when the kernel assigns an execution to an agent via SSE.

{
  "session_id": "sess-abc123",
  "consumer_id": "researcher-x8f2k"
}
FieldTypeDescription
session_idstringThe session created for this assignment
consumer_idstringThe SSE consumer that received the assignment

execution.blocked

Emitted when an execution enters the blocked state, waiting for a tool result or signal.

{
  "reason": "tool",
  "ref": "step-abc123"
}
FieldTypeDescription
reasonstringWhy the execution is blocked: "tool", "signal", or "approval"
refstringReference: step ID (for tool/approval) or signal type (for signal)
tool_idstringTool being invoked (set when reason="approval")
argumentsobjectTool arguments (set when reason="approval")
remoteboolWhether the tool is remote (set when reason="approval")

execution.resumed

Emitted when a blocked execution returns to running state.

{
  "reason": "step completed"
}
FieldTypeDescription
reasonstringWhy the execution was resumed

execution.completed

Emitted when an agent submits a complete intent.

{
  "output": {"answer": "Event sourcing is..."}
}
FieldTypeDescription
outputobjectThe execution's output data

execution.failed

Emitted when an execution fails (agent submits fail intent, timeout, etc.).

{
  "error": "Tool execution failed: web.search returned 500"
}
FieldTypeDescription
errorstringHuman-readable error message

execution.reset

Emitted when the kernel resets an execution back to pending (e.g., after agent disconnect or recovery).

{
  "reason": "agent_disconnect",
  "from_status": "running"
}
FieldTypeDescription
reasonstringWhy the execution was reset (e.g., "agent_disconnect", "recovery")
from_statusstringThe execution status before the reset

execution.cancelled

Emitted when an execution is cancelled via POST /v0/executions/{id}/cancel.

{
  "reason": "user requested cancellation"
}
FieldTypeDescription
reasonstringWhy the execution was cancelled

Intent Events

intent.accepted

Emitted when the kernel accepts an intent (policy allows it or it is a lifecycle intent).

{
  "intent_type": "invoke_tool",
  "details": {"tool_id": "web.search", "step_id": "step-abc123"}
}
FieldTypeDescription
intent_typestringThe intent type: invoke_tool, complete, fail, wait
detailsobjectAdditional details about the accepted intent (optional)

intent.denied

Emitted when the kernel denies an intent due to policy.

{
  "intent_type": "invoke_tool",
  "tool_id": "shell.exec",
  "arguments": {"command": "rm -rf /"},
  "idempotency_key": "exec-123:shell.exec:a1b2c3d4",
  "reason": "Shell commands denied by default",
  "rule_id": "deny-shell"
}
FieldTypeDescription
intent_typestringThe intent type that was denied
tool_idstringThe tool that was requested (for invoke_tool intents)
argumentsobjectThe arguments that were submitted (for invoke_tool intents)
idempotency_keystringThe idempotency key from the request
reasonstringHuman-readable denial reason
rule_idstringThe ID of the policy rule that caused the denial

Step Events

step.created

Emitted when a tool invocation intent is accepted and a step is created.

{
  "tool_id": "web.search",
  "tool_version": 1,
  "arguments": {"query": "event sourcing"},
  "max_attempts": 3,
  "attempt": 1
}
FieldTypeDescription
tool_idstringTool being invoked
tool_versionintTool version
argumentsobjectArguments passed to the tool
max_attemptsintMaximum retry attempts
attemptintCurrent attempt number

step.dispatched

Emitted when the kernel dispatches a step to a runner for remote execution.

{
  "runner_id": "my-runner",
  "job_id": "job-xyz789",
  "deadline": "2025-01-15T10:30:00Z"
}
FieldTypeDescription
runner_idstringThe runner the job was dispatched to
job_idstringUnique job identifier
deadlinedatetimeWhen the step times out

step.started

Emitted when a runner reports that it has begun executing the step.

{
  "runner_id": "my-runner"
}
FieldTypeDescription
runner_idstringThe runner executing the step

step.completed

Emitted when a step finishes successfully.

{
  "result": {"results": [{"title": "Event Sourcing", "url": "..."}]}
}
FieldTypeDescription
resultobjectThe tool's return value

step.failed

Emitted when a step fails.

{
  "error": "web.search returned HTTP 500",
  "retryable": true
}
FieldTypeDescription
errorstringError message
retryableboolWhether the kernel should retry this step

step.timed_out

Emitted when a step exceeds its deadline. The payload is empty.

{}

step.retried

Emitted when a failed step is retried.

{
  "next_attempt": 2
}
FieldTypeDescription
next_attemptintThe attempt number of the retry

step.cancelled

Emitted when a step is cancelled (e.g., when the parent execution is cancelled).

{
  "reason": "execution cancelled"
}
FieldTypeDescription
reasonstringWhy the step was cancelled

step.approval_required

Emitted when a step requires human approval before it can proceed. This is an informational event.

{
  "tool_id": "deploy.production",
  "arguments": {"service": "api", "version": "v2.1.0"},
  "remote": false,
  "reason": "Production deployments require approval"
}
FieldTypeDescription
tool_idstringTool that requires approval
argumentsobjectTool arguments submitted
remoteboolWhether the tool is remote
reasonstringHuman-readable reason from the policy rule

Other Events

signal.received

Emitted when a signal is delivered to a blocked execution via POST /v0/executions/{id}/signal.

{
  "signal_type": "approval",
  "payload": {"approved": true, "reviewer": "alice"}
}
FieldTypeDescription
signal_typestringThe type of signal
payloadobjectSignal payload data

agent.timeout

Emitted when an agent's session times out due to connectivity loss.

{
  "session_id": "sess-abc123"
}
FieldTypeDescription
session_idstringThe session that timed out