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.

An outcome is stored, so it holds no text a guardrail refused (#2853): Blocked names the guardrail and never its reason. OutputInvalid and Failed do hold error text, which EncryptingCheckpointer seals.

Attributes

Companion
object
Source
ChildThreads.scala
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

Source
ChildThreads.scala
final case class Blocked(guardrail: String)

A guardrail blocked the run: its name. The reason it gave is not stored (#2853) - a reason may quote the text the guardrail refused - so it is on the result of the run that was blocked and nowhere else: a status rebuilt from this outcome has none.

A guardrail blocked the run: its name. The reason it gave is not stored (#2853) - a reason may quote the text the guardrail refused - so it is on the result of the run that was blocked and nowhere else: a status rebuilt from this outcome has none.

Attributes

Source
ChildThreads.scala
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

Source
ChildThreads.scala
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

Source
ChildThreads.scala

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

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

Attributes

Source
ChildThreads.scala

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

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

Attributes

Source
ChildThreads.scala
case Truncated extends RunOutcome

An agent turn's answer, which is in the thread's state, was cut off at the model's output limit.

An agent turn's answer, which is in the thread's state, was cut off at the model's output limit.

Attributes

Source
ChildThreads.scala