Skip to content

Comments

Python: Add support for Azure AI Agent Service#10414

Merged
moonbox3 merged 13 commits intomicrosoft:mainfrom
moonbox3:azure-agent-service
Feb 7, 2025
Merged

Python: Add support for Azure AI Agent Service#10414
moonbox3 merged 13 commits intomicrosoft:mainfrom
moonbox3:azure-agent-service

Conversation

@moonbox3
Copy link
Collaborator

@moonbox3 moonbox3 commented Feb 5, 2025

Motivation and Context

Azure AI Agents are a managed offering, and are built on top of the OpenAI assistant v2 APIs. Until now we have not had support for them in SK Python. This PR adds support for Azure AI Agents in SK Python. The current abstractions allow one to run managed Azure AI Agents using SK constructs as is demonstrated via the getting started samples and/or the azure_ai_agent concept code samples. The developer must first follow the required Azure AI Agent deployment steps, and bring their connection string as well as their model deployment name.

Description

Add support for Azure AI Agent Service in SK

TODO: add more test coverage either in this PR, or a subsequent one.

Contribution Checklist

@moonbox3 moonbox3 added python Pull requests for the Python Semantic Kernel agents labels Feb 5, 2025
@moonbox3 moonbox3 self-assigned this Feb 5, 2025
@moonbox3 moonbox3 requested a review from a team as a code owner February 5, 2025 12:26
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 5, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/azure_ai
   agent_content_generation.py1452086%68–71, 89, 91, 286, 338–366
   agent_thread_actions.py33712762%139, 141, 176–179, 364, 366, 405–406, 432, 435–439, 442–454, 457–488, 494–501, 504–517, 533–563, 607, 636–670, 733, 738–743, 763–770, 801–810, 853–863
   azure_ai_agent.py79989%86, 88, 94, 103–108, 110, 153, 213
   azure_ai_agent_utils.py34197%44
   azure_ai_channel.py41393%93, 120–121
semantic_kernel/agents/channels
   bedrock_agent_channel.py804445%51–72, 91–112, 157–158, 169–186, 190–191, 200–212
   chat_history_channel.py79297%168, 171
TOTAL18494217588% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3172 4 💤 0 ❌ 0 🔥 1m 26s ⏱️

@TaoChenOSU
Copy link
Contributor

I noticed when I worked on the Bedrock agents that there were not integration tests for all existing agents that we support. Could you create a work item for add integration tests for Azure AI agents if you do not plan to add integration tests right after this PR?

@TaoChenOSU
Copy link
Contributor

LGTM. Will approve once the merge conflict is addressed.

@moonbox3 moonbox3 added this pull request to the merge queue Feb 7, 2025
Merged via the queue into microsoft:main with commit c3ab713 Feb 7, 2025
27 checks passed
@moonbox3 moonbox3 deleted the azure-agent-service branch February 7, 2025 02:18
jcruzmot-te pushed a commit to thousandeyes/aia-semantic-kernel that referenced this pull request Sep 15, 2025
### Motivation and Context

Azure AI Agents are a managed offering, and are built on top of the
OpenAI assistant v2 APIs. Until now we have not had support for them in
SK Python. This PR adds support for Azure AI Agents in SK Python. The
current abstractions allow one to run managed Azure AI Agents using SK
constructs as is demonstrated via the getting started samples and/or the
`azure_ai_agent` concept code samples. The developer must first follow
the required Azure AI Agent deployment steps, and bring their connection
string as well as their model deployment name.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

Add support for Azure AI Agent Service in SK
- Add sample code
- Add unit tests
- Restructures the `getting_started_with_agents` samples to move the
respective agent code into folders like `chat_completion`,
`azure_ai_agent`, etc. Updates the README as well.
- Closes microsoft#10187 

**TODO**: add more test coverage either in this PR, or a subsequent one.

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation python Pull requests for the Python Semantic Kernel

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Python: Support an Agent based on Azure AI Agents

4 participants