Setting up the development environment

Completed

Before coding the agent, make sure your environment is prepared with the necessary tools and credentials. Visual Studio Code with the Microsoft 365 Agents Toolkit extension is the recommended setup for pro-code development.

Install Visual Studio Code and M365 Agents Toolkit: In Visual Studio Code, install the Microsoft 365 Agents Toolkit extension (formerly known as Teams Toolkit). This provides project templates and integrated commands to scaffold, debug, and deploy your agent. Ensure you have the latest version.

Runtime & Language: Set up the appropriate runtime for your chosen language. For JavaScript/TypeScript, install the latest LTS Node.js (v16+), since the bot runs on Node.js at runtime. For C#, install .NET 6 or .NET 7 SDK (the Agents SDK for .NET runs on .NET 6+). Python support for the Agents SDK is in preview, but if using it, ensure you have a Python 3.10+ environment.

Microsoft Teams (Testing): Have Microsoft Teams available (desktop app or web). You’ll be testing the bot in Teams, so being logged into a tenant where you can upload custom apps is important. If your work account doesn’t allow custom app upload, set up a free Microsoft 365 Developer tenant (E5 developer subscription) which gives you Teams with sideloading permissions.

Azure Subscription & OpenAI: Set up access to an Azure OpenAI Service or obtain OpenAI API keys, because our agent uses an LLM. In Azure, create an OpenAI resource and deploy a model (for example GPT-3.5 Turbo or GPT-4) – note the deployment name, endpoint URL, and API key. Alternatively, get an OpenAI API key from OpenAI directly. This will be used by the bot to call the language model. Tip: If using Azure OpenAI, you might also want an Azure Cognitive Search resource or other data source for RAG, but it’s optional at start.

Entra ID (Azure AD) Account: You need a Microsoft Entra ID (Azure AD) account in the tenant where the bot will be registered. Typically, logging in with your 365 developer tenant admin account in VS Code’s toolkit is sufficient. The Toolkit will use it to create the Azure AD app registration and Teams app manifest for your bot. Make sure this account has permissions to register applications or is a Teams admin to upload the app.

Optionally, CLI Tools: The Agents Toolkit also provides a CLI (m365agents-cli) which can automate provisioning and deployment via scripts. This is not required in VS Code, but you can install it via npm install -g @microsoft/m365agents-cli if you plan to use CI/CD or do things outside VS Code. Once the above are in place, launch VS Code and verify you see the “Microsoft 365 Agents Toolkit” icon. Sign in to your 365 account through the Toolkit when prompted. You’re now ready to create a project. The exercises in this Learning Path will walk through that process.