Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Agent Framework workflows define explicit, inspectable execution paths for coordinating code, agents, state, events, and human input. The framework provides functional and graph-based APIs over the same workflow run model.
Workflow APIs
All SDKs support graph-based workflows. Python additionally provides an experimental functional workflow API.
The .NET SDK uses the graph-based WorkflowBuilder API. It connects typed executors through edges and conditions, supports fan-out and fan-in execution, emits workflow and executor events, and checkpoints progress at superstep boundaries. Compatible workflows can be exposed through the standard agent interface with AsAIAgent().
- Workflow Builder and execution explains how to build and run .NET workflow graphs.
- Executors, edges, events, and state management describe the graph runtime primitives.
- Functional Workflow API uses Python functions and native control flow.
- Workflow Builder and execution constructs and runs type-validated workflow graphs.
Both APIs produce the same observable workflow results. Choose the API that matches the execution model you want to express:
Functional (@workflow) |
Graph (WorkflowBuilder) |
|
|---|---|---|
| Control flow | Native Python (if, loops, asyncio.gather) |
Edges and conditions |
| Best for | Sequential pipelines, custom loops, and ad-hoc parallelism | Fixed graphs, fan-out/fan-in, and type-validated message routing |
| Parallelism | asyncio.gather |
Parallel edge groups and superstep execution |
| Observability | Per-step events with @step |
Per-executor events |
| Human-in-the-loop | ctx.request_info() |
RequestInfoExecutor |
| Checkpointing | Per-@step result caching |
Superstep-boundary checkpoints |
| Agent wrapping | .as_agent() on FunctionalWorkflow |
.as_agent() on Workflow |
The Go SDK uses the graph-based workflow.NewBuilder API. It connects bound executors through edges, conditions, and fan-out or fan-in groups, then runs the graph through an execution environment such as inproc.Default. Agent-oriented workflows can be exposed through the standard agent interface with agentworkflow.New(...).
- Workflow Builder and execution explains how to build and run Go workflow graphs.
- Executors, edges, events, and state management describe the graph runtime primitives.
Graph and runtime model
- Executors receive inputs, perform work, and emit outputs.
- Edges route values between executors.
- Events expose workflow lifecycle and execution activity.
- State management controls durable and run-scoped workflow state.
Advanced execution
- Agent Executor integrates agents into workflow graphs.
- Workflow Execution Modes explains streaming and non-streaming execution.
- Resettable Executors describes executors that reset between runs.
- Sub-Workflows composes workflows as executors in larger graphs.
For feature-oriented guidance such as checkpoints, human-in-the-loop, visualization, and orchestrations, see Workflow Capabilities.