AgentEvents

org.llm4s.agent.events.AgentEvents
object AgentEvents

The events an agent run sends, each an org.llm4s.agent.graph.EventType to match a StreamEvent with:

agent.stream(threadId, "Explain monads") {
 case AgentEvents.TextDelta(d)          => print(d.text)
 case AgentEvents.ToolExecuted(t)       => println(s"${t.tool}: ${t.outcome} in ${t.duration}")
 case _                                 => ()
}

Durable (stored, replayed, no content): ModelCallCompleted, ToolExecuted, HandedOff, GuardrailBlocked. Live (current subscribers only): ModelCallStarted, TextDelta, ThinkingDelta, ToolCallStarted, ToolCallResult.

Attributes

Source
AgentEvents.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete fields

The names of the durable agent events.

The names of the durable agent events.

Attributes

Source
AgentEvents.scala