Microsoft's Conductor Lets You Build Claude Code Workflows in YAML

Microsoft's Conductor Lets You Build Claude Code Workflows in YAML

Define multi-agent Claude workflows with parallel execution, human gates, and safety limits using a simple YAML syntax.

6h ago·3 min read·1 views·via hn_claude_cli
Share:

What It Does

Conductor is a new CLI tool from Microsoft that lets you define and run multi-agent AI workflows using YAML configuration files. While it supports GitHub Copilot, its native integration with Anthropic Claude makes it particularly relevant for Claude Code users. Instead of writing custom Python scripts to orchestrate multiple Claude agents, you can now define complex workflows—like evaluator-optimizer loops, parallel research tasks, or human-in-the-loop approval chains—in a declarative YAML format.

The tool addresses a key limitation of single-prompt interactions: a single LLM can't review its own work, research from multiple angles, or pause for human approval. Conductor provides the patterns that work for these scenarios, with built-in safety limits to prevent infinite loops.

Setup

Install Conductor using uv (recommended) or pipx:

# Using uv
uv tool install git+https://github.com/microsoft/conductor.git

# Using pipx
pipx install git+https://github.com/microsoft/conductor.git

You'll need to set your Anthropic API key as an environment variable:

export ANTHROPIC_API_KEY=your_key_here

When To Use It

Conductor shines when your Claude Code tasks need orchestration beyond what a single claude code command can handle. Here are specific use cases:

Web Dashboard

Code Review Workflows: Create an evaluator-optimizer loop where one Claude agent writes code and another reviews it, iterating until quality thresholds are met.

Parallel Research: When you need to explore multiple approaches simultaneously (e.g., "research three different database solutions for this feature"), Conductor can run agents in parallel and synthesize results.

Human Approval Gates: Insert manual checkpoints in automated workflows—perfect for production deployments or sensitive code changes where you want human oversight.

Conditional Routing: Route between different Claude agents based on output conditions. For example, if a test fails, route to a debugging agent; if it passes, route to a deployment agent.

Example Workflow

Here's a simple YAML workflow that uses Claude to answer a question:

# qa-workflow.yaml
workflow:
  name: simple-qa
  description: A simple question-answering workflow
  entry_point: answerer

agents:
  - name: answerer
    model: claude-3-5-sonnet-20241022
    prompt: |
      Answer the following question:
      {{ workflow.input.question }}
    output:
      answer:
        type: string

routes:
  - to: $end

output:
  answer: "{{ answerer.output.answer }}"

Run it with:

conductor run qa-workflow.yaml --input question="What is Python?"

Advanced Features

Web Dashboard: Launch a real-time visualization of your workflow with --web flag:

conductor run workflow.yaml --web --input question="What is Python?"

The dashboard shows an interactive DAG graph, live streaming of agent outputs, and in-browser human gates.

Script Steps: Mix AI agents with shell commands. Run tests, build scripts, or git operations between Claude interactions.

Safety Limits: Set max iterations and timeouts directly in YAML to prevent runaway workflows.

Validation: Validate your workflow before execution with conductor validate workflow.yaml.

Integration with Claude Code

While Conductor runs as a separate tool, you can integrate it into your Claude Code workflow by:

  1. Defining complex multi-step processes in YAML
  2. Running them via Conductor CLI
  3. Using the results in your regular claude code sessions

This separation allows you to maintain simple claude code interactions for day-to-day tasks while having powerful orchestration available for complex scenarios.

AI Analysis

Claude Code users should start thinking about which repetitive or complex tasks could benefit from workflow automation. Instead of manually running multiple `claude code` commands in sequence, define a YAML workflow once and reuse it. Specifically: Create a `workflows/` directory in your project for Conductor YAML files. Start with a code review workflow where Claude writes code, another instance reviews it, and you get the final result. This pattern is more reliable than asking a single Claude instance to "write and review" in one prompt. Use the human gate feature for deployment approvals. Define a workflow that writes code, runs tests, and then pauses for your approval before creating a PR. This gives you automated assistance while maintaining control over critical steps. Remember that Conductor is separate from Claude Code's native MCP-based workflows, but it complements them by providing more structured orchestration for complex multi-agent scenarios.
Original sourcegithub.com

Trending Now

More in Products & Launches

Browse more AI articles