Skip to content

Agent Mesh — data model

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.

AgentRuntimeService

erDiagram
    ExecutionAttempt {
        guid attemptId PK
        guid runId
        guid stepId
        string tenantId
        string projectId
        string environmentId
        guid leaseId
        long fencingToken
        guid snapshotId
        string releaseId
        string agentId
        string modelProfileId
        enum_AttemptState state
        enum_AttemptPhase phase
        int correctionCount
        int maxCorrections
        guid lastCheckpointId
        string contextSnapshotRef
        hash outcomeHash
        datetime cancellationObservedAt
        datetime startedAt
        datetime endedAt
        long version
    }
    LoadedRelease {
        string releaseId PK
        string tenantId
        hash manifestHash
        string adapterVersion
        json contentRefs
        enum_LoadState state
        datetime verifiedAt
        string inFlightPolicy
    }
    Checkpoint {
        guid checkpointId

        int sequence

        enum_AttemptPhase phase

        string adapterStateRef

        string adapterVersion

        string contextSnapshotRef

        hash hash

        datetime createdAt

    }
    CallRecord {
        guid callId

        int sequence

        enum_CallKind kind

        string target

        hash requestHash

        guid policyDecisionId

        string receiptRef

        string status

        datetime startedAt

        datetime endedAt

    }
    DecisionRequest {
        guid decisionId

        enum_DecisionKind kind

        guid approvalId

        hash proposalHash

        json options

        string recommendation

        string status

        datetime requestedAt

        datetime answeredAt

    }
    SubAgentDelegation {
        guid delegationId

        guid childRunId

        string childAgentId

        string purpose

        int depth

        string status

    }
    AttemptLimits {
        int maxMinutes

        int maxModelCalls

        int maxToolCalls

        int maxContextTokens

        int maxSubAgentDepth

    }
    ExecutionAttempt ||--o{ Checkpoint : contains
    ExecutionAttempt ||--o{ CallRecord : contains
    ExecutionAttempt ||--o{ DecisionRequest : contains
    ExecutionAttempt ||--o{ SubAgentDelegation : contains
Hold "Alt" / "Option" to enable pan & zoom

Checkpoint (entity)

A durable point the attempt can resume from.

Field Type Required Description
checkpointId guid yes
sequence int yes
phase enum:AttemptPhase yes
adapterStateRef string yes Blob reference of the adapter checkpoint (opaque to the runtime).
adapterVersion string yes
contextSnapshotRef string no
hash hash yes
createdAt datetime yes

CallRecord (entity)

One outbound call with its request hash and receipt reference.

Field Type Required Description
callId guid yes
sequence int yes
kind enum:CallKind yes
target string yes Model profile, tool id, child agent id or decision kind.
requestHash hash yes
policyDecisionId guid no
receiptRef string no model-invocation-v1 or tool-invocation-v1 receipt reference.
status string yes issued
startedAt datetime yes
endedAt datetime no

DecisionRequest (entity)

A human decision the attempt waits for; approvals are owned by Run Control and referenced by approvalId.

Field Type Required Description
decisionId guid yes
kind enum:DecisionKind yes
approvalId guid no
proposalHash hash no
options json no
recommendation string no
status string yes pending
requestedAt datetime yes
answeredAt datetime no

SubAgentDelegation (entity)

A child run delegated by a supervisor attempt; the child is a run of its own under the same scope and approval semantics.

Field Type Required Description
delegationId guid yes
childRunId guid yes
childAgentId string yes
purpose string yes
depth int yes
status string yes submitted

AttemptLimits (value-object)

Budgets the attempt must respect.

Field Type Required Description
maxMinutes int yes
maxModelCalls int yes
maxToolCalls int yes
maxContextTokens int yes
maxSubAgentDepth int yes

Tables: dbo.ExecutionAttempts, dbo.Checkpoints, dbo.CallRecords, dbo.DecisionRequests, dbo.SubAgentDelegations, dbo.LoadedReleases — see the DDL appendix.

WorkflowEngineService

erDiagram
    WorkflowDefinitionVersion {
        string definitionId PK
        string version
        string releaseId
        string tenantId
        hash graphHash
        int stepCount
        string inputSchemaRef
        string outputSchemaRef
        int maxLoopIterations
        datetime loadedAt
    }
    WorkflowRun {
        guid runId PK
        string tenantId
        string projectId
        string definitionReleaseId
        hash graphHash
        enum_WorkflowRunState state
        string variablesRef
        int activeStepRuns
        long lastOutcomeSequence
        long version
    }
    StepDefinition {
        string stepId

        enum_StepKind kind

        string name

        string agentId

        string toolId

        string actionClass

        enum_FailurePolicy failurePolicy

        int maxAttempts

        int timeoutMinutes

        string compensationStepId

        string inputMappingRef

        string conditionExpression

    }
    EdgeDefinition {
        string fromStepId

        string toStepId

        string guard

        bool isLoopBack

    }
    StepRun {
        guid stepRunId

        string stepId

        enum_StepKind kind

        enum_StepRunState state

        int iteration

        list_guid attemptIds

        string outputRef

        guid approvalId

        datetime startedAt

        datetime endedAt

    }
    TimerEntry {
        guid timerId

        guid stepRunId

        datetime dueAt

        bool fired

    }
    CompensationEntry {
        guid entryId

        guid forStepRunId

        string compensationStepId

        int order

        enum_StepRunState state

    }
    WorkflowDefinitionVersion ||--o{ StepDefinition : contains
    WorkflowDefinitionVersion ||--o{ EdgeDefinition : contains
    WorkflowRun ||--o{ StepRun : contains
    WorkflowRun ||--o{ TimerEntry : contains
    WorkflowRun ||--o{ CompensationEntry : contains
Hold "Alt" / "Option" to enable pan & zoom

StepDefinition (entity)

One node of the graph.

Field Type Required Description
stepId string yes
kind enum:StepKind yes
name string yes
agentId string no
toolId string no
actionClass string no read
failurePolicy enum:FailurePolicy yes
maxAttempts int yes
timeoutMinutes int yes
compensationStepId string no
inputMappingRef string no
conditionExpression string no

EdgeDefinition (entity)

A directed edge with an optional guard.

Field Type Required Description
fromStepId string yes
toStepId string yes
guard string no
isLoopBack bool yes

StepRun (entity)

One execution of a step inside a run.

Field Type Required Description
stepRunId guid yes
stepId string yes
kind enum:StepKind yes
state enum:StepRunState yes
iteration int yes
attemptIds list:guid yes
outputRef string no
approvalId guid no
startedAt datetime no
endedAt datetime no

TimerEntry (entity)

A durable timer for a Timer step or a step timeout.

Field Type Required Description
timerId guid yes
stepRunId guid yes
dueAt datetime yes
fired bool yes

CompensationEntry (entity)

Planned compensation of a succeeded step.

Field Type Required Description
entryId guid yes
forStepRunId guid yes
compensationStepId string yes
order int yes
state enum:StepRunState yes

Tables: dbo.WorkflowDefinitions, dbo.StepDefinitions, dbo.EdgeDefinitions, dbo.WorkflowRuns, dbo.StepRuns, dbo.Timers, dbo.CompensationEntries — see the DDL appendix.