feat: Workflow Composition (Sub-Workflows) via type: workflow#87
Draft
feat: Workflow Composition (Sub-Workflows) via type: workflow#87
type: workflow#87Conversation
Implement workflow composition allowing agents to reference external workflow YAML files as sub-workflows. Key changes: - Schema: Add 'workflow' to AgentDef type literal, add 'workflow' field for sub-workflow path, add model validation for workflow type - Engine: Add _execute_subworkflow method with depth limit enforcement, circular reference detection, and provider inheritance - Validator: Reject workflow agents in parallel groups and for-each groups - Tests: Add schema validation tests and engine integration tests - Docs: Update workflow-syntax.md and schema references Agent-Logs-Url: https://github.com/microsoft/conductor/sessions/7dfbaf29-06cd-448f-89f1-f0289a3466a8 Co-authored-by: jrob5756 <7672803+jrob5756@users.noreply.github.com>
…nested conditionals Agent-Logs-Url: https://github.com/microsoft/conductor/sessions/7dfbaf29-06cd-448f-89f1-f0289a3466a8 Co-authored-by: jrob5756 <7672803+jrob5756@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add sub-workflows support via workflow agent type
feat: Workflow Composition (Sub-Workflows) via Apr 10, 2026
type: workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new
type: workflowagent type that references external workflow YAML files as sub-workflows, enabling composable and reusable workflow building blocks.Sub-workflows run as black boxes — internal agents aren't visible to the parent. Output is stored in context like any other agent (
{{ deep_research.output.findings }}).Schema (
config/schema.py)AgentDef.typeextended with"workflow"literalworkflow: str | Nonefield for sub-workflow YAML pathworkflowpath, forbidsprompt,model,provider,tools,system_prompt,command,optionsEngine (
engine/workflow.py)_execute_subworkflow()— loads referenced YAML, creates childWorkflowEngineinheriting parent's provider/registry, runs it, returns outputMAX_SUBWORKFLOW_DEPTH = 10with depth tracking via_subworkflow_depthconstructor paramsubworkflow_started/completed/failedevents, context storage, routing, interrupt supportValidator (
config/validator.py)Tests (31 new)
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/copilot_internal/user/home/REDACTED/.local/lib/python3.12/site-packages/copilot/bin/copilot /home/REDACTED/.local/lib/python3.12/site-packages/copilot/bin/copilot --headless --no-auto-update --log-level info --stdio(http block)If you need me to access, download, or install something from one of these locations, you can either: