Master Declarative Agent Workflows in VS Code Using Microsoft Foundry
Source: Dev.to
š§© What Are Declarative Agent Workflows?
Declarative workflows are like giving your agents a recipe. Instead of telling them stepābyāstep how to cook, you describe what the final dish should look like. Foundry then handles the execution logic.
Example workflow:
- AgentāÆ1 pulls data.
- AgentāÆ2 analyzes the data.
- AgentāÆ3 formats the output.
You donāt need to micromanage every stepāyou just declare the workflow, and Foundry ensures it runs correctly.
š» Setting Up in VSāÆCode
VSāÆCode is an ideal environment for working with Foundry workflows because itās lightweight, extensible, and developerāfriendly.
Typical workflow:
- Open your workflow files ā either click the VSāÆCode link inside Foundry or open the YAML/JSON files directly.
- Explore the structure ā youāll see agents, tools, and triggers defined declaratively.
- Run the workflow ā use Foundryās CLI or the VSāÆCode extensions to execute it.
- Test and debug ā VSāÆCodeās integrated terminal and debugging tools make it easy to spot errors or refine logic.
š Running & Testing Your Workflow
Running a workflow is as simple as executing a command, but testing is where the magic happens.
- Unit testing agents ā verify that each agent performs its role correctly.
- Integration testing ā run the full workflow to see how agents interact.
ā” Why This Matters
Declarative workflows make agent development scalable and reliable. Instead of hacking together scripts, you define intent and let Foundry handle execution. Combined with VSāÆCode, you get a smooth developer experience: easy editing, debugging, and testing.
Ideal for:
- Teams building multiāagent systems.
- Developers experimenting with humanāinātheāloop automation.
- Businesses wanting repeatable, auditable workflows.
š„ Watch the Magic
A full video demonstration is available, showing the process stepābyāstepāfrom creating workflows with integrated agents, opening them in VSāÆCode, to running and testing them with Microsoft Foundry.