RunOptionsまたはContinueOptionsでOnEventを設定します。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Goエージェントの実行、モデルのターン、ツール、一時停止、完了をリアルタイムで監視します。
RunOptionsまたはContinueOptionsでOnEventを設定します。
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,
)
},
})