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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def answer: Option[String]

The final answer, when the turn Completed.

The final answer, when the turn Completed.

Attributes

def approve(id: InterruptId): (InterruptId, Value)

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

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

Attributes

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

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

def reply[Ans : ReadWriter](id: InterruptId, value: Ans): (InterruptId, Value)

Answers the tool question id with value, of the asking tool's answer type.

Answers the tool question id with value, of the asking tool's answer type.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product