Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the examples/ai-agentframework sample by removing Microsoft Graph–backed local tools and replacing them with a single onboarding-focused local tool that attaches a welcome Adaptive Card to the reply.
Changes:
- Removed Graph tooling (
msgraph-sdkdependency + Graph tool implementations) and associated app binding. - Added a
send_welcome_cardlocal tool that queues Adaptive Card attachments via a per-turnContextVar. - Updated the agent instructions and README to reflect the new onboarding/welcome-card experience.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Removes msgraph-sdk from the locked dependency set. |
| examples/ai-agentframework/src/main.py | Introduces per-turn card collection and attaches queued cards to the final streamed reply. |
| examples/ai-agentframework/src/local_tools.py | Replaces Graph tools with send_welcome_card and a ContextVar-backed card queue. |
| examples/ai-agentframework/src/agent.py | Updates system instructions to greet new users with a welcome card. |
| examples/ai-agentframework/pyproject.toml | Drops msgraph-sdk dependency for the example. |
| examples/ai-agentframework/README.md | Updates documentation to remove Graph setup and describe the welcome-card tool. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/teams.py/sessions/e037456f-8ee3-4748-aaa6-c08d26d49069 Co-authored-by: MehakBindra <83925928+MehakBindra@users.noreply.github.com>
heyitsaamir
approved these changes
Apr 22, 2026
lilyydu
approved these changes
Apr 22, 2026
Collaborator
lilyydu
left a comment
There was a problem hiding this comment.
lgtm after addressing Aamir's comment above!
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.
Looking back, this sample is severely overloaded compared to the other examples. Simplifying the local tools to have one simple welcome adaptive card. I think we should include graph and oauth capabilities with more thought at a later time in a more complex sample.
Key changes include:
Local tool simplification and onboarding improvements
find_people,get_org_context,list_team_members,get_presence) with a single local tool,send_welcome_card, which attaches a capabilities overview Adaptive Card to greet users. The new tool uses aContextVarto safely manage per-turn card attachments. (src/local_tools.py)src/agent.py)Documentation and environment updates
README.mdto reflect the removal of Microsoft Graph tools, focusing on the new welcome card tool and simplifying instructions for environment variables and prerequisites. Microsoft Graph permissions and related setup steps have been removed. (README.md)msgraph-sdkdependency frompyproject.tomlsince Graph-backed tools are no longer used. (pyproject.toml)Codebase cleanup and integration