Skip to content

Python: Pass kernel args through to kernel invoke function call for AzureAIAgent and AssistantAgent #11250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

moonbox3
Copy link
Contributor

Motivation and Context

In our AzureAIAgent and AssistantAgent thread actions, we're not passing the supplied args from the caller through to kernel function call invoke methods.

Description

This PR fixes that, and makes sure we pass kernel args all the way through the process, so any function calls can leverage the args.

  • Adds a concept sample for AzureAIAgent showing how to prompt with different prompt templates.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner March 28, 2025 10:54
@moonbox3 moonbox3 self-assigned this Mar 28, 2025
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel documentation labels Mar 28, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/agents/azure_ai
   agent_thread_actions.py34112962%142, 144, 179–182, 371, 373, 413–414, 441, 444–448, 451–463, 466–498, 504–511, 514–527, 543–574, 618, 621, 652–686, 749, 754–759, 779–786, 817–826, 874–888
semantic_kernel/agents/open_ai
   assistant_thread_actions.py3365683%107, 110, 113, 189, 191, 228–234, 407, 465, 486, 581–609, 623–632, 672–686, 698–699, 770, 775, 807
TOTAL21257247088% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3339 5 💤 0 ❌ 0 🔥 1m 31s ⏱️

@vslepakov
Copy link
Member

great work! When will this be released?

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Mar 30, 2025
Merged via the queue into microsoft:main with commit 5fc8381 Mar 30, 2025
34 checks passed
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Mar 30, 2025
@moonbox3
Copy link
Contributor Author

great work! When will this be released?

Hi @vslepakov, it will be released in our next release this week.

glorious-beard pushed a commit to glorious-beard/semantic-kernel that referenced this pull request Apr 6, 2025
…zureAIAgent and AssistantAgent (microsoft#11250)

### Motivation and Context

In our AzureAIAgent and AssistantAgent thread actions, we're not passing
the supplied args from the caller through to kernel function call invoke
methods.

<!-- 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

This PR fixes that, and makes sure we pass kernel args all the way
through the process, so any function calls can leverage the args.
- Adds a concept sample for AzureAIAgent showing how to prompt with
different prompt templates.

<!-- 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.

6 participants