Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new proactive messaging sample for Microsoft Teams, demonstrating how to programmatically start conversations and send proactive messages. It also updates the empty agent sample with proper configuration setup and adds comprehensive documentation for the proactive messaging functionality.
- Adds a new
proactive_messaging_agent.pysample with endpoints for creating Teams conversations and sending proactive messages - Updates
emtpy_agent.pywith proper SDK configuration, connection manager, and authorization setup - Extends
env.TEMPLATEwith proactive messaging configuration variables - Adds detailed documentation in
README.mdexplaining setup, prerequisites, and usage examples
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| test_samples/app_style/proactive_messaging_agent.py | New file implementing proactive messaging sample with HTTP endpoints for creating conversations and sending messages to Teams |
| test_samples/app_style/emtpy_agent.py | Updated to use proper SDK configuration with connection manager, authorization, and configuration loading from environment |
| test_samples/app_style/env.TEMPLATE | Added proactive messaging configuration variables for bot id, agent id, tenant id, and service URL |
| test_samples/app_style/README.md | New documentation explaining the proactive messaging sample, prerequisites, setup steps, and usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
test_samples/app_style/echo_proactive_agent.py:208
- The global variable 'SERVICE_INSTANCE' is not used.
SERVICE_INSTANCE = echo_service
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Proactive sample WIP * Proactive echo in teams WIP * Small fixes for proactive with experimental sample
* Update parameter type hints and documentation across multiple files for clarity and consistency. (#207) * Update parameter type hints and documentation across multiple files for clarity and consistency. Fixes all 43 errors identified in issue #204 * Update libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/channel_service_adapter.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Chris Mullins <chmullins@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Proactive sample WIP (#213) * Proactive sample WIP * Proactive echo in teams WIP * Small fixes for proactive with experimental sample --------- Co-authored-by: Chris Mullins <cleemullins@users.noreply.github.com> Co-authored-by: Chris Mullins <chmullins@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a new end-to-end sample for proactive messaging in Microsoft Teams using the Microsoft 365 Agents Python SDK. It adds a new agent implementation, configuration template, documentation, and supporting code to demonstrate how to start and continue 1:1 conversations with users in Teams via HTTP endpoints. Additionally, it refactors the existing empty agent sample to use a more robust configuration and authentication pattern.
Proactive messaging sample additions:
proactive_messaging_agent.py, that provides two HTTP endpoints for creating conversations and sending proactive messages in Teams. This includes all supporting logic for configuration, error handling, and message delivery.README.mddescribing the sample, setup steps, environment variables, and usage instructions for local testing.env.TEMPLATEto include all necessary environment variables for proactive messaging, such as bot ID, agent ID, tenant ID, and service URL.Improvements to agent initialization and authentication:
emtpy_agent.pyto load configuration from environment variables, initialize the connection manager, storage, adapter, and authorization, and pass these to the agent application for more robust and flexible setup.emtpy_agent.pyto use the connection manager's default configuration for authentication, ensuring proper token validation and connection handling.