需审批的部署
waiting_for_human 时保存返回的记录。继续运行时,决策须关联待处理的工具调用 ID。
流式输出到终端
限制自主研究
组合使用StepCountIs、MaxTokensUsed、MaxCost 和 MaxDuration,确保长时间运行的 Agent 即使不断找到有用任务,也不会超出产品预算。
完整约定请参阅工具、状态与审批和停止条件。Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
参考 Go 示例,了解工具、审批、流式传输和受限运行。
deploy := phaseoagent.Tool{
ID: "deploy",
Description: "Deploy the selected release",
RequireApproval: true,
Execute: func(input any, runtime phaseoagent.RuntimeContext) (any, error) {
return deploymentService.Deploy(runtime.Context, input)
},
}
waiting_for_human 时保存返回的记录。继续运行时,决策须关联待处理的工具调用 ID。
stream := agent.Stream(ctx, phaseoagent.RunOptions{Input: prompt, Client: client})
for delta := range stream.Text() { fmt.Print(delta) }
result, err := stream.Result()
StepCountIs、MaxTokensUsed、MaxCost 和 MaxDuration,确保长时间运行的 Agent 即使不断找到有用任务,也不会超出产品预算。
完整约定请参阅工具、状态与审批和停止条件。