NodeResult

org.llm4s.agent.graph.NodeResult
See theNodeResult companion object
enum NodeResult

What a node task produced.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Suspend[Q, A]

Members list

Type members

Enum entries

final case class Block(update: StateUpdate, error: LLMError)

Ends the run as a finished failure with error, which is what a guardrail's Block is. update commits with the superstep like any other, together with every sibling's result, and the run's closing checkpoint is CheckpointStatus.Failed: the thread is usable afterwards and recover refuses it. The caller receives error itself, not a GraphError.NodeFailed around it. A blocked task records no pending write, so a process that dies before the closing commit runs the task again.

Ends the run as a finished failure with error, which is what a guardrail's Block is. update commits with the superstep like any other, together with every sibling's result, and the run's closing checkpoint is CheckpointStatus.Failed: the thread is usable afterwards and recover refuses it. The caller receives error itself, not a GraphError.NodeFailed around it. A blocked task records no pending write, so a process that dies before the closing commit runs the task again.

Attributes

final case class Continue(command: Command)
final case class Fail(error: LLMError)

Fails the run, leaving its checkpoint Running, so recover runs this task again.

Fails the run, leaving its checkpoint Running, so recover runs this task again.

Attributes

final case class Suspend[Q, A](update: StateUpdate, question: Q, resumeAt: ResumeRef[Q, A]) extends NodeResult

Parks this task's work until question is answered. update commits with the superstep like any other; the run then pauses at the end of the superstep - siblings finish and commit, but no further superstep starts until a resume. The answer schedules resumeAt with Resumed(question, answer). That continuation stands in for this task: it fills this task's join arrival, so a barrier this task belongs to stays closed until the continuation completes.

Parks this task's work until question is answered. update commits with the superstep like any other; the run then pauses at the end of the superstep - siblings finish and commit, but no further superstep starts until a resume. The answer schedules resumeAt with Resumed(question, answer). That continuation stands in for this task: it fills this task's join arrival, so a barrier this task belongs to stays closed until the continuation completes.

Attributes