Skip to content

Agent Mesh — events

Generated from the architecture model

This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.

Topics follow context.area.vN.event-name (ADR-0012 port, ADR-0014 envelope). The context segment is the producing bounded context's slug.

Event Producer Topic Scope Consumers
AttemptStarted AgentRuntimeService execution.attempts.v1.attempt-started integration 3
AttemptPhaseChanged AgentRuntimeService execution.attempts.v1.attempt-phase-changed integration 2
AttemptCheckpointed AgentRuntimeService execution.attempts.v1.attempt-checkpointed integration 1
AttemptDecisionRequested AgentRuntimeService execution.attempts.v1.attempt-decision-requested integration 3
AttemptCancellationObserved AgentRuntimeService execution.attempts.v1.attempt-cancellation-observed integration 2
AttemptOutcomeReported AgentRuntimeService execution.attempts.v1.attempt-outcome-reported integration 3
SubAgentDelegated AgentRuntimeService execution.attempts.v1.sub-agent-delegated integration 2
ReleaseLoaded AgentRuntimeService execution.releases.v1.release-loaded integration 1
ReleaseLoadRejected AgentRuntimeService execution.releases.v1.release-load-rejected integration 3
WorkflowDefinitionLoaded WorkflowEngineService workflows.definitions.v1.workflow-definition-loaded integration 1
WorkflowRunStarted WorkflowEngineService workflows.runs.v1.workflow-run-started integration 2
StepReady WorkflowEngineService workflows.runs.v1.step-ready integration 2
StepRunStateChanged WorkflowEngineService workflows.runs.v1.step-run-state-changed integration 2
TimerFired WorkflowEngineService workflows.runs.v1.timer-fired integration 1
CompensationStarted WorkflowEngineService workflows.runs.v1.compensation-started integration 3
WorkflowRunCompleted WorkflowEngineService workflows.runs.v1.workflow-run-completed integration 3
WorkflowRunFailed WorkflowEngineService workflows.runs.v1.workflow-run-failed integration 3
WorkflowRunCancelled WorkflowEngineService workflows.runs.v1.workflow-run-cancelled integration 1

AttemptStarted

The lease holder started executing; release verified and context built.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-started
Aggregate ExecutionAttempt
Consumers StudioBff, DashboardService, QualityScoreService
Field Type Required Description
attemptId guid yes
runId guid yes
stepId guid yes
tenantId string yes
releaseId string yes
snapshotId guid yes
fencingToken long yes

AttemptPhaseChanged

The loop moved to another phase.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-phase-changed
Aggregate ExecutionAttempt
Consumers StudioBff, DashboardService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
phase enum:AttemptPhase yes
state enum:AttemptState yes

AttemptCheckpointed

A resumable checkpoint was written.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-checkpointed
Aggregate ExecutionAttempt
Consumers DashboardService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
checkpointId guid yes
sequence int yes
adapterVersion string yes

AttemptDecisionRequested

The attempt waits for a human: an approval (owned by Run Control), missing input or an escalation with options.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-decision-requested
Aggregate ExecutionAttempt
Consumers StudioBff, StudioNotificationService, DashboardService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
decisionId guid yes
kind enum:DecisionKind yes
approvalId guid no

AttemptCancellationObserved

The lease holder observed the interruption; in-flight calls settled or marked uncertain.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-cancellation-observed
Aggregate ExecutionAttempt
Consumers StudioBff, DashboardService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
uncertainCalls int yes

AttemptOutcomeReported

The single outcome was reported to Run Control (which records the authoritative AttemptOutcomeRecorded).

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.attempt-outcome-reported
Aggregate ExecutionAttempt
Consumers MemoryPromotionService, DashboardService, QualityScoreService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
state enum:AttemptState yes
outcomeHash hash yes
corrections int yes
modelCalls int yes
toolCalls int yes

SubAgentDelegated

A supervisor attempt submitted a child run.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.attempts.v1.sub-agent-delegated
Aggregate ExecutionAttempt
Consumers StudioBff, DashboardService
Field Type Required Description
attemptId guid yes
runId guid yes
tenantId string yes
childRunId guid yes
childAgentId string yes
depth int yes

ReleaseLoaded

A release was verified for this adapter version.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.releases.v1.release-loaded
Aggregate LoadedRelease
Consumers DashboardService
Field Type Required Description
releaseId string yes
tenantId string yes
manifestHash hash yes
adapterVersion string yes

ReleaseLoadRejected

Hash mismatch or incompatible adapter; attempts of that release fail with an explicit reason.

Producer AgentRuntimeService (BC-06 Execution)
Scope / version integration / v1
Topic execution.releases.v1.release-load-rejected
Aggregate LoadedRelease
Consumers StudioBff, DashboardService, AuditService
Field Type Required Description
releaseId string yes
tenantId string yes
reason string yes
adapterVersion string yes

WorkflowDefinitionLoaded

A workflow release was validated and cached by the engine.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.definitions.v1.workflow-definition-loaded
Aggregate WorkflowDefinitionVersion
Consumers DashboardService
Field Type Required Description
releaseId string yes
tenantId string yes
definitionId string yes
version string yes
graphHash hash yes

WorkflowRunStarted

The engine opened its projection of an accepted run and computed the first ready steps.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.workflow-run-started
Aggregate WorkflowRun
Consumers StudioBff, DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
definitionReleaseId string yes
graphHash hash yes

StepReady

A step is ready; Run Control creates the step and dispatches an attempt (Agent or Tool) or an approval (Human).

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.step-ready
Aggregate WorkflowRun
Consumers RunControlService, DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
stepRunId guid yes
stepId string yes
kind enum:StepKind yes
actionClass string no
inputRef string no

StepRunStateChanged

A step run moved state.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.step-run-state-changed
Aggregate WorkflowRun
Consumers StudioBff, DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
stepRunId guid yes
stepId string yes
fromState enum:StepRunState yes
toState enum:StepRunState yes

TimerFired

A durable timer fired and the run advanced.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.timer-fired
Aggregate WorkflowRun
Consumers DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
timerId guid yes
stepRunId guid yes

CompensationStarted

Compensation of succeeded steps began in reverse order.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.compensation-started
Aggregate WorkflowRun
Consumers StudioBff, DashboardService, AuditService
Field Type Required Description
runId guid yes
tenantId string yes
entries int yes

WorkflowRunCompleted

Every terminal step succeeded; Run Control records Completed.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.workflow-run-completed
Aggregate WorkflowRun
Consumers RunControlService, StudioBff, DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
outputRef string no

WorkflowRunFailed

A step failed with policy Fail or compensation finished; Run Control records Failed with the class.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.workflow-run-failed
Aggregate WorkflowRun
Consumers RunControlService, StudioBff, DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
failedStepId string yes
failureClass string yes
compensated bool yes

WorkflowRunCancelled

The engine closed its projection after a cancellation.

Producer WorkflowEngineService (BC-38 Workflow Definitions & Engine)
Scope / version integration / v1
Topic workflows.runs.v1.workflow-run-cancelled
Aggregate WorkflowRun
Consumers DashboardService
Field Type Required Description
runId guid yes
tenantId string yes
openStepRuns int yes

Commands

Command Service Handled by Result events Summary
StartAttempt AgentRuntimeService ExecutionAttempt AttemptStarted Claim the dispatched attempt under its lease and start the loop.
Interrupt AgentRuntimeService ExecutionAttempt AttemptCancellationObserved Stop at the next safe point and settle in-flight calls.
ReportOutcome AgentRuntimeService ExecutionAttempt AttemptOutcomeReported Report the single outcome with its hash and fencing token.
LoadRelease AgentRuntimeService LoadedRelease ReleaseLoaded, ReleaseLoadRejected Fetch and verify a release manifest for this adapter.
StartWorkflowRun WorkflowEngineService WorkflowRun WorkflowRunStarted, StepReady Open the projection for an accepted run and compute the first ready steps.
AdvanceWorkflowRun WorkflowEngineService WorkflowRun StepRunStateChanged, StepReady, WorkflowRunCompleted, WorkflowRunFailed Apply an attempt outcome or decision and compute what is ready next.
CancelWorkflowRun WorkflowEngineService WorkflowRun WorkflowRunCancelled Close the projection after Run Control cancelled the run.
LoadWorkflowDefinition WorkflowEngineService WorkflowDefinitionVersion WorkflowDefinitionLoaded Validate and cache a Published workflow release.

Consumed from other services

Consumer Event Producer Handler Purpose
AgentRuntimeService AttemptDispatched RunControlService ClaimAndStart Claim the lease, load the release, build context and start the loop.
AgentRuntimeService ApprovalDecided RunControlService ResumeAfterApproval Continue or fail the waiting attempt according to the decision.
AgentRuntimeService RunCancelled RunControlService ObserveCancellation Settle attempts of a cancelled run.
AgentRuntimeService LeaseExpired RunControlService AbandonAttempt Stop work on an attempt whose lease the Control plane reclaimed.
AgentRuntimeService AssetReleasePublished AgentRegistryService WarmReleaseCache Pre-verify releases likely to be dispatched.
AgentRuntimeService AssetReleaseDeprecated AgentRegistryService ApplyInFlightPolicy Apply the in-flight policy to running attempts.
AgentRuntimeService AssetReleaseRevoked AgentRegistryService ApplyInFlightPolicy Interrupt or drain attempts of a revoked release.
WorkflowEngineService RunAccepted RunControlService StartWorkflowRun Open the engine projection for an accepted run.
WorkflowEngineService AttemptOutcomeRecorded RunControlService AdvanceOnOutcome Apply the authoritative outcome and compute the next ready steps.
WorkflowEngineService ApprovalDecided RunControlService AdvanceOnDecision Complete a Human step or fail the run per policy.
WorkflowEngineService RunCancelled RunControlService CancelWorkflowRun Close the projection and skip pending timers.
WorkflowEngineService AssetReleasePublished AgentRegistryService LoadWorkflowDefinition Validate and cache workflow releases.