Howie/samples 4#47240
Open
howieleung wants to merge 7 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new azure-ai-projects hosted agent samples covering routines and skills/toolboxes, with accompanying sample test configuration and changelog updates.
Changes:
- Adds samples for routine CRUD and timer-triggered routine runs.
- Adds a sample for invoking a skill packaged inside a toolbox through an MCP tool.
- Updates hosted agent sample test skip list and changelog entries.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/ai/azure-ai-projects/tests/samples/test_samples.py |
Skips routine samples with known service serialization issues. |
sdk/ai/azure-ai-projects/samples/hosted_agents/sample_skill_in_toolbox.py |
Adds a hosted agent sample for skill invocation through a toolbox MCP endpoint. |
sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_with_timer_trigger.py |
Adds a timer-triggered routine sample that polls routine runs. |
sdk/ai/azure-ai-projects/samples/hosted_agents/sample_routines_crud.py |
Adds a routine CRUD sample. |
sdk/ai/azure-ai-projects/CHANGELOG.md |
Documents the newly added routine samples. |
| import os | ||
|
|
||
| from dotenv import load_dotenv | ||
| from openai import BadRequestError |
|
|
||
| toolbox_version = project_client.beta.toolboxes.create_version( | ||
| name=TOOLBOX_NAME, | ||
| description="Toolbox that exposes the shipping-cost kill via /mcp.", |
Comment on lines
+99
to
+100
| if str(run.status).lower() == "finished": | ||
| final_run = run |
| * Added Hosted Agent code-upload samples `sample_create_hosted_agent_from_code.py` and `sample_create_hosted_agent_from_code_async.py`, demonstrating uploading a code package (zip) as a new hosted agent version. | ||
| * The Hosted Agent creation sample also demonstrates assigning the hosted agent managed identity the Azure AI User RBAC role on the backing Azure AI account. | ||
| * Updated the other Hosted Agent samples to reuse an existing Hosted Agent as a prerequisite, instead of creating a new hosted agent version in each sample. | ||
| * Added Routines samples `sample_routines_crud.py` demonstring CRUD operations and `sample_routines_with_timer_trigger.py` trigger a routine by a timer. |
Member
|
Looks good. Per our discussion, please hold off from completing this PR until we do the release. Thanks! |
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.
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:
General Guidelines and Best Practices
Testing Guidelines