-
Notifications
You must be signed in to change notification settings - Fork 8
Update activity for sample application #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@tirthdoshi009 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this 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 PR updates the activity handlers in the Python Agent Framework sample to fix agents playground connectivity issues. The changes add an installation update handler and enhance logging throughout the message processing flow.
Key changes:
- Added
installationUpdateactivity handler with welcome message - Enhanced logging with emojis for better debugging (processing, validation, response sending)
- Added request body logging at the server entry point
| except Exception as e: | ||
| logger.error(f"Error handling installation update: {e}") | ||
|
|
||
| @self.agent_app.activity("message") |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical: The auth_handlers parameter was removed from the message activity handler. This breaks authentication for the agents playground.
The on_message handler at line 170 should include auth_handlers=handler to ensure proper authentication:
@self.agent_app.activity("message", auth_handlers=handler)Comparing with line 154 (installationUpdate) and the similar implementation in python/openai/sample-agent/host_agent_server.py:114, all activity handlers should include the auth_handlers parameter. The removal of this parameter is likely causing the playground connectivity issue mentioned in the PR description.
| @self.agent_app.activity("message") | |
| @self.agent_app.activity("message", auth_handlers=handler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tirthdoshi009 can you address this?
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…m/microsoft/Agent365-Samples into users/tirthdoshi/local-playground
- Add Application Insights SDK dependencies (opencensus-ext-azure, azure-monitor-opentelemetry) - Implement optional telemetry configuration in agent.py with graceful fallback - Add ENABLE_APPLICATION_INSIGHTS and APPLICATIONINSIGHTS_CONNECTION_STRING to .env.template - Create comprehensive APPLICATION_INSIGHTS.md documentation with setup guide - Update README.md to mention Application Insights as an optional feature - Fix host_agent_server.py to bind to 0.0.0.0 for container compatibility
- Add service connection authentication variables (CLIENT_ID, CLIENT_SECRET, TENANT_ID, SCOPES) - Add agentic user authorization configuration - Add ENABLE_OTEL and ENABLE_SENSITIVE_DATA for observability - Add Application Insights configuration (optional) - Add container app logs viewing step - All env vars now match .env.template requirements
The sample application was not receiving a response when we ran agentsplayground. This change makes sure that when we run the agentsplayground, we can get responses from the agent directly on the window of agentsplayground.
Testing: