Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 + slug

Why 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