===== Workflow Methods with Agent ===== WithAgent 为 Workflow 设置 Agent(Agentic Workflow)
(agent *WorkflowAgent)
| 348 | |
| 349 | // WithAgent 为 Workflow 设置 Agent(Agentic Workflow) |
| 350 | func (wf *Workflow) WithAgent(agent *WorkflowAgent) *Workflow { |
| 351 | agent.AttachWorkflow(wf) |
| 352 | return wf |
| 353 | } |
| 354 | |
| 355 | // AgenticExecute Agentic 方式执行 - Agent 决定何时运行 workflow |
| 356 | func (wf *Workflow) AgenticExecute(ctx context.Context, agent *WorkflowAgent, input string) (string, error) { |
nothing calls this directly
no test coverage detected