Skip to content

adding notifications to python agent#190

Merged
abdulanu0 merged 5 commits intomainfrom
users/anabdul/addnotif
Feb 7, 2026
Merged

adding notifications to python agent#190
abdulanu0 merged 5 commits intomainfrom
users/anabdul/addnotif

Conversation

@abdulanu0
Copy link
Contributor

No description provided.

@abdulanu0 abdulanu0 requested a review from a team as a code owner January 27, 2026 19:15
Copilot AI review requested due to automatic review settings January 27, 2026 19:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds notification handling capabilities to the Python OpenAI sample agent, enabling it to respond to email notifications and Word document comments from Microsoft 365 applications. The implementation follows similar patterns established in other Agent 365 samples.

Changes:

  • Added notification handler registration in the generic agent host to process incoming notifications
  • Implemented notification processing logic in the agent to handle email notifications (EMAIL_NOTIFICATION) and Word document comments (WPX_COMMENT)
  • Integrated observability configuration into the host startup sequence

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
python/openai/sample-agent/host_agent_server.py Added notification imports, initialized AgentNotification, registered notification handler with authentication and observability support, and added observability configuration to startup
python/openai/sample-agent/agent.py Implemented handle_agent_notification_activity method to process different notification types, added NotificationTypes import, and created helper method to extract results from agent responses

@mrunalhirve128
Copy link
Contributor

@abdulanu0 would you attach ss of of the testing done

@github-actions
Copy link

github-actions bot commented Feb 5, 2026

✅ All E2E Tests Passed

Sample Status Result
Python OpenAI success
Node.js OpenAI success
Node.js LangChain success
.NET Semantic Kernel success
.NET Agent Framework success

📦 SDK Versions: View the workflow summary for detailed SDK version information.

View full test details

mrunalhirve128
mrunalhirve128 previously approved these changes Feb 6, 2026
- Add SafeAgentNotification class to filter invalid invoke activities
- Add invoke activity handler with proper InvokeResponse handling
- Handle email notifications with EmailResponse entity
- Add connection error handling for Playground limitations
- Set text field on email response for channels that require it
@abdulanu0 abdulanu0 enabled auto-merge (squash) February 7, 2026 00:06
@abdulanu0 abdulanu0 merged commit 6ec5162 into main Feb 7, 2026
40 checks passed
@abdulanu0 abdulanu0 deleted the users/anabdul/addnotif branch February 7, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants