Python: Added M365 Agent SDK Hosting sample#2292
Merged
dmytrostruk merged 9 commits intomicrosoft:mainfrom Nov 19, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new Python demo sample showing how to host an Agent Framework agent using the Microsoft 365 Agents SDK. The sample demonstrates a weather forecasting agent with both anonymous and authenticated modes, exposed via aiohttp endpoints compatible with M365 Agents SDK.
Key Changes
- New m365-agent demo sample implementing M365 Agents SDK integration with Agent Framework
- Weather agent with mock weather forecasting capability using function tools
- Support for both anonymous mode (for local testing) and authenticated mode (for Azure Bot integration)
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Defines dependencies and project configuration for the m365-agent demo, including M365 Agents SDK packages and Agent Framework core |
m365_agent_demo/app.py |
Main application implementing the weather agent with M365 SDK hosting, including configuration loading, agent setup, and aiohttp server setup |
m365_agent_demo/__init__.py |
Module initialization exposing the create_app function |
README.md |
Comprehensive documentation covering prerequisites, configuration, installation, and multiple deployment scenarios (playground, WebChat) |
.env.example |
Template for environment variables covering OpenAI configuration and M365 authentication settings |
Comments suppressed due to low confidence (1)
python/samples/demos/m365-agent/m365_agent_demo/app.py:6
- Import of 'Optional' is not used.
from typing import Annotated, Optional
moonbox3
approved these changes
Nov 19, 2025
eavanvalkenburg
approved these changes
Nov 19, 2025
eavanvalkenburg
approved these changes
Nov 19, 2025
arisng
pushed a commit
to arisng/agent-framework
that referenced
this pull request
Feb 2, 2026
* Added M365 Agent SDK Hosting sample * Addressed PR feedback * Added inline dependencies * Addressed PR feedback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Resolves: #2287
Added sample to show how to host an Agent Framework Agent via the M365 Agent SDK.
Contribution Checklist