C✳CODEZ.WIN
🌐 English

Localized reading guide

m365-agents-pyPurpose, usage and source

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".

Source retrieved:

Source repository
microsoft/skills
SKILL.md
.github/plugins/azure-sdk-python/skills/m365-agents-py/SKILL.md
Repository stars
3,157
Repository updated
2026-10-31
Categories
Cloud
Last collected

License: MIT

Workflow excerpts are reading aids, not executable instructions from Codez. No third-party Skill was run to produce this page.

The purpose and workflow passages below are upstream material, organized and translated for reading. They are distinct from the separately labeled Codez editorial analysis.

What this Skill does

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".

How the upstream workflow works

Microsoft 365 Agents SDK (Python)

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.

Upstream passage · L12 ↗

Before implementation

Use the microsoft-docs MCP to verify the latest API signatures for AgentApplication, start_agent_process, and authentication options. Confirm package versions on PyPI for the microsoft-agents-\* packages you plan to use.

Upstream passage · L16 ↗

Authentication & Lifecycle

> 🔑 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.

Upstream passage · L57 ↗

Requirements and setup

Upstream passage · bash ↗
pip install microsoft-agents-hosting-core
pip install microsoft-agents-hosting-aiohttp
pip install microsoft-agents-activity
pip install microsoft-agents-authentication-msal
pip install microsoft-agents-copilotstudio-client
pip install python-dotenv aiohttp

Limits and quality checks

Important Notice - Import Changes

> ⚠️ Breaking Change: Recent updates have changed the Python import structure from microsoft.agents to microsoft_agents (using underscores instead of dots).

Upstream passage · L21 ↗

Start with a safe trial

  1. Check the supported host and the repository installation instructions. Keep the Skill directory and its referenced scripts, assets and documentation together; SKILL.md alone may omit dependencies.
  2. Give the agent your real input, desired output and acceptance criteria. Invocation syntax and available tools depend on the host; this site does not assume a universal install command.
  3. Try the source workflow in a disposable project or on a copy. Review operations that change files, remote services or billable resources before allowing them.
  4. Validate the output against the source quality checks and your own requirements. A successful trigger or a high repository Star count does not establish a correct result.

Skill format and directory specification ↗

Read further in the source

Translation and scope

This reading guide selects passages from the pinned upstream SKILL.md. Translation is assisted. It is not a complete manual or a claim of tested compatibility. Read the original and its referenced files before use.

This introduction refers to the pinned version below; current repository activity and collection time are shown separately.

Source retrieved
Source commit
00d66a64919edca5bca2c673373444e36a4b5461
Source SHA-256
cd3b4a536bab82b795960a3ba728bf74345729a6cb278a50913639d5d77609a0
Back to the full Skill catalog