Declarative workflows in Microsoft Foundry are in preview and retire on
December 1, 2026. Use Microsoft Agent Framework for new workflow development.
This retirement doesn’t affect code-based orchestration in hosted agents.
See the workflow migration guide
for supported migration paths.
Prerequisites
- Install Microsoft Foundry Toolkit for Visual Studio Code.
- Select the Foundry project that contains your existing declarative workflow.
- Access to read and run that workflow and its referenced agents. To save changes, you also need permission to create an agent version in the project. See Foundry role-based access control.
- For code conversion, access to GitHub Copilot in Visual Studio Code.
View a declarative agent workflow
Find the workflow in your project’s consolidated agent list.- In the Foundry Toolkit view, under My Resources, confirm the selected Foundry project.
- Select Agents, and then select the Workflow tab.
- Select the workflow name to open its playground.
- Use the version selector to choose the saved version you want to inspect.
Edit an existing workflow definition
Export the definition before you edit or migrate it. Keep a copy of the original YAML so that you can compare it with your changes.- Open the existing workflow in the Foundry portal.
- In the workflow designer, switch to the YAML view and copy or export the definition. For details, see Export your workflow definition.
- Save the definition in your local workspace with a name ending in
.workflow.yaml, such assupport.workflow.yaml. - Open the file in Visual Studio Code and edit the YAML.
- Save the file. Local file changes don’t update the workflow in Foundry.
Save a new version of the existing workflow
Before retirement, you can deploy an edited definition to the same workflow. Confirm the project and workflow name to avoid creating a different resource.- Confirm that the original workflow’s project is selected in Foundry Toolkit.
- With the
.workflow.yamlfile open, select Deploy in the editor toolbar. - In Enter workflow name, enter the name of the existing workflow.
- Wait for the deployment success notification.
- Reopen the workflow from Agents > Workflow and select the new version.
Test a workflow in the playground
Test the saved version that you plan to maintain or migrate. Use the same requests later to compare the migrated implementation.- Open the workflow’s playground and select the required version.
- On the Playground tab, select New to start a new playground session.
- Enter a request that exercises the workflow and send it.
- Review the response and the execution graph. Confirm that the expected agents, branches, and steps run.
- Repeat with requests that exercise different branches, missing inputs, and any approval steps in your workflow.
Convert a YAML workflow to Agent Framework code
Use the playground’s code-generation action to ask GitHub Copilot to convert the selected workflow definition. Generated code is a starting point that you must review and test.- In the workflow playground, select the version to migrate.
- Select Generate Code.
- Choose Python or C#.
- Review the conversion request in Copilot Chat and follow its prompts to generate the code.
- Review the generated project, dependencies, model connections, tools, and authentication configuration.
- Compare its orchestration with the exported YAML. Check branching, variables, agent calls, and human approval steps.
- Run the code locally and test it with the requests you used for the original workflow. Use Agent Inspector to inspect execution.
- When the code behaves as required, follow Create hosted agents to prepare a supported hosted-agent project, deploy it, and test the deployed version.