Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new proactive messaging subsystem to microsoft-agents-hosting-core, enabling conversation reference persistence and out-of-band/proactive turns (continue existing conversations, send one-off activities, and create new conversations), and includes a runnable sample demonstrating the flows.
Changes:
- Introduces
core.app.proactivepackage (Proactive,Conversation, builders, options) and wires it intoAgentApplicationviaApplicationOptions.proactive. - Exposes proactive types via package
__init__.pyexports for public consumption. - Adds a
test_samples/proactivesample app + docs + environment template.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| test_samples/proactive/requirements.txt | Sample dependencies for running the proactive agent. |
| test_samples/proactive/README.md | End-to-end instructions and usage patterns for proactive flows. |
| test_samples/proactive/proactive_agent.py | Runnable aiohttp sample demonstrating store/continue/notify and OAuth-guarded continuations. |
| test_samples/proactive/env.TEMPLATE | Environment template for the proactive sample (AAD + OAuth connection). |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/proactive.py | Core proactive manager: persist conversations, continue/send proactively, create new conversations. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/proactive_options.py | Configuration options for proactive subsystem. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/create_conversation_options.py | Options model + validation for proactive conversation creation. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/conversation.py | Persisted conversation reference + filtered claims serialization/validation. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/conversation_reference_builder.py | Fluent builder for ConversationReference. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/conversation_builder.py | Fluent builder for Conversation objects. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/proactive/init.py | Public exports for proactive package. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/app_options.py | Adds ApplicationOptions.proactive configuration hook. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.py | Initializes and exposes AgentApplication.proactive. |
| libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/init.py | Re-exports proactive types from the main app package. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…into users/axsuarez/proactive-improvements
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…into users/axsuarez/proactive-improvements
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 21 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…into users/axsuarez/proactive-improvements
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 21 changed files in this pull request and generated 10 comments.
💡 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 19 out of 21 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request introduces a new "proactive messaging" subsystem to the Microsoft Agents Hosting Core library, allowing the application to store conversation references and initiate proactive (out-of-band) conversations. The changes add new types and configuration options, integrate the subsystem into the
AgentApplication, and expose a new API for managing proactive messaging.The most important changes are:
Proactive Messaging Subsystem Integration:
proactivepackage with types likeProactive,ProactiveOptions,Conversation,ConversationBuilder, and related helpers, enabling the storage and creation of conversation references for proactive messaging. ([[1]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-ab0b620edce9ae748d8a4beaa059710084153346388f3baeb0c87fd77b61868eR1-R20),[[2]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-3b51491b418dffd0f7cd4a6ceef3da178085d86dc0b3aaa36101837b35f41ba0R1-R142),[[3]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-b0081ee5fb63a260f726e092191d0efd4d6d750683fcac49c23a00b64a9cc196R1-R235))AgentApplicationclass to optionally initialize and expose aproactivemessaging manager whenProactiveOptionsare provided in the application options, including error handling if accessed when not configured. ([[1]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-a0c0028a01efc798e89b84f1bca0d4323b71753bd6f43d02800f29e66bc766a6R71),[[2]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-a0c0028a01efc798e89b84f1bca0d4323b71753bd6f43d02800f29e66bc766a6R150-R155),[[3]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-a0c0028a01efc798e89b84f1bca0d4323b71753bd6f43d02800f29e66bc766a6R225-R244))Configuration and Public API:
ApplicationOptionsto include an optionalproactivefield for configuring proactive messaging. ([libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/app_options.pyR93-R99](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-52c9390d176de19f2e6ecb00591186c7c3b271d30ff66eb41f3b72093a181e89R93-R99))__init__.pyfiles and the__all__lists, making them available for import from the main app package. ([[1]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-65135729f0818c154cc80932e3046c5c437aa0d3c029abfdcba4b2f27ab4c122R24-R33),[[2]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-65135729f0818c154cc80932e3046c5c437aa0d3c029abfdcba4b2f27ab4c122R60-R66),[[3]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-ab0b620edce9ae748d8a4beaa059710084153346388f3baeb0c87fd77b61868eR1-R20),[[4]](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-52c9390d176de19f2e6ecb00591186c7c3b271d30ff66eb41f3b72093a181e89R20))Internal Usage:
[libraries/microsoft-agents-hosting-core/microsoft_agents/hosting/core/app/agent_application.pyR46](https://github.com/microsoft/Agents-for-python/pull/350/files#diff-a0c0028a01efc798e89b84f1bca0d4323b71753bd6f43d02800f29e66bc766a6R46))These changes lay the foundation for enabling bots to initiate conversations with users outside the context of an immediate incoming message, a common requirement for enterprise bots and notification scenarios.