Represents a node in a LangGraph workflow

interface LangGraphNode {
    name: string;
    agent: BaseAgent;
    targets?: string[];
    condition?: ((lastEvent: Event, context: InvocationContext) => boolean | Promise<boolean>);
}

Properties

name: string

Name of the node

agent: BaseAgent

Agent associated with this node

targets?: string[]

Target nodes to execute after this node

condition?: ((lastEvent: Event, context: InvocationContext) => boolean | Promise<boolean>)

Condition function to determine if this node should execute