RunEvent

org.llm4s.agent.graph.RunEvent
See theRunEvent companion object
enum RunEvent

What happened in a run. Durable: persisted in the thread's event log and replayable.

The three events that begin a run record the run's tenantId and principal (as supplied in its RunConfig); the log reads events written before they existed as having neither.

Attributes

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

final case class CheckpointCommitted(superstep: Int)

Attributes

Source
RunEvent.scala
final case class Custom(name: String, version: Int, payload: Value)

A node's own event, from RunContext.emit; name and version identify its payload.

A node's own event, from RunContext.emit; name and version identify its payload.

Attributes

Source
RunEvent.scala
final case class RunCancelled(usage: Option[UsageSummary], steps: Long)

The run was cancelled by interrupting its thread; its checkpoint stays Running for recover. usage is the model usage of the attempts the cancel cut short, and steps their agent model steps, as on RunFailed.

The run was cancelled by interrupting its thread; its checkpoint stays Running for recover. usage is the model usage of the attempts the cancel cut short, and steps their agent model steps, as on RunFailed.

Attributes

Source
RunEvent.scala
case RunCompleted extends RunEvent

Attributes

Source
RunEvent.scala
final case class RunFailed(message: String, usage: Option[UsageSummary], steps: Long)

The run failed with message. usage is the model usage of the attempts of its tasks that committed nothing - a task that failed, or was cut short - which is the only durable record of their calls' cost (design §4.22). None when they made none. steps is how many of those attempts were an agent's model step - its own model call, not a middleware's - which a recovered child counts against its step grant (design 4.45).

The run failed with message. usage is the model usage of the attempts of its tasks that committed nothing - a task that failed, or was cut short - which is the only durable record of their calls' cost (design §4.22). None when they made none. steps is how many of those attempts were an agent's model step - its own model call, not a middleware's - which a recovered child counts against its step grant (design 4.45).

Attributes

Source
RunEvent.scala
final case class RunRecovered(fromCheckpoint: String, tenantId: Option[String], principal: Option[String], takenOverFrom: Option[String])

A run continued the incomplete execution at fromCheckpoint. takenOverFrom is the run id of another run whose claim on the thread had expired, unreleased, and which this run's claim replaced: a takeover, so that run may still have been executing. It can equal this run's own id, when a caller reuses a RunId (RunConfig.withRunId): still a takeover of a separate, earlier run. None when the thread was free, and when the replaced claim was another tenant's or recorded no tenant: the log is the owner's, so it never names another tenant's run (RunClaim.takenOverFrom). A log written before the field existed reads as None.

A run continued the incomplete execution at fromCheckpoint. takenOverFrom is the run id of another run whose claim on the thread had expired, unreleased, and which this run's claim replaced: a takeover, so that run may still have been executing. It can equal this run's own id, when a caller reuses a RunId (RunConfig.withRunId): still a takeover of a separate, earlier run. None when the thread was free, and when the replaced claim was another tenant's or recorded no tenant: the log is the owner's, so it never names another tenant's run (RunClaim.takenOverFrom). A log written before the field existed reads as None.

Attributes

Source
RunEvent.scala
final case class RunResumed(answered: Vector[String], tenantId: Option[String], principal: Option[String])

A run began by answering these interrupts.

A run began by answering these interrupts.

Attributes

Source
RunEvent.scala
final case class RunStarted(tenantId: Option[String], principal: Option[String])

Attributes

Source
RunEvent.scala
final case class RunSuspended(interrupts: Vector[String])

The run paused; these interrupts await answers.

The run paused; these interrupts await answers.

Attributes

Source
RunEvent.scala
final case class RunTimedOut(usage: Option[UsageSummary], steps: Long)

The run's deadline expired, stopping it as a cancel does; its checkpoint stays Running for recover. usage is the model usage of the attempts the deadline cut short, and steps their agent model steps, as on RunFailed.

The run's deadline expired, stopping it as a cancel does; its checkpoint stays Running for recover. usage is the model usage of the attempts the deadline cut short, and steps their agent model steps, as on RunFailed.

Attributes

Source
RunEvent.scala
final case class StateUpdated(fromCheckpoint: String, asNode: Option[String], tenantId: Option[String], principal: Option[String])

GraphRuntime.updateState committed a new checkpoint over fromCheckpoint, with a state update applied as asNode (the event's nodeId too) when one was named.

GraphRuntime.updateState committed a new checkpoint over fromCheckpoint, with a state update applied as asNode (the event's nodeId too) when one was named.

Attributes

Source
RunEvent.scala
case TaskCompleted extends RunEvent

Attributes

Source
RunEvent.scala
final case class TaskFailed(message: String)

Attributes

Source
RunEvent.scala
final case class TaskSuspended(interruptId: String)

The task parked a continuation; its pending write holds the question.

The task parked a continuation; its pending write holds the question.

Attributes

Source
RunEvent.scala
final case class ThreadForked(fromThread: String, fromCheckpoint: String, tenantId: Option[String], principal: Option[String])

GraphRuntime.fork created this thread from checkpoint fromCheckpoint of thread fromThread; the first event of the new thread's log.

GraphRuntime.fork created this thread from checkpoint fromCheckpoint of thread fromThread; the first event of the new thread's log.

Attributes

Source
RunEvent.scala