Principle:Microsoft Agent framework Sequential Orchestration
| Knowledge Sources | |
|---|---|
| Domains | Agent_Architecture, Multi_Agent_Systems |
| Last Updated | 2026-02-11 00:00 GMT |
Overview
Sequential Orchestration is the principle of composing multiple agents into a linear pipeline where each agent's output becomes the next agent's input, creating a chain of incremental refinement over a shared conversation. The SequentialBuilder encapsulates this pattern by accepting an ordered list of agent participants and producing a Workflow that drives the conversation through them in sequence.
Description
In many multi-agent scenarios, a task benefits from decomposition into a series of specialized steps rather than being handled by a single monolithic agent. Sequential Orchestration addresses this by arranging agents into a pipeline: the first agent receives the initial user input, produces a response, and that response is appended to a shared conversation that is then forwarded to the next agent. Each subsequent agent sees the full conversation history including all prior agents' contributions, allowing it to build on, refine, critique, or extend the work done so far.
Pipeline Mechanics
The SequentialBuilder constructs a workflow with the following internal wiring:
- Input conversion: The user's input (a string or structured message) is converted into a conversation object via an
_InputToConversationadapter. - Sequential agent invocation: Each participant in the ordered list is invoked in turn. The participant receives the current conversation, generates a response, and the response is appended to the conversation before it is passed to the next participant.
- Output collection: After the final participant completes, the workflow collects the conversation via an
_EndWithConversationadapter, producing the final result.
The wiring can be expressed as:
input -> _InputToConversation -> participant1 -> participant2 -> ... -> participantN -> _EndWithConversation
A critical aspect of sequential orchestration is that all agents share a single conversation thread. This means agent 2 can read agent 1's response, agent 3 can read both agent 1's and agent 2's responses, and so on. This shared context enables patterns such as:
- Writer-Reviewer: A writer agent drafts content, then a reviewer agent critiques and suggests improvements based on the draft.
- Research-Synthesize: A research agent gathers information, then a synthesis agent organizes findings into a coherent summary.
- Plan-Execute-Verify: A planning agent creates a step-by-step plan, an execution agent carries out the plan, and a verification agent checks the results.
Optional Features
The SequentialBuilder supports additional configuration:
- Checkpoint storage: An optional
CheckpointStoragecan be provided to persist intermediate state between agent invocations, enabling recovery from failures without restarting the entire pipeline. - Intermediate outputs: When
intermediate_outputs=True, the workflow emits the output of each agent as it completes, rather than only returning the final result. This enables streaming progress updates to the user. - Request info: The
with_request_info()method allows attaching metadata about which agents should receive request-level information, enabling fine-grained control over what context each participant sees.
Theoretical Basis
Sequential Orchestration implements the Pipeline Pattern (also known as the Chain of Responsibility in a cooperative variant), where a series of processors each transform or augment a shared data object. In the multi-agent context, the shared data object is the conversation, and each processor is an agent that contributes its specialized perspective.
This pattern draws on several design principles:
- Separation of Concerns: Each agent in the sequence is responsible for a single aspect of the task (e.g., drafting, reviewing, formatting), keeping individual agents simple and focused.
- Incremental Refinement: The output improves with each stage, as each agent can address gaps, errors, or omissions in the prior agents' contributions.
- Composability: Agents are reusable building blocks. The same agent can participate in different sequential pipelines depending on the task requirements.
- Deterministic Ordering: Unlike concurrent orchestration, the sequential pattern guarantees a fixed execution order, making the workflow predictable and easier to debug.
Usage
API Signature
from agent_framework.orchestrations import SequentialBuilder
workflow = SequentialBuilder(
participants=[agent1, agent2, agent3],
checkpoint_storage=None,
intermediate_outputs=False,
).build()
Basic Example
from agent_framework.orchestrations import SequentialBuilder
workflow = SequentialBuilder(participants=[writer, reviewer]).build()
result = await workflow.run("Write a blog post about AI agents")
outputs = result.get_outputs()
Related Pages
Implemented By
Sources
| Type | Name | URL |
|---|---|---|
| Repo | Microsoft Agent Framework | https://github.com/microsoft/agent-framework |