QueuedInput

org.llm4s.agent.service.QueuedInput
See theQueuedInput companion object
@Experimental

What a queued run does to its thread (design 4.55), in the JSON form the entry stores. The queue runs Agents and TypedAgent[I, O]s, the two entry points whose inputs have codecs; a raw CompiledGraph is not queued.

  • Start: a new turn with input - an AgentInput for an Agent (QueuedInput.query), an I for a TypedAgent[I, O] (QueuedInput.typed).
  • Resume: answers to the thread's pending interrupts, as Agent.resume takes them.
  • Recover: continue the thread's failed or interrupted run, as Agent.recover does. A queued recover is the thread owner's explicit transfer of the thread's recovery to the queue: its first attempt recovers the thread whatever ran on it before (rule 4 otherwise forbids a worker from adopting a run started outside the queue).

The input is the caller's to store: the queue keeps it in its entry until the entry is reclaimed, but no metric, trace attribute or log line carries it (Stage 5 rule 10).

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 Recover extends QueuedInput
final case class Resume(answers: Map[InterruptId, Value])
final case class Start(input: Value)