OnEvent on RunOptions or ContinueOptions to receive structured lifecycle events without coupling your application to the model transport.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Observe Go agent runs, model turns, tools, pauses, and completion in real time.
OnEvent on RunOptions or ContinueOptions to receive structured lifecycle events without coupling your application to the model transport.
result, err := agent.Run(ctx, phaseoagent.RunOptions{
Input: prompt,
Client: client,
OnEvent: func(event phaseoagent.AgentEvent) {
logger.Info("agent event",
"type", event.Type,
"run_id", event.RunID,
"details", event.Details,
)
},
})
Was this page helpful?