Class Graph<N, RunInput, RunOutput, NodeSpecType>

Type Parameters

Hierarchy (view full)

Constructors

Properties

branches: Record<string, Record<string, Branch<RunInput, N>>>
compiled: boolean
edges: Set<["__start__" | N, "__end__" | N]>
entryPoint?: string
nodes: Record<N, NodeSpecType>

Accessors

  • get allEdges(): Set<[string, string]>
  • Returns Set<[string, string]>

Methods

  • Parameters

    Returns this

  • Parameters

    • source: N
    • path: ((input, config?) => string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>)
        • (input, config?): string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>
        • Parameters

          • input: RunInput
          • Optional config: RunnableConfig

          Returns string | Send | (string | Send)[] | Promise<string | Send | (string | Send)[]>

    • Optional pathMap: Record<string, "__end__" | N> | ("__end__" | N)[]

    Returns this

  • Parameters

    • startKey: "__start__" | N
    • endKey: "__end__" | N

    Returns this

  • Parameters

    • Optional __namedParameters: {
          checkpointer?: BaseCheckpointSaver<number>;
          interruptAfter?: "*" | N[];
          interruptBefore?: "*" | N[];
      }
      • Optional checkpointer?: BaseCheckpointSaver<number>
      • Optional interruptAfter?: "*" | N[]
      • Optional interruptBefore?: "*" | N[]

    Returns CompiledGraph<N, any, any>

  • Parameters

    • key: N

    Returns this

    Deprecated

    use addEdge(START, key) instead

  • Parameters

    • key: N

    Returns this

    Deprecated

    use addEdge(key, END) instead

  • Parameters

    • Optional interrupt: string[]

    Returns void

  • Parameters

    • message: string

    Returns void