Skip to content

Howie/samples 4#47240

Open
howieleung wants to merge 7 commits into
mainfrom
howie/samples-4
Open

Howie/samples 4#47240
howieleung wants to merge 7 commits into
mainfrom
howie/samples-4

Conversation

@howieleung
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
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 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.
@dargilco
Copy link
Copy Markdown
Member

Looks good. Per our discussion, please hold off from completing this PR until we do the release. Thanks!

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.

3 participants