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

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list