Type alias NodeExecutorConfig

NodeExecutorConfig: {
    type: "gmi";
    instructions: string;
    maxInternalIterations?: number;
    parallelTools?: boolean;
    temperature?: number;
    maxTokens?: number;
} | {
    type: "tool";
    toolName: string;
    args?: Record<string, unknown>;
} | {
    type: "extension";
    extensionId: string;
    method: string;
} | {
    type: "human";
    prompt: string;
    autoAccept?: boolean;
    autoReject?: boolean | string;
    judge?: {
        model?: string;
        provider?: string;
        criteria?: string;
        confidenceThreshold?: number;
    };
    onTimeout?: "accept" | "reject" | "error";
    guardrailOverride?: boolean;
} | {
    type: "guardrail";
    guardrailIds: string[];
    onViolation: "block" | "reroute" | "warn" | "sanitize";
    rerouteTarget?: string;
} | {
    type: "router";
    condition: GraphCondition;
} | {
    type: "subgraph";
    graphId: string;
    inputMapping?: Record<string, string>;
    outputMapping?: Record<string, string>;
} | {
    type: "voice";
    voiceConfig: VoiceNodeConfig;
}

Describes how the runtime should execute a GraphNode. Each variant maps to a distinct execution strategy.

  • gmi — General Model Invocation: call an LLM with system instructions.
  • tool — Invoke a registered ITool by name, optionally with static args.
  • extension — Call a method on a registered IExtension.
  • human — Suspend execution and surface a prompt to a human operator.
  • guardrail — Run one or more guardrail checks; route or block on violation.
  • router — Pure routing node; evaluates a GraphCondition and emits no output.
  • subgraph — Delegate to another CompiledExecutionGraph with optional field mapping.
  • voice — Run a voice pipeline session with configurable STT/TTS and turn management.

Type declaration

  • type: "gmi"
  • instructions: string

    System-level instructions injected before the user message.

  • Optional maxInternalIterations?: number

    Maximum ReAct loop iterations when executionMode is react_bounded. Defaults to 10.

  • Optional parallelTools?: boolean

    Whether to issue multiple tool calls in a single model turn.

  • Optional temperature?: number

    Sampling temperature forwarded to the LLM provider.

  • Optional maxTokens?: number

    Hard cap on output tokens for this node's completion.

Type declaration

  • type: "tool"
  • toolName: string

    Registered tool name as it appears in the tool catalogue.

  • Optional args?: Record<string, unknown>

    Static arguments merged with runtime-provided arguments before invocation.

Type declaration

  • type: "extension"
  • extensionId: string

    Extension identifier as registered in the capability registry.

  • method: string

    Name of the extension method to call.

Type declaration

  • type: "human"
  • prompt: string

    Message displayed to the human operator while the graph is suspended.

  • Optional autoAccept?: boolean

    When true, the node auto-accepts without waiting for human input. Useful for testing.

  • Optional autoReject?: boolean | string

    When true or a string, the node auto-rejects. A string value is used as the rejection reason.

  • Optional judge?: {
        model?: string;
        provider?: string;
        criteria?: string;
        confidenceThreshold?: number;
    }

    Delegates the approval decision to an LLM judge instead of a human. When the judge's confidence falls below confidenceThreshold, execution falls through to the normal human interrupt.

    • Optional model?: string

      LLM model to use for the judge call. Defaults to 'gpt-4o-mini'.

    • Optional provider?: string

      LLM provider. Defaults to 'openai'.

    • Optional criteria?: string

      Custom evaluation criteria/rubric.

    • Optional confidenceThreshold?: number

      Confidence threshold (0–1). Below this, fall through to human interrupt. Defaults to 0.7.

  • Optional onTimeout?: "accept" | "reject" | "error"

    Behaviour when the node's timeout expires.

    • 'accept' — auto-accept.
    • 'reject' — auto-reject.
    • 'error' — throw a timeout error (default behaviour).

    Default

    'error'
    
  • Optional guardrailOverride?: boolean

    Run post-approval guardrails after an automated approval path (autoAccept, judge, or timeout-accept). Defaults to true.

Type declaration

  • type: "guardrail"
  • guardrailIds: string[]

    Ordered list of guardrail identifiers to evaluate.

  • onViolation: "block" | "reroute" | "warn" | "sanitize"

    Action taken when any guardrail fires.

  • Optional rerouteTarget?: string

    Node id to route to when onViolation is 'reroute'.

Type declaration

  • type: "router"
  • condition: GraphCondition

    Routing predicate; the returned node-id determines the next edge.

Type declaration

  • type: "subgraph"
  • graphId: string

    Id of the CompiledExecutionGraph to delegate to.

  • Optional inputMapping?: Record<string, string>

    Maps parent scratch field paths → child input field paths.

  • Optional outputMapping?: Record<string, string>

    Maps child artifacts field paths → parent scratch field paths.

Type declaration

  • type: "voice"
  • voiceConfig: VoiceNodeConfig

    Voice pipeline session configuration.