Prerequisites
- Install Microsoft Foundry Toolkit for Visual Studio Code.
- For agents that use Foundry resources, set up a Foundry project. Follow the guide for your chosen route for model, permission, and runtime requirements.
- For Copilot-assisted coding, access to GitHub Copilot in Visual Studio Code.
Choose an agent type
Foundry supports prompt agents and hosted agents. Both agent types can use tools and integrate into applications. Prompt agents aren’t limited to prototypes.
Start with a prompt agent when its configuration options meet your needs.
Choose a hosted agent when you need more control over execution. For details,
see When to use hosted agents.
Open Create Agent
Open the creation page to choose how to build your agent.- In the Activity Bar, select Foundry Toolkit.
- Under Developer Tools, expand Build, and select Create Agent.

Choose a creation route
Select the route that matches your agent type, and then follow its guide to configure, test, and save or deploy the agent.
Agent Builder also supports locally stored prompts. Their storage, tools, and
evaluation options differ from Foundry prompt agents. See
Work with local prompts.
Choose how to orchestrate or schedule work
For new code-based workflows, use Microsoft Agent Framework through the sample or Copilot route. To invoke an existing agent on a trigger or schedule, see Routines in Foundry Agent Service (preview).Declarative workflows in Microsoft Foundry are in preview and retire on
December 1, 2026. This retirement doesn’t affect code-based orchestration in
hosted agents. To work with an existing declarative workflow, see
Use and migrate declarative agent workflows.