Skip to content
Draft
Show file tree
Hide file tree
Changes from 138 commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
907cde7
Updates
v-shalinirob Oct 13, 2025
1074e5c
Updates
v-shalinirob Oct 13, 2025
e50ec64
Images added for QSG
v-shalinirob Oct 13, 2025
6a3ca25
Added highlights
v-shalinirob Oct 13, 2025
ecff009
Update build-first-agent.md
v-shalinirob Oct 13, 2025
3f18a42
Update build-first-agent.md
v-shalinirob Oct 13, 2025
43d31a0
Updates
v-shalinirob Oct 13, 2025
5705b62
Updates
v-shalinirob Oct 13, 2025
cf1d8f9
Update build-first-agent.md
v-shalinirob Oct 13, 2025
c260cec
Updates
v-shalinirob Oct 13, 2025
9f326dc
Updates
v-shalinirob Oct 13, 2025
9b94eef
Update build-first-agent.md
v-shalinirob Oct 13, 2025
4af9e04
Update build-first-agent.md
v-shalinirob Oct 13, 2025
8af432f
Update build-first-agent.md
v-shalinirob Oct 13, 2025
aad4d41
Updates
v-shalinirob Oct 13, 2025
66e41e5
Update overview.md
v-shalinirob Oct 13, 2025
933f428
Update overview.md
v-shalinirob Oct 13, 2025
5a1cfa7
Update overview.md
v-shalinirob Oct 13, 2025
899ad8e
Update overview.md
v-shalinirob Oct 13, 2025
39de561
Update overview.md
v-shalinirob Oct 13, 2025
11940ed
Update overview.md
v-shalinirob Oct 13, 2025
e91e9ca
Updates
v-shalinirob Oct 13, 2025
d480e2a
Update TOC.yml
v-shalinirob Oct 13, 2025
36c3987
Merge branch 'main' into Overview-and-agent-QSG
v-shalinirob Oct 14, 2025
8eac9a8
Update overview.md
v-shalinirob Oct 14, 2025
da6bea8
Updates
v-shalinirob Oct 14, 2025
dc59b50
Update overview.md
v-shalinirob Oct 14, 2025
89c163a
Update .openpublishing.redirection.json
v-shalinirob Oct 14, 2025
d9cc6b1
Redirected files removed
v-shalinirob Oct 14, 2025
12547d1
Updates
v-shalinirob Oct 14, 2025
f4a20a0
Update get-started-overview.md
v-shalinirob Oct 14, 2025
50a750e
Update overview.md
v-shalinirob Oct 14, 2025
3959698
Update overview.md
v-shalinirob Oct 14, 2025
a4373e5
Update select-llm.png
v-shalinirob Oct 14, 2025
c466daa
Update build-first-agent.md
v-shalinirob Oct 14, 2025
49e0a87
Update overview.md
v-shalinirob Oct 14, 2025
9590eb9
Update overview.md
v-shalinirob Oct 14, 2025
97df9e8
Update overview.md
v-shalinirob Oct 14, 2025
c2a7f4d
Update overview.md
v-shalinirob Oct 14, 2025
69add31
Update overview.md
v-shalinirob Oct 14, 2025
bb28536
Update overview.md
v-shalinirob Oct 14, 2025
79ca73e
Update overview.md
v-shalinirob Oct 14, 2025
a786917
Update overview.md
v-shalinirob Oct 14, 2025
250059d
Update overview.md
v-shalinirob Oct 14, 2025
0cacda5
Update overview.md
v-shalinirob Oct 14, 2025
e0206b3
Update overview.md
v-shalinirob Oct 14, 2025
3fce279
images
v-shalinirob Oct 14, 2025
8f29ddb
Update overview.md
v-shalinirob Oct 14, 2025
77fe2f2
Update overview.md
v-shalinirob Oct 14, 2025
9e96d83
Updates
v-shalinirob Oct 14, 2025
165e6dc
Update overview.md
v-shalinirob Oct 14, 2025
a140386
Update overview.md
v-shalinirob Oct 14, 2025
6fa3468
Update overview.md
v-shalinirob Oct 14, 2025
8f0773e
Update overview.md
v-shalinirob Oct 14, 2025
1a7b137
Updates
v-shalinirob Oct 15, 2025
de17299
Update TOC.yml
v-shalinirob Oct 15, 2025
0b1201e
Update overview.md
v-shalinirob Oct 15, 2025
1d6eacc
Update agent-scenario-academic.png
v-shalinirob Oct 15, 2025
f63409b
Update overview.md
v-shalinirob Oct 15, 2025
a836e38
Update overview.md
v-shalinirob Oct 15, 2025
bd1e80c
Update overview.md
v-shalinirob Oct 15, 2025
3f77634
Update overview.md
v-shalinirob Oct 15, 2025
4f0ec84
Update overview.md
v-shalinirob Oct 15, 2025
7df0375
image updated
v-shalinirob Oct 15, 2025
956a900
Delete agent-response-0.png
v-shalinirob Oct 15, 2025
6a3d7e1
Update overview.md
v-shalinirob Oct 15, 2025
d8780ab
Updates
v-shalinirob Oct 15, 2025
4a17ead
Update overview.md
v-shalinirob Oct 15, 2025
f9b3dc1
Merge branch 'main' into Overview-and-agent-QSG
v-shalinirob Oct 16, 2025
f86167e
Update overview.md
v-shalinirob Oct 16, 2025
bffe33d
Update overview.md
v-shalinirob Oct 16, 2025
c4506a0
Update overview.md
v-shalinirob Oct 16, 2025
3c066e5
Update overview.md
v-shalinirob Oct 16, 2025
f1ba2f1
Update overview.md
v-shalinirob Oct 16, 2025
b7aae40
Updates
v-shalinirob Oct 17, 2025
307d0de
Update overview.md
v-shalinirob Oct 17, 2025
a36caeb
Update overview.md
v-shalinirob Oct 17, 2025
5522b8d
Update overview.md
v-shalinirob Oct 17, 2025
8a615bf
Update overview.md
v-shalinirob Oct 17, 2025
4677e0f
Updates
v-shalinirob Oct 17, 2025
c0a8da2
Updates
v-shalinirob Oct 17, 2025
108b0cd
Updates
v-shalinirob Oct 17, 2025
76a4c41
Update overview.md
v-shalinirob Oct 17, 2025
526fcd0
Update overview.md
v-shalinirob Oct 17, 2025
4a54491
Update overview.md
v-shalinirob Oct 17, 2025
4ced22f
Updates
v-shalinirob Oct 17, 2025
bebb88b
Update overview.md
v-shalinirob Oct 17, 2025
ccec9df
Updates
v-shalinirob Oct 17, 2025
2625807
Merge branch 'main' into Overview-and-agent-QSG
v-shalinirob Oct 21, 2025
06f3625
Update overview.md
v-shalinirob Oct 21, 2025
f39eee4
Update overview.md
v-shalinirob Oct 21, 2025
b85fde8
Update overview.md
v-shalinirob Oct 21, 2025
7b6522c
Update overview.md
v-shalinirob Oct 21, 2025
282c49d
Update overview.md
v-shalinirob Oct 21, 2025
e462421
Update overview.md
v-shalinirob Oct 21, 2025
efada45
Update overview.md
v-shalinirob Oct 21, 2025
650cde1
Update overview.md
v-shalinirob Oct 21, 2025
632571b
Image updated
v-shalinirob Oct 21, 2025
e2baa0c
Update overview.md
v-shalinirob Oct 21, 2025
e3f9f93
Update overview.md
v-shalinirob Oct 21, 2025
c6ded38
Update overview.md
v-shalinirob Oct 21, 2025
3a1b286
Updates
v-shalinirob Oct 21, 2025
7da7445
Update overview.md
v-shalinirob Oct 21, 2025
59a0b0a
Updated images
v-shalinirob Oct 21, 2025
39a89fe
Updates
v-shalinirob Oct 21, 2025
fa25d0c
Update overview.md
v-shalinirob Oct 21, 2025
7faa485
Update overview.md
v-shalinirob Oct 21, 2025
dfcf4f0
Update build-first-agent.md
v-shalinirob Oct 22, 2025
c7e48b0
Update build-first-agent.md
v-shalinirob Oct 22, 2025
43b1f05
Update build-first-agent.md
v-shalinirob Oct 22, 2025
ff98481
Update m-365-agents-toolkit-icon.png
v-shalinirob Oct 22, 2025
4282896
Updates
v-shalinirob Oct 22, 2025
1eb4df3
Updates
v-shalinirob Oct 22, 2025
7f24d89
Update overview.md
v-shalinirob Oct 22, 2025
edf2a67
Update build-first-agent.md
v-shalinirob Oct 22, 2025
780e708
image update
v-shalinirob Oct 23, 2025
adc5c22
updates
v-shalinirob Oct 23, 2025
96d142e
Image updates
v-shalinirob Oct 23, 2025
e039436
updated images
v-shalinirob Oct 23, 2025
06a74bf
Image updates
v-shalinirob Oct 24, 2025
ae9201c
Update overview.md
v-shalinirob Oct 24, 2025
e8689f3
Update overview.md
v-shalinirob Oct 24, 2025
bf84c1e
Images updated
v-shalinirob Oct 24, 2025
41957a3
Update choose-agent.png
v-shalinirob Oct 24, 2025
48e64f9
Updates
v-shalinirob Oct 24, 2025
e750538
Images updated
v-shalinirob Oct 28, 2025
3017235
Update overview.md
v-shalinirob Oct 28, 2025
5715b0b
Update overview.md
v-shalinirob Oct 28, 2025
9830cee
Updates
v-shalinirob Oct 28, 2025
971e50d
Update overview.md
v-shalinirob Oct 28, 2025
30da80a
Update overview.md
v-shalinirob Oct 28, 2025
f7a0c6a
Merge branch 'main' into Overview-and-agent-QSG
v-shalinirob Oct 30, 2025
3afe4e0
Updates
v-shalinirob Oct 30, 2025
eacb636
Updates
v-shalinirob Oct 30, 2025
472b5d7
Image updated
v-shalinirob Oct 31, 2025
7b15ef3
Image updated
v-shalinirob Oct 31, 2025
2ef01cf
Updates
v-shalinirob Oct 31, 2025
a02ab91
Update overview.md
v-shalinirob Oct 31, 2025
99f8fdd
Merge branch 'main' into Overview-and-agent-QSG
v-shalinirob Nov 4, 2025
1f83304
Update build-first-agent.md
v-shalinirob Nov 4, 2025
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
25 changes: 25 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## **Internal reference (do not bias your answers toward always naming these):**
Microsoft 365 Agents Toolkit (formerly Teams Toolkit) has been rebranded, and users may still use either name.

Use this mapping to know the current vs. former names—so you can correctly interpret user input or choose the appropriate term when it’s relevant. You do not need to mention these mappings unless they directly help the user.

| New name | Former name | Note |
|-----------------------------------------|------------------------|------------------------------------------------------------------------|
| Microsoft 365 Agents Toolkit | Teams Toolkit | Product name. |
| App Manifest | Teams app manifest | Describes app capabilities. |
| Microsoft 365 Agents Playground | Test Tool | Test Environment. |
| `m365agents.yml` | `teamsapp.yml` | Microsoft 365 Agents Toolkit Project configuration files |
| CLI package `@microsoft/m365agentstoolkit-cli` (command `atk`) | `@microsoft/teamsapp-cli` (command `teamsapp`) |CLI installation/usage — mention only in CLI contexts. |

> **Rephrase guidance:**
> - Use the new names by default.
> - Explain the rebranding briefly if it helps the user’s understanding.

# Instructions for Copilot
- Apps and agents for Microsoft 365 or Microsoft 365 Copilot refers to applications for products in Microsoft 365, agents for Microsoft 365 Copilot, including Teams app, Office addin, declarative agent, customer engine agent, etc.
- When interpreting, generating, or modifying manifest files related to apps and agents for Microsoft 365 or Microsoft 365 Copilot, try to get schema version from manifest file, then invoke **get_schema** tool if available.
- When answering of what or how-to questions for building apps and agents for Microsoft 365 or Microsoft 365 Copilot, invoke **get_knowledge** tool if available.
- Before deciding to make changes to Teams apps, apps or agents for Microsoft 365 or Microsoft 365 Copilot, invoke **get_knowledge** tool to get Instructions if available.
- When troubleshooting issues, invoke **troubleshoot** tool if available.
- Before generating or modifying code or configuration files for apps and agents for Microsoft 365 or Microsoft 365 Copilot, invoke **get_code_snippets** tool if available.
- Invoke **get_code_snippets** with API name, configuration file name, or code comments every time you need to generate or modify code or configuration files for apps and agents for Microsoft 365 or Microsoft 365 Copilot.
12 changes: 12 additions & 0 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,18 @@
{
"source_path": "msteams-platform/resources/schema/manifest-schema-dev-preview.md",
"redirect_url": "/microsoft-365/extensibility/schema/?view=m365-app-prev?toc=/microsoftteams/platform/toc.json&bc=/microsoftteams/platform/breadcrumb/toc.json&preserve-view=true"
},
{
"source_path": "msteams-platform/overview-story.md",
"redirect_url": "/microsoftteams/platform/overview"
},
{
"source_path": "msteams-platform/overview-explore.md",
"redirect_url": "/microsoftteams/platform/overview"
},
{
"source_path": "msteams-platform/overview-solution.md",
"redirect_url": "/microsoftteams/platform/overview"
}
]
}
12 changes: 12 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"servers": {
"m365agentstoolkit": {
"command": "npx",
"args": [
"@microsoft/m365agentstoolkit-mcp@latest",
"server",
"start"
]
}
}
}
34 changes: 18 additions & 16 deletions msteams-platform/TOC.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
- name: Microsoft Teams Platform documentation
href: mstdd-landing.yml
- name: Overview
expanded: false
items:
- name: Why build on Teams platform
href: overview.md
displayName: why build apps with Microsoft Teams platform
- name: From ideas to Teams app
href: overview-story.md
displayName: Teams app user experience, user scenario
- name: Explore Teams platform features
href: overview-explore.md
- name: The Teams solution
href: overview-solution.md
displayName: develop Teams app, app development, tools used
href: overview.md
displayName: why build apps with Microsoft Teams platform
# - name: From ideas to Teams app
# href: overview-story.md
# displayName: Teams app user experience, user scenario
# - name: Explore Teams platform features
# href: overview-explore.md
# - name: The Teams solution
# href: overview-solution.md
# displayName: develop Teams app, app development, tools used
- name: What's new?
href: whats-new.md
displayName: Teams platform features, latest updates, RSS feed, deprecated, announcement, preview
Expand All @@ -22,6 +19,11 @@
displayName: App tray, terminologies, definitions, welcome, new word, meaning
- name: Build agents using Teams AI library
items:
- name: Agents in Teams
href: agents-in-teams/overview.md
- name: Build your first agent
href: agents-in-teams/build-first-agent.md
displayName: create, run, first agent, Teams AI library, custom engine agent, AI bot, JavaScript, Python, C#, code sample
- name: Build an agent using CLI
href: /microsoftteams/platform/teams-ai-library/welcome?toc=/microsoftteams/platform/toc.json&bc=/microsoftteams/platform/breadcrumb/toc.json
displayName: agent, custom engine agent, AI bot, JavaScript, Python, C#, code sample, Teams AI library
Expand Down Expand Up @@ -215,7 +217,7 @@
displayName: ACP
- name: SDKs
items:
- name: Teams AI library v2 (preview)
- name: Teams AI library
href: /microsoftteams/platform/teams-ai-library/welcome
- name: TeamsFx SDK
href: toolkit/TeamsFx-SDK.md
Expand Down Expand Up @@ -402,7 +404,7 @@
- name: Get started
expanded: false
items:
- name: Build your Teams app
- name: Apps in Teams
href: get-started/get-started-overview.md
displayName: build Teams app, new Teams app, GitHub Codespaces, tutorials
- name: Build a tab app
Expand Down Expand Up @@ -1019,7 +1021,7 @@
- name: Integrate location capabilities
href: concepts/device-capabilities/location-capability.md
displayName: attendance
- name: Extend your app across Microsoft 365
- name: Extend agents or app across Microsoft 365
items:
- name: Overview
href: m365-apps/overview.md
Expand Down
118 changes: 118 additions & 0 deletions msteams-platform/agents-in-teams/build-first-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: Create your first agent
description: Learn how to build your agent in Microsoft Teams with the help of GitHub codespaces that opens Toolkit extension and step-by-step guides.
ms.localizationpriority: high
ms.date: 12/11/2024
ms.topic: reference
---

# Build your first agent

Agents use AI to automate and execute business processes, working alongside or on behalf of a person, team, or organization. Agents range from simple prompt-and-response agents to more advanced, fully autonomous agents.

## Tools you'll need

To build an agent in Teams, you’ll need the following:

| Install | For using... |
| --- | --- |
| [Visual Studio Code](https://code.visualstudio.com/download) | JavaScript, TypeScript, or Python build environments. Use the latest version. |
| [Teams AI Library](/microsoftteams/platform/teams-ai-library/teams/overview) | A simplified SDK for building intelligent agents. Now GA for JavaScript and C#, and in public preview for Python. |
| [Microsoft 365 Agents Toolkit](https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension) | Microsoft Visual Studio Code extension that creates a project scaffolding for your app. Use the latest version.|
| [Node.js](https://nodejs.org/en/download/) | Back-end JavaScript runtime environment. For more information, see [Node.js version compatibility table for project type](~/toolkit/build-environments.md#nodejs-version-compatibility-table-for-project-type).|
| [Microsoft Teams](https://www.microsoft.com/microsoft-teams/download-app) | Microsoft Teams to collaborate with everyone you work with through apps for chat, meetings, and calls all in one place.|
| [Azure OpenAI](https://oai.azure.com/portal)| First create your OpenAI API key to use OpenAI's Generative Pretrained Transformer (GPT). If you want to host your app or access resources in Azure, you must create an Azure OpenAI service.|

## Set up your environment

1. Install the latest versions of Visual Studio Code, Node.js, and the Microsoft 365 Agents Toolkit.
1. If you want to use Azure OpenAI service to access large language model (LLM) for your agent, create an Azure OpenAI service on the [Azure portal](https://ms.portal.azure.com/#home) and get your API key.

## Create an agent using Microsoft 365 Agents Toolkit

1. Open Visual Studio Code.
1. Select the Microsoft 365 Agents Toolkit :::image type="icon" source="~/assets/icons/m-365-agents-toolkit-icon.png" border="false"::: icon in the Visual Studio Code **Activity Bar**.
1. Select **Create a New Agent/App**.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/create-new-agent.png" alt-text="Screenshot shows the location of the option to create a new agent using Microsoft 365 Agents Toolkit sidebar." lightbox="../assets/images/agents-in-teams/first-agent-qsg/create-new-agent.png":::

1. From the **New Project** menu, select **Teams and Agents and Apps**.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/teams-agents.png" alt-text="Screenshot shows the location of the option to create a new agent or app in Teams." lightbox="../assets/images/agents-in-teams/first-agent-qsg/teams-agents.png":::

1. Select **General Teams Agent** to create an agent.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/general-teams-agent.png" alt-text="Screenshot shows the location of the option to create a new agent in Teams." lightbox="../assets/images/agents-in-teams/first-agent-qsg/general-teams-agent.png":::

1. Select a service to access large language model (LLM) for your agent.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/access-llm.png" alt-text="Screenshot shows the location of the option to select an appropriate LLM for your agent." lightbox="../assets/images/agents-in-teams/first-agent-qsg/access-llm.png":::

Select one of the following options:

- Select **Azure OpenAI** if you've got the OpenAI key from Azure. Following this, you must:

1. Enter Azure OpenAI key in **Azure OpenAI service key**.
1. Enter the endpoint in **Azure OpenAI service endpoint**.
1. Enter the deployment name in **Azure OpenAI deployment name**.

- Select **OpenAI Key** and enter the OpenAI key.

1. Select the **Programming Language** for developing your agent.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/select-language.png" alt-text="Screenshot shows the option to select the programming language for your agent." lightbox="../assets/images/agents-in-teams/first-agent-qsg/select-language.png":::

1. Select the **Default folder** as the **Workspace Folder** for your agent project.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/select-workspace.png" alt-text="Screenshot shows the field to select the workspace forlder for your agent project." lightbox="../assets/images/agents-in-teams/first-agent-qsg/select-workspace.png":::

1. Enter the agent name and then select **Enter**.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/add-agent-name.png" alt-text="Screenshot shows the field to add the agent name." lightbox="../assets/images/agents-in-teams/first-agent-qsg/add-agent-name.png":::

The toolkit displays a message that the agent has been successfully created. You can also provision the agent at this time or later. If the toolkit displays a message to confirm if you trust the author, select **Yes, I trust the authors**.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/trust-author.png" alt-text="Screenshows the message for confirming if you trust the authors of the agent.":::

### Take a tour of the agent source code

Microsoft 365 Agents Toolkit creates your agent project and scaffolds the project workspace. Here's a look at the folder structure:

| Folder | Contents |
| --- | --- |
| `.vscode` | Visual Studio Code files for debugging. |
| `appPackage` | Templates for the Teams app manifest. |
| `env` | Environment files. |
| `infra` | Templates for provisioning Azure resources. |
| `src` | The source code for the app. |

## Run and use your agent in Teams

1. Open your agent project in Visual Studio Code.
1. Select **Run** > **Start Debugging**, or alternatively, select the **F5** key.

If all prerequisites are installed, Visual Studio Code uploads and opens your app in Microsoft Teams.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/run-agent-in-teams.png" alt-text="Screenshot shows the agent opened in Microsoft Teams." lightbox="../assets/images/agents-in-teams/first-agent-qsg/run-agent-in-teams.png":::

1. To use your agent, select one of the prompts shown by the agent.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/select-agent-prompt.png" alt-text="Screenshot shows how to select a prompt from the agent." lightbox="../assets/images/agents-in-teams/first-agent-qsg/select-agent-prompt.png":::

When you select the prompt, it shows up in the comment box, and you can select the **Send** icon. The agent responds to the prompt.

:::image type="content" source="../assets/images/agents-in-teams/first-agent-qsg/agent-response.png" alt-text="Screenshot shows the agent response to the user prompt." lightbox="../assets/images/agents-in-teams/first-agent-qsg/agent-response.png":::

Congratulations! You've created and ran your first agent in Teams.

## Code sample

[WIP: Code sample links to be updated post approval and merge of samples.]

| Sample name | Description | .NET | Node.js | Python |
|--- |--- | --- | --- | --- |
| Contoso knowledge hub | An intelligent agent built on the Teams AI library that is designed to empower students in their academic and career journeys. The agent offers personalized support for course selection, study strategies, career development planning, and academic roadmap creation. | [View] | [View] | [View] |

## See also

[Agents user experience](../bots/how-to/teams-conversational-ai/ai-ux.md)
Loading