Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ make validate-examples # validate all examples
- `base.py` - `AgentProvider` ABC defining `execute()`, `validate_connection()`, `close()`
- `copilot.py` - GitHub Copilot SDK implementation
- `claude.py` - Anthropic Claude API implementation
- `claude_agent_sdk.py` - Claude Agent SDK implementation (uses `claude-agent-sdk` package)
- `factory.py` - Provider instantiation

- **gates/**: Human-in-the-loop support
Expand Down Expand Up @@ -183,7 +184,7 @@ Use `pytest.mark.performance` for performance tests (exclude with `-m "not perfo

### Provider Parity

All providers (`copilot.py`, `claude.py`) must maintain feature parity. Any change to one provider's behavior, contract, or capabilities must be applied to all providers. This includes:
All providers must maintain feature parity where applicable. Any change to one provider's behavior, contract, or capabilities must be applied to all providers. This includes:

- **Event callbacks**: Same event types emitted at the same semantic points
- `agent_turn_start` with `{"turn": "awaiting_model"}` — immediately before each API call
Expand All @@ -199,6 +200,13 @@ All providers (`copilot.py`, `claude.py`) must maintain feature parity. Any chan

When modifying any provider, check all other providers for the same change. The dashboard, JSONL logger, console subscriber, and workflow engine all depend on consistent behavior across providers.

#### `claude_agent_sdk.py` parity notes

The Claude Agent SDK provider (`claude_agent_sdk.py`) delegates the agentic loop to the `claude` CLI via the `claude-agent-sdk` package. This achieves **event and output parity** but the following are managed by the SDK rather than Conductor:

- **Retry and error handling**: The SDK handles retries, backoff, and parse recovery internally. The provider wraps SDK errors in `ProviderError` but does not implement its own retry logic.
- **Tool execution**: Tools and MCP servers are managed by the `claude` CLI's own configuration. Workflow-level `tools` and `runtime.mcp_servers` fields are ignored.
- **Runtime config**: `temperature`, `max_tokens`, and `timeout` are not configurable per-workflow — they are controlled by the CLI.
### Run / Resume Parity

The `run` and `resume` commands must accept the same flags wherever a flag is meaningful for a resumed run. When adding a new flag to `run`, add it to `resume` too unless there's a specific reason it cannot apply.
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Conductor makes multi-agent workflows — code review pipelines, research-then-s
## Features

- **YAML-based workflows** - Define multi-agent workflows in readable YAML
- **Multiple providers** - GitHub Copilot or Anthropic Claude with seamless switching
- **Multiple providers** - GitHub Copilot, Anthropic Claude, or Claude Agent SDK with seamless switching
- **Parallel execution** - Run agents concurrently (static groups or dynamic for-each)
- **Sub-workflow composition** - Reusable sub-workflows with templated `input_mapping`, usable inside `for_each` groups for dynamic fan-out
- **Script steps** - Run shell commands and route on exit code or parsed JSON stdout
Expand Down Expand Up @@ -211,13 +211,13 @@ conductor stop

Conductor supports multiple AI providers. Choose based on your needs:

| Feature | Copilot | Claude |
|---------|---------|--------|
| **Pricing** | Subscription ($10-39/mo) | Pay-per-token |
| **Context Window** | 8K-128K tokens | 200K tokens |
| **Tool Support (MCP)** | Yes | Planned |
| **Streaming** | Yes | Planned |
| **Best For** | Heavy usage, tools | Large context, pay-per-use |
| Feature | Copilot | Claude | Claude Agent SDK |
|---------|---------|--------|------------------|
| **Pricing** | Subscription ($10-39/mo) | Pay-per-token | Via Claude Code CLI |
| **Context Window** | 8K-128K tokens | 200K tokens | 200K tokens |
| **Tool Support (MCP)** | Yes | Planned | Yes (built-in) |
| **Streaming** | Yes | Planned | Yes |
| **Best For** | Heavy usage, tools | Large context, pay-per-use | Full Claude Code toolset |

### Using Claude

Expand All @@ -230,6 +230,19 @@ workflow:

Set your API key: `export ANTHROPIC_API_KEY=sk-ant-...`

### Using Claude Agent SDK

```yaml
workflow:
runtime:
provider: claude-agent-sdk
default_model: claude-sonnet-4-6
```

Requires the `claude` CLI to be installed and authenticated. Install the SDK: `uv add claude-agent-sdk`

> **Note:** The `claude-agent-sdk` provider delegates tool and MCP server management to the `claude` CLI. Workflow-level `tools` and `runtime.mcp_servers` fields are ignored — configure these through your Claude Code settings instead.

**See also:** [Claude Documentation](docs/providers/claude.md) | [Provider Comparison](docs/providers/comparison.md) | [Migration Guide](docs/providers/migration.md)

### Using a Local / Custom LLM Endpoint (Ollama, vLLM, Azure OpenAI, ...)
Expand Down
2 changes: 1 addition & 1 deletion docs/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ conductor run <workflow.yaml> [OPTIONS]
| `--metadata KEY=VALUE` | `-m` | Workflow metadata (repeatable). Merged on top of YAML `metadata:` and surfaced in the `workflow_started` event. |
| `--workspace-instructions` | | Auto-discover convention files (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, and `.github/instructions/**/*.instructions.md`) by walking from CWD up to the git root. Concatenated and prepended to every agent's prompt. See [Workspace Instructions](#workspace-instructions) below for details on the `.github/instructions/` directory convention. |
| `--instructions PATH` | | Explicit path to an instructions file (repeatable). Combines with auto-discovered files when both flags are used. |
| `--provider PROVIDER` | `-p` | Override provider (copilot, claude) |
| `--provider PROVIDER` | `-p` | Override provider (copilot, claude, claude-agent-sdk) |
| `--dry-run` | | Show execution plan without running |
| `--skip-gates` | | Auto-select first option at human gates |
| `--quiet` | `-q` | Minimal output (agent lifecycle and routing only) |
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The `runtime` section of your workflow defines provider settings and global defa
```yaml
workflow:
runtime:
provider: copilot # or 'claude'
provider: copilot # or 'claude' or 'claude-agent-sdk'
default_model: gpt-5.2
temperature: 0.7
max_tokens: 4096
Expand Down
87 changes: 71 additions & 16 deletions docs/providers/comparison.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
# Provider Comparison: Copilot vs Claude
# Provider Comparison: Copilot vs Claude vs Claude Agent SDK

This guide helps you choose between GitHub Copilot and Anthropic Claude providers for your workflows.
This guide helps you choose between GitHub Copilot, Anthropic Claude, and Claude Agent SDK providers for your workflows.

## Quick Comparison

| Feature | Copilot | Claude | Winner |
|---------|---------|--------|--------|
| **Context Window** | per-model (SDK-reported) | per-model (SDK-reported) | Tie |
| **Pricing Model** | Subscription ($10-39/mo) | Pay-per-token | Depends |
| **Setup** | GitHub auth | API key | Copilot (easier) |
| **Model Selection** | GPT-5.2, o1 | Haiku, Sonnet, Opus | Tie |
| **Streaming** | Yes | No (Phase 1) | Copilot |
| **Tool Support** | Yes (MCP, all types) | Yes (MCP, stdio only) | Copilot |
| **Reasoning / Extended Thinking** | Yes (`reasoning_effort` on session) | Yes (extended `thinking` budget) | Tie |
| **Speed** | Fast | Fast | Tie |
| **Output Quality** | Excellent | Excellent | Tie |
| **Cost Predictability** | High (flat rate) | Variable (usage-based) | Copilot |
| **Multi-provider** | No | Yes (via Conductor) | Claude |
| Feature | Copilot | Claude | Claude Agent SDK | Winner |
|---------|---------|--------|------------------|--------|
| **Context Window** | per-model (SDK-reported) | per-model (SDK-reported) | 200K | Tie |
| **Pricing Model** | Subscription ($10-39/mo) | Pay-per-token | Via Claude Code CLI | Depends |
| **Setup** | GitHub auth | API key | `claude` CLI auth | Copilot (easier) |
| **Model Selection** | GPT-5.2, o1 | Haiku, Sonnet, Opus | Haiku, Sonnet, Opus | Tie |
| **Streaming** | Yes | No (Phase 1) | Yes | Copilot / Claude Agent SDK |
| **Tool Support** | Yes (MCP, all types) | Yes (MCP, stdio only) | Yes (built-in, CLI-managed) | Copilot |
| **Reasoning / Extended Thinking** | Yes (`reasoning_effort` on session) | Yes (extended `thinking` budget) | Inherits from CLI config | Tie |
| **Speed** | Fast | Fast | Fast | Tie |
| **Output Quality** | Excellent | Excellent | Excellent | Tie |
| **Cost Predictability** | High (flat rate) | Variable (usage-based) | Variable | Copilot |
| **Multi-provider** | No | Yes (via Conductor) | No | Claude |
| **Agentic Loop** | SDK-managed | Manual (provider code) | SDK-managed (delegated to CLI) | Depends |

## When to Use Copilot

Expand Down Expand Up @@ -112,6 +113,51 @@ agents:
prompt: "Analyze the following document ({{ document | length }} chars)"
```

## When to Use Claude Agent SDK

### ✅ Choose Claude Agent SDK if:

1. **You want built-in tool support with Claude models**
- WebSearch, WebFetch, Bash, file operations out of the box
- No MCP server configuration needed for common tools
- Full Claude Code toolset available

2. **You already use the `claude` CLI**
- Authentication handled by the CLI
- No separate API key management
- Settings inherited from your Claude Code environment

3. **You want the SDK to manage the agentic loop**
- Retry logic, tool execution, and structured output handled by the SDK
- Less provider code to maintain
- Native interrupt support

4. **You need streaming with Claude models**
- Real-time message streaming (unlike the raw Claude provider)
- Typed message objects for each event

### Important: Tools and MCP Servers

The `claude-agent-sdk` provider delegates tool and MCP server management entirely to the `claude` CLI. This means:

- Workflow-level `tools` and `runtime.mcp_servers` fields are **ignored** — configure tools and MCP servers through your Claude Code settings instead
- The full Claude Code toolset (WebSearch, Bash, Read, Write, etc.) is available automatically
- `temperature`, `max_tokens`, and `timeout` are also managed by the CLI and not configurable per-workflow

### Example Claude Agent SDK Workflow

```yaml
workflow:
name: sdk-workflow
runtime:
provider: claude-agent-sdk
default_model: claude-sonnet-4-6

agents:
- name: researcher
prompt: "Research {{ topic }} using web search"
```

## Cost Comparison

### Scenario 1: Light Usage (10 hours/month)
Expand Down Expand Up @@ -326,6 +372,8 @@ Use this matrix to decide:
| Process long documents | **Claude** |
| Complex reasoning tasks | **Claude** (Opus) |
| Simple high-volume tasks | **Claude** (Haiku 4.5) |
| Already use `claude` CLI | **Claude Agent SDK** |
| Want streaming with Claude | **Claude Agent SDK** |

## Multi-Provider Strategy

Expand Down Expand Up @@ -375,4 +423,11 @@ workflow:
- ✅ Long document processing
- ✅ Cost optimization (Haiku)

**Bottom line**: Both are excellent. Choose based on your usage patterns, budget, and feature requirements. Conductor makes it easy to switch between them or use both strategically.
**Choose Claude Agent SDK** for:
- ✅ Built-in tools (WebSearch, Bash, etc.)
- ✅ Streaming with Claude models
- ✅ SDK-managed agentic loop
- ✅ Existing `claude` CLI users
- ✅ No API key management

**Bottom line**: All three are excellent. Choose based on your usage patterns, budget, and feature requirements. Conductor makes it easy to switch between them or use all three strategically.
53 changes: 53 additions & 0 deletions examples/test-claude-agent-sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Simple Question-Answering Workflow using Claude Agent SDK
#
# This example demonstrates a basic linear workflow with a single agent
# that answers questions. It shows:
# - Basic workflow structure
# - Input parameters
# - Output schema validation
# - Simple routing to $end
#
# Usage:
# conductor run examples/test-claude-agent-sdk.yaml --input question="What is Microsoft Conductor?"
#
# Note: Requires Claude Code CLI installed and configured. Adjust the runtime model as needed based on your Claude Code setup.

workflow:
name: simple-qa
description: A simple question-answering workflow with a single agent
version: "1.0.0"
entry_point: answerer

runtime:
provider: claude-agent-sdk
default_model: claude-haiku-4-5@20251001 # Vertex AI naming; it depends on the backedend your Claude Code setup uses. Adjust as needed.

input:
question:
type: string
required: true
description: The question to answer

agents:
- name: answerer
description: Answers the user's question clearly and concisely
prompt: |
You are a helpful assistant and researcher. Please answer the following question
clearly and concisely:

Question: {{ workflow.input.question }}

Provide a direct answer without unnecessary preamble.
output:
answer:
type: string
description: The answer to the question
confidence:
type: string
description: Confidence level (high, medium, low)
routes:
- to: $end

output:
answer: "{{ answerer.output.answer }}"
confidence: "{{ answerer.output.confidence }}"
2 changes: 1 addition & 1 deletion plugins/conductor/skills/conductor/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Validate, run, and execute workflows; creating new workflows when e

# Conductor

CLI tool for defining and running multi-agent workflows with the GitHub Copilot SDK or Anthropic Claude.
CLI tool for defining and running multi-agent workflows with the GitHub Copilot SDK, Anthropic Claude, or Claude Agent SDK.

> **DO NOT create new workflow files unless the user explicitly asks you to create one.** Default to running, validating, or debugging existing workflows. If the user's request is ambiguous, assume they want to run or modify an existing workflow rather than create a new one.

Expand Down
14 changes: 7 additions & 7 deletions plugins/conductor/skills/conductor/references/yaml-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Complete reference for all YAML configuration options. Derived from the Pydantic

```yaml
workflow: WorkflowDef # Required: workflow configuration
tools: [string] # Optional: workflow-level tool names
tools: [string] # Optional: workflow-level tool names (ignored by claude-agent-sdk — uses CLI config)
agents: [AgentDef] # Required: agent definitions
parallel: [ParallelGroup] # Optional: static parallel groups
for_each: [ForEachDef] # Optional: dynamic parallel groups
Expand All @@ -27,16 +27,16 @@ workflow:

# Runtime configuration
runtime:
provider: string | object # "copilot" (default), "claude", or "openai-agents"
provider: string | object # "copilot" (default), "claude", "claude-agent-sdk", or "openai-agents"
# — or a ProviderSettings object (see below)
default_model: string # Default model for all agents
temperature: float # 0.0-1.0, controls randomness (optional)
max_tokens: integer # Max OUTPUT tokens per response, 1-200000 (optional)
timeout: float # Per-request timeout in seconds (optional, default: 600)
temperature: float # 0.0-1.0, controls randomness (optional, copilot/claude only)
max_tokens: integer # Max OUTPUT tokens per response, 1-200000 (optional, copilot/claude only)
timeout: float # Per-request timeout in seconds (optional, default: 600, copilot/claude only)
max_agent_iterations: integer # Max tool-use roundtrips per agent (1-500, optional)
max_session_seconds: float # Wall-clock timeout per agent session in seconds (optional)
default_reasoning_effort: string # Workflow-wide reasoning/thinking effort: low, medium, high, xhigh (optional)
mcp_servers: # MCP server configurations
mcp_servers: # MCP server configurations (ignored by claude-agent-sdk — uses CLI config)
<server_name>:
type: string # "stdio" (default), "http", or "sse"
command: string # Command to run (required for stdio)
Expand Down Expand Up @@ -107,7 +107,7 @@ agents:
type: string # "agent" (default), "human_gate", "script", "workflow", "wait", or "terminate"
description: string # What this agent does
model: string # Override default_model
provider: string # Per-agent provider override ("copilot" or "claude")
provider: string # Per-agent provider override ("copilot", "claude", or "claude-agent-sdk")

# Input specification (for explicit context mode)
input:
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ dependencies = [
"packaging>=21.0",
]

[project.optional-dependencies]
claude-agent-sdk = [
"claude-agent-sdk>=0.1.64",
]

[project.urls]
Homepage = "https://github.com/microsoft/conductor"
Documentation = "https://github.com/microsoft/conductor#readme"
Expand Down
4 changes: 2 additions & 2 deletions src/conductor/config/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ class AgentDef(BaseModel):
) = None
"""Agent type. Defaults to 'agent' if not specified."""

provider: Literal["copilot", "claude"] | None = None
provider: Literal["copilot", "claude", "claude-agent-sdk"] | None = None
"""Provider override for this agent.

If None (default), the agent uses the workflow.runtime.provider.
Expand Down Expand Up @@ -1319,7 +1319,7 @@ class ProviderSettings(BaseModel):

model_config = ConfigDict(extra="forbid", frozen=True)

name: Literal["copilot", "openai-agents", "claude"] = "copilot"
name: Literal["copilot", "openai-agents", "claude", "claude-agent-sdk"] = "copilot"
"""SDK provider to use for agent execution."""

type: Literal["openai", "azure", "anthropic"] | None = None
Expand Down
6 changes: 6 additions & 0 deletions src/conductor/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@

if TYPE_CHECKING:
from conductor.providers.claude import ClaudeProvider
from conductor.providers.claude_agent_sdk import ClaudeAgentSdkProvider
from conductor.providers.copilot import CopilotProvider
from conductor.providers.factory import create_provider

__all__ = [
"AgentOutput",
"AgentProvider",
"ClaudeAgentSdkProvider",
"ClaudeProvider",
"CopilotProvider",
"create_provider",
Expand All @@ -29,6 +31,10 @@ def __getattr__(name: str) -> Any:
from conductor.providers.claude import ClaudeProvider

return ClaudeProvider
if name == "ClaudeAgentSdkProvider":
from conductor.providers.claude_agent_sdk import ClaudeAgentSdkProvider

return ClaudeAgentSdkProvider
if name == "CopilotProvider":
from conductor.providers.copilot import CopilotProvider

Expand Down
Loading
Loading