Class Graph<N, RunInput, RunOutput>

Type Parameters

  • N extends string = typeof END
  • RunInput = any
  • RunOutput = any

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, Runnable<RunInput, RunOutput, RunnableConfig>>
supportMultipleEdges: boolean
warnIfCompiled: any

Accessors

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

Methods

  • Parameters

    Returns this

  • Parameters

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

          • input: RunInput
          • Optional config: RunnableConfig

          Returns string | string[] | Promise<string> | Promise<string[]>

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

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • Optional __namedParameters: {
          checkpointer?: BaseCheckpointSaver;
          interruptAfter?: "*" | N[];
          interruptBefore?: "*" | N[];
      }
      • Optional checkpointer?: BaseCheckpointSaver
      • 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