Interface CompiledExecutionGraph

The fully compiled, execution-ready representation of an agent graph.

All three authoring APIs (AgentGraph builder, workflow DSL, mission planner) produce a CompiledExecutionGraph as their final compilation artefact. The runtime never interprets authoring-API-specific constructs — it operates exclusively on this type.

interface CompiledExecutionGraph {
    id: string;
    name: string;
    nodes: GraphNode[];
    edges: GraphEdge[];
    stateSchema: {
        input: Record<string, unknown>;
        scratch: Record<string, unknown>;
        artifacts: Record<string, unknown>;
    };
    reducers: StateReducers;
    checkpointPolicy: "none" | "every_node" | "explicit";
    memoryConsistency: MemoryConsistencyMode;
}

Properties

id: string

Stable, globally unique graph identifier (slug or UUIDv4).

name: string

Human-readable display name.

nodes: GraphNode[]

All vertices, including any START/END bridge nodes inserted by the compiler.

edges: GraphEdge[]

All directed edges, including static entry/exit edges from/to START/END.

stateSchema: {
    input: Record<string, unknown>;
    scratch: Record<string, unknown>;
    artifacts: Record<string, unknown>;
}

JSON-Schema-compatible schema declarations for the three GraphState generics. Used by the runtime for validation and by tooling for type generation.

Type declaration

  • input: Record<string, unknown>
  • scratch: Record<string, unknown>
  • artifacts: Record<string, unknown>
reducers: StateReducers

Field-level reducer configuration applied after each node completes.

checkpointPolicy: "none" | "every_node" | "explicit"

Graph-wide default checkpoint persistence policy. Per-node GraphNode.checkpoint settings override this default.

  • every_node — persist after every node (safe, high storage cost).
  • explicit — persist only for nodes that declare checkpoint !== 'none'.
  • none — never persist (lowest overhead; no recovery on crash).
memoryConsistency: MemoryConsistencyMode

Graph-wide memory consistency mode; may be overridden per-node via MemoryPolicy.consistency.