AgentRun

org.llm4s.agent.AgentRun
final class AgentRun

A running agent turn, from Agent.start: cancel it, or await its AgentResult. The turn runs on its own thread, owned by the runtime, whether or not anyone awaits it.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Blocks until the turn ends, then returns its result - Suspended included - or the error it failed with; the outcome is retained, so every call made once the turn has ended returns the same value. A call whose awaiting thread is interrupted before then returns Left(CancelledError) instead, with the interrupt flag still set, and the turn keeps running: a later call returns its outcome, and only cancel stops it. With tracing, the turn's trace is complete when a call returns the turn's outcome.

Blocks until the turn ends, then returns its result - Suspended included - or the error it failed with; the outcome is retained, so every call made once the turn has ended returns the same value. A call whose awaiting thread is interrupted before then returns Left(CancelledError) instead, with the interrupt flag still set, and the turn keeps running: a later call returns its outcome, and only cancel stops it. With tracing, the turn's trace is complete when a call returns the turn's outcome.

Attributes

def cancel(): Unit

Cancels the turn; see org.llm4s.agent.graph.RunHandle.cancel. The thread is left for recover.

Cancels the turn; see org.llm4s.agent.graph.RunHandle.cancel. The thread is left for recover.

Attributes

def runId: RunId

Non-blocking: Running until the turn ends, then how it ended.

Non-blocking: Running until the turn ends, then how it ended.

Attributes