Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/agents/workflow.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Workflows are ideal for scenarios where you need to:
- Add branching logic (for example, if/else) and variable handling without writing code.
- Create human-in-the-loop steps (for example, approvals or clarifying questions).

If you want to edit workflow YAML in Visual Studio Code or run workflows in a local playground, see:
To maintain an existing workflow or build code-based orchestration in Visual Studio Code, see:

- [Work with Declarative (Low-code) Agent workflows in Visual Studio Code](/developer-tools-and-integrations/vs-code-agents-workflow-low-code)
- [Work with Hosted (Pro-code) Agent workflows in Visual Studio Code](/developer-tools-and-integrations/vs-code-agents-workflow-pro-code)
- [Use and migrate declarative agent workflows](/developer-tools-and-integrations/vs-code-agents-workflow-low-code)
- [Create hosted agents](/developer-tools-and-integrations/vs-code-agents-workflow-pro-code)

## Understand workflow patterns

Expand Down Expand Up @@ -367,7 +367,7 @@ Your workflow's YAML definition is the portable artifact you carry to any of the
1. Switch to the **YAML** view to see the full configuration.
1. Copy or export the YAML file so you can reuse it in your new environment.

The Agent Inspector in the Foundry AI Toolkit for Visual Studio Code lets you visualize and run Foundry workflow definitions, which is helpful while you validate a migration. For more information, see [Develop agents with Agent Inspector](/agents/agent-inspector).
The Agent Inspector in the Foundry AI Toolkit for Visual Studio Code lets you visualize and run Foundry workflow definitions, which is helpful while you validate a migration.

### Option 1: Microsoft Agent Framework (recommended)

Expand All @@ -392,5 +392,5 @@ For lightweight scenarios where one agent just needs to call another - without a

- [Foundry Agent Service FAQ](../../agents/faq.yml)
- [Tool best practices for Foundry agents](/agents/tool-best-practice)
- [Work with Declarative (Low-code) Agent workflows in Visual Studio Code](/developer-tools-and-integrations/vs-code-agents-workflow-low-code)
- [Work with Hosted (Pro-code) Agent workflows in Visual Studio Code](/developer-tools-and-integrations/vs-code-agents-workflow-pro-code)
- [Use and migrate declarative agent workflows](/developer-tools-and-integrations/vs-code-agents-workflow-low-code)
- [Create hosted agents](/developer-tools-and-integrations/vs-code-agents-workflow-pro-code)
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: "Create an agent with Microsoft Foundry Toolkit for Visual Studio Code"
description: "Choose a prompt or hosted agent and start with Agent Builder, samples, or GitHub Copilot in Microsoft Foundry Toolkit for Visual Studio Code."
---

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

- [Install Microsoft Foundry Toolkit for Visual Studio Code](/developer-tools-and-integrations/install-foundry-toolkit-visual-studio-code).
- For agents that use Foundry resources,
[set up a Foundry project](/developer-tools-and-integrations/set-up-foundry-project-visual-studio-code).
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](https://code.visualstudio.com/docs/copilot/overview).

## Choose an agent type

Foundry supports [prompt agents and hosted agents](/agents/development-lifecycle#agent-types-in-microsoft-foundry).
Both agent types can use tools and integrate into applications. Prompt agents aren't
limited to prototypes.

| Compare | Prompt agent | Hosted agent |
| --- | --- | --- |
| Define behavior | Configure a model, instructions, and supported tools. | Implement custom logic with a framework or your own code. |
| Use it for | Tasks that instructions and supported tools can handle, such as answering questions or summarizing documents. | Custom orchestration, dependencies, or runtime behavior, such as a multi-agent workflow. |
| What you maintain | The agent configuration and saved versions. | The agent code, dependencies, packaging, and deployment configuration. |
| Where to start | Agent Builder. | Hosted-agent samples or Copilot-assisted coding. |

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](/agents/hosted-agents#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**.
1. Under **Developer Tools**, expand **Build**, and select **Create Agent**.

<Frame>
<img src="/images/create-agent.png" alt="Screenshot of Create Agent with options to code from samples, code with Copilot, or build an agent in Agent Builder." />
</Frame>

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.

| Route | Action in Create Agent | Next guide |
| --- | --- | --- |
| Agent Builder | Select **Build an agent** to configure a prompt agent without a hosted-agent code project. | [Create a prompt agent](/developer-tools-and-integrations/create-prompt-agent-visual-studio-code). |
| Hosted-agent samples | Under **Code an agent from samples**, select a framework or **Browse all samples**. Choose a sample for your scenario. | For code-based orchestration, [create hosted agents](/developer-tools-and-integrations/vs-code-agents-workflow-pro-code). For other scenarios, follow the selected sample's generated `README.md`. |
| Copilot-assisted coding | Select **Code an agent with Copilot** to develop agent code with GitHub Copilot and Foundry skills. | [Use the Microsoft Foundry Skill in coding agents](/get-started/use-microsoft-foundry-skill). Review generated code and test it before deployment. |

Agent Builder also supports locally stored prompts. Their storage, tools, and
evaluation options differ from Foundry prompt agents. See
[Work with local prompts](/developer-tools-and-integrations/create-prompt-agent-visual-studio-code#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)](/agents/routines).

<Info>

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](/developer-tools-and-integrations/vs-code-agents-workflow-low-code).

</Info>

## Related content

Use these guides as you develop and integrate your agent:

- [Microsoft Foundry Toolkit for Visual Studio Code overview](/developer-tools-and-integrations/get-started-projects-visual-studio-code)
- [Agent development lifecycle](/agents/development-lifecycle)
- [Publish an agent application](/agents/agent-applications)
Loading
Loading