Skip to content

Agent Workflows: Building Multi-Agent Systems with Strands Agents SDK

An agent workflow coordinates tasks across multiple agents, where each agent performs a specialized function in a defined sequence. You break a complex problem into components, assign each to the agent best suited to it, and control the order, dependencies, and information flow between them. Use a workflow when a process needs a specific, repeatable execution pattern.

A workflow architecture consists of three key components:

  • Task Specification: Clear description of what each agent needs to accomplish
  • Agent Assignment: Matching tasks to agents with appropriate capabilities
  • Priority Levels: Determining which tasks should execute first when possible
  • Sequential Dependencies: Tasks that must execute in a specific order
  • Parallel Execution: Independent tasks that can run simultaneously
  • Join Points: Where multiple parallel paths converge before continuing
  • Input/Output Mapping: Connecting one agent’s output to another’s input
  • Context Preservation: Maintaining relevant information throughout the workflow
  • State Management: Tracking the overall workflow progress

Workflows excel in scenarios requiring structured execution and clear dependencies:

  • Complex Multi-Step Processes: Tasks with distinct sequential stages
  • Specialized Agent Expertise: Processes requiring different capabilities at each stage
  • Dependency-Heavy Tasks: When certain tasks must wait for others to complete
  • Resource Optimization: Running independent tasks in parallel while managing dependencies
  • Error Recovery: Retrying specific failed steps without restarting the entire process
  • Long-Running Processes: Tasks requiring monitoring, pausing, or resuming capabilities
  • Audit Requirements: When detailed tracking of each step is necessary

Consider other approaches (swarms or graphs) for simple tasks, highly collaborative problems, or situations requiring extensive agent-to-agent communication.

Strands Agents SDK allows you to create workflows using existing Agent objects, even when they use different model providers or have different configurations.

graph LR
Agent1[Research Agent] --> Agent2[Analysis Agent] --> Agent3[Report Agent]

In a sequential workflow, agents process tasks in a defined order, with each agent’s output becoming the input for the next:

from strands import Agent
# Create specialized agents
researcher = Agent(system_prompt="You are a research specialist. Find key information.", callback_handler=None)
analyst = Agent(system_prompt="You analyze research data and extract insights.", callback_handler=None)
writer = Agent(system_prompt="You create polished reports based on analysis.")
# Sequential workflow processing
def process_workflow(topic):
# Step 1: Research
research_results = researcher(f"Research the latest developments in {topic}")
# Step 2: Analysis
analysis = analyst(f"Analyze these research findings: {research_results}")
# Step 3: Report writing
final_report = writer(f"Create a report based on this analysis: {analysis}")
return final_report

This sequential workflow creates a pipeline where each agent’s output becomes the input for the next agent, allowing for specialized processing at each stage. For a functional example of sequential workflow implementation, see the agents_workflow.py example in the Strands Agents SDK documentation.

Workflows give you explicit control over multi-step processes: a defined execution order, managed dependencies, and context passed between stages. Use the built-in workflow tool when you want that orchestration handled for you, or implement the coordination yourself when a step needs custom behavior.