AgentResult

org.llm4s.agent.AgentResult
See theAgentResult companion object
final case class AgentResult

The outcome of one agent run: where it ran, how it ended, and the thread's state at its end. A readable value, built only by Agent; a conversation continues by its threadId.

Value parameters

activeAgent

the agent the thread is with at the run's end: the next turn starts with it

messages

the thread's full history, without system prompts

runId

this run

status

how the turn ended, or what it waits for

threadId

the conversation's thread

usage

token usage accumulated over the thread, per model

Attributes

Companion
object
Source
AgentResult.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

The final answer, when the turn Completed.

The final answer, when the turn Completed.

Attributes

Source
AgentResult.scala

Approves the pending tool call id, for Agent.resume.

Approves the pending tool call id, for Agent.resume.

Attributes

Source
AgentResult.scala

The answer read as O: the agent's response format (AgentBuilder.withOutput) makes it JSON of O's schema, and any JSON answer - fenced or in prose - reads too. Left(ValidationError) when the turn did not complete, or the answer is not JSON, is JSON null, or does not read as O.

The answer read as O: the agent's response format (AgentBuilder.withOutput) makes it JSON of O's schema, and any JSON answer - fenced or in prose - reads too. Left(ValidationError) when the turn did not complete, or the answer is not JSON, is JSON null, or does not read as O.

Attributes

Source
AgentResult.scala
def edit(id: InterruptId, arguments: Value): (InterruptId, Value)

Approves the pending tool call id with new arguments, which replace the call's in the history.

Approves the pending tool call id with new arguments, which replace the call's in the history.

Attributes

Source
AgentResult.scala

Continues the task the breakpoint id holds.

Continues the task the breakpoint id holds.

Attributes

Source
AgentResult.scala
def reject(id: InterruptId, reason: String): (InterruptId, Value)

Rejects the pending tool call id: the model sees Rejected: <reason> as its result.

Rejects the pending tool call id: the model sees Rejected: <reason> as its result.

Attributes

Source
AgentResult.scala
def reply[Ans : ReadWriter](id: InterruptId, value: Ans): (InterruptId, Value)

Answers the question id - a tool's or a middleware's - with value, of the asker's answer type.

Answers the question id - a tool's or a middleware's - with value, of the asker's answer type.

Attributes

Source
AgentResult.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product