RunOutcome

org.llm4s.agent.graph.RunOutcome
See theRunOutcome companion object
@Experimental
enum RunOutcome

How a run settled, recorded on the terminal (Completed or Failed) checkpoint that closed it (Checkpoint.outcome), so a settled run's result can be rebuilt from the thread alone, after a restart as well as live (design 4.41). A later run's first checkpoint carries none.

The answer itself is in the thread's state, so Answered carries none. A graph that is not an agent turn records Answered when it completes and Failed when a node blocks it; any graph records Blocked for a GuardrailBlocked Block and OutputInvalid for a GraphError.OutputInvalid one.

Attributes

Companion
object
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Answered extends RunOutcome

The run completed with an answer, which is in the thread's state.

The run completed with an answer, which is in the thread's state.

Attributes

final case class Blocked(guardrail: String, reason: String)

A guardrail blocked the run: its name and reason.

A guardrail blocked the run: its name and reason.

Attributes

final case class Failed(kind: String, message: String)

The run settled as a failure: the error's kind (its class's simple name) and message.

The run settled as a failure: the error's kind (its class's simple name) and message.

Attributes

final case class OutputInvalid(errors: Vector[String])

The agent's typed answer failed its output schema twice (GraphError.OutputInvalid): every problem it was reported with, which the error's message abbreviates.

The agent's typed answer failed its output schema twice (GraphError.OutputInvalid): every problem it was reported with, which the error's message abbreviates.

Attributes

An agent turn reached its step limit (AgentBuilder.withMaxSteps).

An agent turn reached its step limit (AgentBuilder.withMaxSteps).

Attributes

An agent turn reached its run's token budget (RunBudgets.maxTokens).

An agent turn reached its run's token budget (RunBudgets.maxTokens).

Attributes