Example: Multi-agent pipeline
A three-stage blog writing pipeline: content creator β clarity editor β SEO optimizer. Each stage is a separate agent; the workflow entry runs them sequentially with shared ctx.state.
Pipeline
input { topic, keywords, audience, tone, wordCount }
β
βΌ
content-creator βββΊ draft markdown
β
βΌ
clarity-editor βββΊ refined article
β
βΌ
seo-optimizer βββΊ article + metaTitle + metaDescription + slugWhy sequential agents?
Benefit
Explanation
Separation of concerns
Each agent has one prompt specialty
Debuggable
Inspect ctx.state.draft, ctx.state.refined between steps
Observable
Three labeled steps in the dashboard
Reusable
Agents can be recomposed in other workflows
Language guides
Full self-contained examples:
Language
Guide
JavaScript / TypeScript
Dart / Flutter
Sample input
Next steps
Last updated