Interface GraphCompilerInput

Everything the compiler needs to produce a CompiledExecutionGraph.

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

Properties

name: string

Human-readable name embedded in the compiled graph.

nodes: Map<string, GraphNode>

All user-declared nodes keyed by their declared id.

edges: GraphEdge[]

All directed edges (including START / END connections).

stateSchema: {
    input: any;
    scratch: any;
    artifacts: any;
}

Zod schema instances for the three GraphState generics.

Type declaration

  • input: any

    Schema for GraphState.input — the frozen user-provided input.

  • scratch: any

    Schema for GraphState.scratch — the node-to-node communication bag.

  • artifacts: any

    Schema for GraphState.artifacts — accumulated external outputs.

reducers: StateReducers

Field-level merge strategies forwarded unchanged to the IR.

memoryConsistency: MemoryConsistencyMode

Graph-wide memory isolation mode.

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

Graph-wide default checkpoint persistence strategy.