Create a sequential chat workflow where an initiator agent runs through a queue of chats in order. Use for step-by-step pipelines like outline -> plan -> format, where each stage builds on the previous output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ag2-workflow-patterns:sequential-chatThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are creating an AG2 sequential chat workflow using `a_sequential_run`.
You are creating an AG2 sequential chat workflow using a_sequential_run.
Ask the user for:
Create the sequential chat following this pattern:
import asyncio
from autogen import ConversableAgent, LLMConfig
llm_config = LLMConfig({"api_type": "anthropic", "model": "claude-sonnet-4-6"})
# The initiator agent runs the sequential pipeline
initiator = ConversableAgent(
name="initiator",
llm_config=llm_config,
)
stage_1 = ConversableAgent(
name="stage_1",
system_message="Do the first step.",
llm_config=llm_config,
)
stage_2 = ConversableAgent(
name="stage_2",
system_message="Do the second step.",
llm_config=llm_config,
)
stage_3 = ConversableAgent(
name="stage_3",
system_message="Produce the final output.",
llm_config=llm_config,
)
async def main():
chat_queue = [
{
"recipient": stage_1,
"message": "Initial task description",
"max_turns": 1,
"summary_method": "last_msg",
},
{
"recipient": stage_2,
"message": "Continue with this",
"max_turns": 1,
"summary_method": "last_msg",
},
{
"recipient": stage_3,
"message": "Produce the final result",
"max_turns": 1,
"summary_method": "last_msg",
},
]
responses = await initiator.a_sequential_run(chat_queue)
for i, response in enumerate(responses):
await response.process()
print(f"Stage {i + 1}: {await response.summary}")
if __name__ == "__main__":
asyncio.run(main())
a_sequential_run (async) -- NOT chained initiate_chat calls.process() to run the workflow, then use .summary to extract the resultmax_turns=1 per stage for clean handoffssummary_method="last_msg" passes output forward through the pipelinemessage in each queue entry can provide stage-specific instructionsLLMConfig({...}) -- NOT a raw dict like {"model": "..."}See examples/lesson_plan.py for a curriculum -> activities -> lesson plan pipeline.
npx claudepluginhub ag2ai/ag2-claude-plugins --plugin ag2-workflow-patternsDesigns and executes custom multi-agent pipelines using Claude Code subagents. Spawns researcher, builder, strategist, reviewer, evaluator, etc. with parallel and background execution.
Provides multi-agent workflow patterns: parallel dispatch, sequential pipelines, QC gates, and retry loops. Use when architecting systems with multiple agents or processing stages.
Guides proactive use of /orchestrate for complex multi-agent workflows with sequential/parallel execution, conditionals, retries, visualization, checkpoints, and automation.