Skip to main content
Use Microsoft Foundry Toolkit for Visual Studio Code to configure a prompt agent or develop a code-based hosted agent. Choose a creation route based on whether instructions and supported tools meet your needs, or you need custom runtime logic.

Prerequisites

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.
  1. In the Activity Bar, select Foundry Toolkit.
  2. Under Developer Tools, expand Build, and select Create Agent.
Screenshot of Create Agent with options to code from samples, code with Copilot, or build an agent in Agent Builder.
If Developer Tools uses Group by Resource, find Create Agent under Agent Dev Tools instead of Build.

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.
Use these guides as you develop and integrate your agent: