Skip to content

Python: Agent response callbacks to provide full context #12501

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

Conversation

TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Jun 17, 2025

Motivation and Context

Currently, the agent response callbacks in the Orchestrations are triggered only when the final responses from the agents become available. This limits developers to create solutions that can expose the internal processing of the agents in multi agent orchestrations.

Description

The callbacks will now be triggered by the intermediate messages of the agents:

  1. A new sample
  2. Tests

P.s. Fix a bug where the name of the intermediate messages is not assigned.

Contribution Checklist

@TaoChenOSU TaoChenOSU self-assigned this Jun 17, 2025
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner June 17, 2025 04:35
@TaoChenOSU TaoChenOSU added python Pull requests for the Python Semantic Kernel agents labels Jun 17, 2025
@github-actions github-actions bot changed the title Agent response callbacks to provide full context Python: Agent response callbacks to provide full context Jun 17, 2025
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
agents/chat_completion
   chat_completion_agent.py2252887%68, 73, 78, 84, 100, 102, 108–112, 170, 173, 183, 191, 194, 196, 205, 231, 250, 252–253, 255–256, 258, 406, 503, 580
agents/orchestration
   agent_actor_base.py66690%33, 79, 96, 132, 155, 172
   handoffs.py1921791%254, 257–260, 262, 264, 271, 279, 294, 305–306, 311, 323–326
TOTAL26433394085% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3632 22 💤 0 ❌ 0 🔥 1m 51s ⏱️

@TaoChenOSU TaoChenOSU added this pull request to the merge queue Jun 17, 2025
Merged via the queue into main with commit 44f1253 Jun 17, 2025
28 checks passed
@TaoChenOSU TaoChenOSU deleted the taochen/agent-response-callbacks-to-provide-full-context branch June 17, 2025 16:25
@github-project-automation github-project-automation bot moved this to Sprint: Done in Semantic Kernel Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agents python Pull requests for the Python Semantic Kernel
Projects
Status: Sprint: Done
Development

Successfully merging this pull request may close these issues.

4 participants