Interface GraphEdge

A directed edge connecting two vertices in the compiled execution graph.

The source and target fields may be START or END sentinels.

interface GraphEdge {
    id: string;
    source: string;
    target: string;
    type: "discovery" | "static" | "conditional" | "personality";
    condition?: GraphCondition;
    discoveryQuery?: string;
    discoveryKind?: "tool" | "skill" | "extension" | "any";
    discoveryFallback?: string;
    personalityCondition?: {
        trait: string;
        threshold: number;
        above: string;
        below: string;
    };
    guardrailPolicy?: GuardrailPolicy;
}

Properties

id: string

Unique identifier within the parent CompiledExecutionGraph.

source: string

Source node id (or START).

target: string

Target node id (or END).

type: "discovery" | "static" | "conditional" | "personality"

Edge routing strategy:

  • static — always followed; no condition evaluated.
  • conditional — followed only when condition evaluates to this edge's target.
  • discovery — target is resolved at runtime via capability discovery.
  • personality — target is chosen based on the agent's current trait values.
condition?: GraphCondition

Routing predicate; required when type is 'conditional'.

discoveryQuery?: string

Semantic query used to discover the target node at runtime; required for 'discovery' edges.

discoveryKind?: "tool" | "skill" | "extension" | "any"

Capability kind filter applied during discovery-based routing.

discoveryFallback?: string

Node id used as fallback when discovery resolves no target.

personalityCondition?: {
    trait: string;
    threshold: number;
    above: string;
    below: string;
}

Personality-based routing descriptor; required when type is 'personality'. The runtime reads trait from the agent's current HEXACO/PAD state and routes to above or below depending on whether the value exceeds threshold.

Type declaration

  • trait: string
  • threshold: number
  • above: string
  • below: string
guardrailPolicy?: GuardrailPolicy

Optional guardrail policy evaluated when traffic crosses this edge.