Back to Blog

design-creative

Build Reliable Multi-Agent Pipelines with Relay Workflows

Learn to build multi-agent DAG workflows with verification gates, output chaining, and repair loops using @relayflows/core.

OpenAgentSkillPublished:

Where this fits

You are building a workflow where Claude drafts code, Codex reviews it, and Gemini checks the docs, but gluing agents together with shell scripts breaks the moment a step fails or an output format changes. This skill shows agents how to use @relayflows/core to define typed DAG workflows with explicit steps, chained outputs, and repair loops. That turns fragile multi-agent orchestration into a structured, observable pipeline.

Why agents benefit

  • Agents can construct workflows with WorkflowBuilder instead of ad-hoc prompts, making dependencies explicit and repeatable.
  • Output chaining with {{steps.X.output}} lets one agent pass results to the next without custom parsing or temp files.
  • Repairable verification gates detect failed reviews or tests, route back to the responsible agent, and re-run until evidence passes.
  • Lead+workers and parallel waves cover common delegation patterns, with event listeners and error handling so agents can react mid-run.
  • The skill covers conversation vs pipeline coordination, so agents can choose the right coordination style instead of defaulting to DAG.

Practical scenarios

Documentation generation with writer and reviewer agents

A writer agent drafts API docs; a reviewer agent checks accuracy and style. If the review gate fails, the workflow routes output back to the writer with feedback, then re-verifies. Completion requires a review pass record, not just text length.

Multi-agent code review with test hardening

Claude implements a change, Codex reviews for edge cases, and the workflow runs tests. If tests fail, Codex receives the failure output, creates a fix, and the test step re-runs. Evidence-based completion means the workflow only finishes when tests actually pass.

Parallel research waves with lead aggregation

A lead agent defines a question; worker agents research separate sources in parallel. Each worker output is chained through {{steps.worker.output}} into a synthesis step. Partial failures mark a worker for retry while successful results continue.

Add it to your agent workflow

Install the skill, then ask your agent to apply the relay workflow patterns from the skill.

npx skills add AgentWorkforce/relay --skill writing-agent-relay-workflows

Minimal TypeScript workflow:

import { WorkflowBuilder } from '@relayflows/core';

const wf = new WorkflowBuilder('docs-review')
  .add('draft', { agent: 'claude', task: 'Write guide' })
  .add('review', { agent: 'codex', task: 'Review {{steps.draft.output}}' })
  .add('verify', { gate: 'review passed', repair: 'review' })
  .build();

More examples are in the skill's README.

Compare before adopting

Compare this against alternatives like LangGraph, AutoGen, or plain code orchestration. Look for quality signals: typed workflow definitions, support for your target agents, and repair gate examples. Check maintenance freshness through recent commits and issue response time. For workflow fit, prefer this skill when you need DAG steps with deterministic chaining and verification; choose a swarm pattern when agents need free-form collaboration. For more context, see the full listing at https://www.openagentskill.com/skills/agentworkforce-writing-agent-relay-workflows.

Why it is worth tracking

@relayflows/core is active with 812 stars and a focused AgentWorkforce maintainer. The skill covers both conversation and pipeline coordination, making it useful for teams standardizing on agent orchestration. Track it when you start moving beyond single-agent prompts into multi-agent pipelines, or when your current shell-based orchestration becomes untestable. Evaluate it early because it encodes reusable patterns, like repairable gates and parallel waves, that are easier to adopt before your workflow becomes entrenched.

Featured Skill

writing-agent-relay-workflows

Skill by AgentWorkforce