GraphConfig

data class GraphConfig<State>(val threadId: String = "default", val checkpointer: Checkpointer<State>? = null, val interruptBefore: Set<String> = emptySet(), val interruptAfter: Set<String> = emptySet(), val maxIterations: Int = DEFAULT_MAX_ITERATIONS)

Per-run settings for a CompiledGraph.

Throws

if threadId is blank, maxIterations is not positive, or interrupts are configured without a checkpointer.

Constructors

Link copied to clipboard
constructor(threadId: String = "default", checkpointer: Checkpointer<State>? = null, interruptBefore: Set<String> = emptySet(), interruptAfter: Set<String> = emptySet(), maxIterations: Int = DEFAULT_MAX_ITERATIONS)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

where checkpoints are stored. When set, a checkpoint is saved when a run starts and after every step. Required for interruptBefore, interruptAfter, interrupt and CompiledGraph.resume.

Link copied to clipboard

node names to pause after.

Link copied to clipboard

node names to pause before, for human-in-the-loop review. A node that decides while it runs whether to pause calls interrupt instead.

Link copied to clipboard

the maximum number of steps a single CompiledGraph.invoke or CompiledGraph.resume call may execute before MaxIterationsExceededException is thrown.

Link copied to clipboard

identifies the conversation or workflow instance whose checkpoints are stored by checkpointer. Use one id per independent run.