Skip to content

Remove sample_agent_toolbox_skill.py per bakcned folks and Linda requ…#48228

Open
howieleung wants to merge 1 commit into
mainfrom
howie/sample-32
Open

Remove sample_agent_toolbox_skill.py per bakcned folks and Linda requ…#48228
howieleung wants to merge 1 commit into
mainfrom
howie/sample-32

Conversation

@howieleung

Copy link
Copy Markdown
Member

…est, add new hosted agent samples for Teams message trigger and reminder preview

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings July 23, 2026 05:43
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds hosted-agent samples for Teams triggers and reminder previews, while removing the obsolete prompt-agent toolbox sample.

Changes:

  • Adds Teams-triggered routine and reminder-preview samples.
  • Adds RBAC setup for hosted-agent identities.
  • Updates toolbox-agent dependencies and behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/samples/test_samples.py Updates hosted-agent sample exclusions.
sample_toolbox_with_skill.py Adds identity RBAC setup.
sample_toolbox_with_reminder_preview.py Adds reminder-preview sample.
sample_routines_with_teams_message_trigger.py Adds Teams-triggered routine sample.
rbac_util.py Adds hosted-agent role assignment utilities.
assets/toolbox-agent/requirements.txt Updates Agent Framework versions.
assets/toolbox-agent/main.py Enables preview tools and skill loading.
sample_agent_toolbox_skill.py Removes obsolete prompt-agent sample.
Comments suppressed due to low confidence (2)

sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py:93

  • The usage text says TEAMS_CONNECTION_NAME defaults to teams-conn, but this direct lookup raises KeyError when it is omitted. Apply the documented default (or change the documentation to mark it required).
teams_connection_name = os.environ["TEAMS_CONNECTION_NAME"]

sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py:98

  • FOUNDRY_HOSTED_AGENT_REMOTE_BUILD is parsed immediately above, but this hard-coded True ignores the result, so setting the variable to false still selects REMOTE_BUILD. Pass the parsed value as the other hosted-agent samples do.
dependency_resolution, code_zip_stream = select_basic_agent_code_zip(True)

"sample_routines_with_schedule_trigger.py", # 500
"sample_routines_with_timer_trigger.py", # Timer is used causing request response not matched
"sample_routines_with_github_issue_trigger.py", # Cannot run without interact on Github
"sample_routines_with_teams_channel_message_trigger.py", # Cannot run without live Teams event

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread sdk/ai/azure-ai-projects/samples/hosted_agents/rbac_util.py
@github-actions

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

A CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green.

What failed

Three azure-ai-projects hosted-agent sample tests fail consistently across all platforms (macOS, Ubuntu, Windows) and all install types (mindependency, whl, sdist):

  • test_hosted_agents_samples[sample_routines_with_teams_message_trigger]
  • test_hosted_agents_samples[sample_toolbox_with_reminder_preview]
  • test_hosted_agents_samples[sample_toolbox_with_skill]

The PR title indicates sample_agent_toolbox_skill.py was removed (per backend/Linda request) and new hosted-agent samples were added. The test runner (test_samples.py) still enumerates and attempts to run all three of these sample names, causing uniform failures across every environment.

Recommended next steps

  • Check sdk/ai/azure-ai-projects/tests/samples/test_samples.py (and any sample discovery logic) to ensure references to sample_toolbox_with_skill, sample_toolbox_with_reminder_preview, and sample_routines_with_teams_message_trigger are consistent with what was added/removed in this PR.
  • If those samples were intentionally removed, remove or update their corresponding test entries so the test suite no longer references them.
  • If the new sample files for those names were not yet added to the PR, add them.
  • See the CI troubleshooting guide: https://aka.ms/ci-fix
  • Push new commits to address the failures; this comment updates automatically on the next failing run.
Raw pipeline analysis (azsdk ci analyze)
Analyzing pipeline https://github.com/Azure/azure-sdk-for-python/pull/48228...
--------------------------------------------------------------------------------
Failed Tests (same 3 test cases across all platforms/install-types)
--------------------------------------------------------------------------------
  - test_hosted_agents_samples[sample_routines_with_teams_message_trigger]
  - test_hosted_agents_samples[sample_toolbox_with_reminder_preview]
  - test_hosted_agents_samples[sample_toolbox_with_skill]

Platforms: macos311, ubuntu2404_310_coverage, Ubuntu2404_313, ubuntu2404_310, Ubuntu2404_314, windows2022_312
Install types: mindependency, whl, sdist

Copilot detected the failing pipeline and generated the analysis above. To have it attempt a fix automatically, reply with @copilot please fix the failing pipeline on this PR.

Generated by Pipeline Analysis - Next Steps · 23.2 AIC · ⌖ 6.17 AIC · ⊞ 6.7K ·

Copilot AI review requested due to automatic review settings July 23, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_teams_message_trigger.py:96

  • FOUNDRY_HOSTED_AGENT_REMOTE_BUILD is parsed on the preceding line, but hard-coding True here means setting it to false has no effect and the bundled path is never selected.
dependency_resolution, code_zip_stream = select_basic_agent_code_zip(True)


Before running the sample:

pip install "azure-ai-projects>=2.2.0" python-dotenv
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_HOSTED_AGENT_NAME", "MyHostedAgent")
model_name = os.environ["FOUNDRY_MODEL_NAME"]
teams_connection_name = os.environ["TEAMS_CONNECTION_NAME"]
print(response_text.encode("utf-8", errors="replace").decode("utf-8"))

print("Routines after scheduling the reminder:")
deadline = time.monotonic() + 30
…est, add new hosted agent samples for Teams message trigger and reminder preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants