m365-agents-py
Microsoft 365 Agents SDK for Python. Build multichannel agents for Teams/M365/Copilot Studio with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based auth. Triggers: "Microsoft 365 Agents SDK", "microsoft_agents", "AgentApplication", "start_agent_process", "TurnContext", "Copilot Studio client", "CloudAdapter".
Target: Cloud, operations & security. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original English text
Topics in the source
- Microsoft 365 Agents SDK (Python)
- Before implementation
- Important Notice - Import Changes
- Installation
- Environment Variables (.env)
- Authentication & Lifecycle
- Core Workflow: aiohttp-hosted AgentApplication
- AgentApplication Routing
Build enterprise agents for Microsoft 365, Teams, and Copilot Studio using the Microsoft Agents SDK with aiohttp hosting, AgentApplication routing, streaming responses, and MSAL-based authentication. Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, startagentprocess, and authentication options. Confirm package versions on PyPI for the microsoft-agents-\ packages you plan to use. ⚠️ Breaking Change: Recent updates have changed the Python import structure from microsoft.agents to microsoftagents (using underscores instead of dots). 🔑 Two rules apply to every code sample below: 1. This SDK is async-first — use async def handlers and async with throughout. 2. Use explicit auth managers and context-managed network resources. Use MsalConnectionManager for agent auth, and wrap per-request HTTP resources in async with (for example, aiohttp.ClientSession). Snippets may abbreviate this setup, but production code should always follow both rules. 1. This SDK is async-first — use async def handlers and async with throughout. 2. Always use context managers for clients and async credentials. Wrap every client in with Client(...) as client: (sync) or async with
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- microsoft/skills
- Source file
- .github/plugins/azure-sdk-python/skills/m365-agents-py/SKILL.md
- Fixed revision
- 9287b443662d2433c85621c7325ee72a0ce499b5
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: Microsoft Skills · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-10T19:02:06.469Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.