Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

m365-agents-py

Skill by lingxling

Guides developers building Python agents for Microsoft 365, Teams and Copilot Studio with the Microsoft Agents SDK. Covers aiohttp hosting, AgentApplication routing, streaming responses and MSAL-based authentication.

  • Score 72
  • 343 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install m365-agents-py

Built from the published package, never by AI.

git clone --depth 1 https://github.com/lingxling/awesome-skills-cn /tmp/awesome-skills-cn && mkdir -p ~/.claude/skills && cp -r /tmp/awesome-skills-cn/antigravity-awesome-skills/skills/m365-agents-py ~/.claude/skills/m365-agents-py

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install m365-agents-py in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The m365-agents-py skill gives guidance for building Microsoft 365 agents in Python with the Microsoft Agents SDK. It targets agents for Teams, Microsoft 365 and Copilot Studio. The source shows aiohttp hosting with a /api/messages route, AgentApplication routing for messages, conversation updates and invoke activities, and streaming responses from Azure OpenAI. It also covers MSAL-based authentication and OAuth sign-in for Microsoft Graph.

The skill lists pip packages, a .env configuration layout and code samples for each part. It includes a Copilot Studio client sample that connects directly to the agent engine. The source notes that the import prefix changed from microsoft.agents to microsoft_agents. It is aimed at developers building enterprise agents on Microsoft 365.

Written from the project's SKILL.md and checked against it.

What it can do

  • aiohttp hostingHosts the agent on an aiohttp server with a /api/messages route and JWT authorization middleware.
  • AgentApplication routingRoutes incoming activities to handlers for messages, regex patterns, invokes and conversation updates.
  • Streaming responsesStreams Azure OpenAI output into agent replies, with feedback and AI-generated labels.
  • MSAL authenticationConfigures MSAL-based connection management from environment variables.
  • OAuth sign-inProtects message routes with auth handlers and gets or signs out Microsoft Graph tokens.
  • Copilot Studio clientShows how to start a conversation and ask questions directly to a Copilot Studio agent.

What you need

  • Python with pip
  • Client ID, client secret and tenant ID for the agent connection
  • Azure OpenAI endpoint, API version and key for streaming (optional)
  • Copilot Studio environment ID, schema name, tenant ID and app ID for the client (optional)

Try asking

  • Set up an aiohttp agent that echoes messages back to the user in Teams.
  • Add a /me route that calls Microsoft Graph after OAuth sign-in.
  • Write a streaming handler that returns a poem from Azure OpenAI.

Good to know

  • The source marks the import path change to microsoft_agents as a breaking change.
  • The source says MemoryStorage is for development only and recommends BlobStorage or CosmosDB in production.
  • The source asks users to verify current API signatures and package versions before implementation.
  • The skill's metadata lists its risk level as critical.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: antigravity-awesome-skills/skills/m365-agents-py/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to m365-agents-py

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

m365-agents-py: common questions

Which Python import path should I use?

The source says to use the microsoft_agents prefix with underscores, not microsoft.agents, because recent updates changed the structure.

Which storage should I use in production?

The source says MemoryStorage is only for development. It recommends BlobStorage or CosmosDB for production.

Does this skill cover Copilot Studio?

Yes. The source includes a Copilot Studio client sample that connects directly to the engine, along with environment variables for its settings.

How do I install m365-agents-py?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is m365-agents-py free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is m365-agents-py safe to use?

It scores 72 of 100. Grades: maintenance B, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to m365-agents-py?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

m365-agents-py Install

Add to stack

Loading.