A TypedAgent compiled onto a runtime by TypedAgent.bind: what the task tools run, and what run runs with no parent - from a graph node, or a test.
Attributes
- Companion
- object
- Source
- TypedAgent.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Closes the failed or interrupted standalone run ref names - a Refused(Failed)'s child - without continuing it, as Agent.abandon does: the other answer to recover, for a run that would only fail again. Each tool call the turn left without a result gets reason (model-visible; blank is a ValidationError), nothing runs and no model is called, and the thread is at rest, settled as a failure, with nothing left to recover. A delegated child's ref is refused, as for resume; the runtime's refusals come back unchanged with the thread as it was - GraphError.NothingToRecover for a run that did not stop mid-turn, GraphError.PendingInterrupts for a suspended one, GraphError.ThreadBusy for one still running.
Closes the failed or interrupted standalone run ref names - a Refused(Failed)'s child - without continuing it, as Agent.abandon does: the other answer to recover, for a run that would only fail again. Each tool call the turn left without a result gets reason (model-visible; blank is a ValidationError), nothing runs and no model is called, and the thread is at rest, settled as a failure, with nothing left to recover. A delegated child's ref is refused, as for resume; the runtime's refusals come back unchanged with the thread as it was - GraphError.NothingToRecover for a run that did not stop mid-turn, GraphError.PendingInterrupts for a suspended one, GraphError.ThreadBusy for one still running.
Attributes
- Source
- TypedAgent.scala
The subagent's id.
Continues the failed or interrupted standalone run ref names - a Refused(Failed)'s child - with config, re-running only failed or unstarted work, as Agent.recover does; its outcome maps as run's does. A delegated child's ref is refused, as for resume; so is a thread with nothing to recover (GraphError.NothingToRecover).
Continues the failed or interrupted standalone run ref names - a Refused(Failed)'s child - with config, re-running only failed or unstarted work, as Agent.recover does; its outcome maps as run's does. A delegated child's ref is refused, as for resume; so is a thread with nothing to recover (GraphError.NothingToRecover).
Attributes
- Source
- TypedAgent.scala
Answers some of the pending interrupts of the suspended standalone run ref names - a TaskOutcome.Suspended's child - as Agent.resume takes them, and continues it with config; its outcome maps as run's does. A delegated child's ref is refused (ValidationError): its parent continues it (rule 19). The runtime's refusals - an answer to an interrupt that is not pending (GraphError.InvalidResume), a thread not suspended - come back unchanged, as does a cancellation; either way the thread stays, for another call.
Answers some of the pending interrupts of the suspended standalone run ref names - a TaskOutcome.Suspended's child - as Agent.resume takes them, and continues it with config; its outcome maps as run's does. A delegated child's ref is refused (ValidationError): its parent continues it (rule 19). The runtime's refusals - an answer to an interrupt that is not pending (GraphError.InvalidResume), a thread not suspended - come back unchanged, as does a cancellation; either way the thread stays, for another call.
Attributes
- Source
- TypedAgent.scala
Runs the subagent once, on a new top-level thread of its runtime, with config, and returns its outcome: its report, the refusal its status or its typed answer's failure gives, or its suspension. The thread, named by the outcome's child.threadId (depth 0, no tool call), stays in the runtime until deleted; resume continues a suspended one. A run that fails with work left to recover is Refused(Failed), its child naming the failed run, for recover. Any other failure - a cancellation included - is Left, which names no thread, so that thread is forgotten once its run has ended (as for Agent.run(query)).
Runs the subagent once, on a new top-level thread of its runtime, with config, and returns its outcome: its report, the refusal its status or its typed answer's failure gives, or its suspension. The thread, named by the outcome's child.threadId (depth 0, no tool call), stays in the runtime until deleted; resume continues a suspended one. A run that fails with work left to recover is Refused(Failed), its child naming the failed run, for recover. Any other failure - a cancellation included - is Left, which names no thread, so that thread is forgotten once its run has ended (as for Agent.run(query)).
For tests and one-off calls: a recoverable graph node calls the thread-id overload instead, since this one, run again after a crash, starts another thread and runs the subagent - its model calls and effects - twice.
Attributes
- Source
- TypedAgent.scala
Runs the subagent on the caller-chosen top-level thread threadId, starting or reattaching to it as the task tools do for a child (design 4.44, #2077), so running it again with the same id never runs the subagent twice. A graph node derives threadId from its own replay-stable key, and calls this overload, not the fresh-thread one: after a crash its replay finds the first run's thread. The thread's latest checkpoint decides:
Runs the subagent on the caller-chosen top-level thread threadId, starting or reattaching to it as the task tools do for a child (design 4.44, #2077), so running it again with the same id never runs the subagent twice. A graph node derives threadId from its own replay-stable key, and calls this overload, not the fresh-thread one: after a crash its replay finds the first run's thread. The thread's latest checkpoint decides:
- none: the subagent is started with
inputandconfig, its outcome mapped as the fresh-threadrun's is. Running(a run that failed, or crashed, with work left): it is recovered, as recover does, re-running only failed or unstarted work. A thread whose run is live - in this runtime, or holding its claim in another - is waited on, with backoff, for up to twice the runtime's claim lifetime, thenGraphError.ThreadBusyisLeft.Suspended: itsSuspendedoutcome, nothing run; answer it with resume.CompletedorFailed: the outcome its terminal checkpoint records, rebuilt as a run's is, nothing run.
The thread is the call: its first checkpoint records a digest of the rendered input (as a child's records its input), and one found at threadId is reattached only if it is this agent's and was started by this overload with the same input; another agent's thread, one started with other input or not by this overload, is refused (ValidationError), so an id collision never returns another run's outcome (#2086). A delegated child's thread is refused (ValidationError) too: its parent continues it (rule 19). Unlike the fresh-thread overload, a Left forgets nothing: the caller can name the thread, and its next call reattaches to it.
Attributes
- Source
- TypedAgent.scala
run on the caller-chosen thread threadId, with the default config.
run on the caller-chosen thread threadId, with the default config.
Attributes
- Source
- TypedAgent.scala
Concrete fields
Attributes
- Source
- TypedAgent.scala
