Skip to content

Python: Pass through arguments when creating agents from specs #12771

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 1 commit into from
Jul 24, 2025

Conversation

moonbox3
Copy link
Collaborator

Motivation and Context

Currently, attempting to pass through KernelArguments through agent creation via declarative spec isn't working properly. The arguments are used to normalize fields, but are then not passed through fully to where the agent is created.

Description

Pass arguments through, and merge them properly with the normalized fields. This allows for underlying args to be used by the agent, like in the case of structured outputs.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner July 23, 2025 05:01
@moonbox3 moonbox3 added the python Pull requests for the Python Semantic Kernel label Jul 23, 2025
@github-actions github-actions bot changed the title Pass through arguments when creating agents from specs Python: Pass through arguments when creating agents from specs Jul 23, 2025
@moonbox3
Copy link
Collaborator Author

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
agents/azure_ai
   azure_ai_agent.py36218050%98, 100–103, 105–107, 109–114, 116, 118, 120–122, 124, 141, 143–146, 148–153, 155, 160–161, 166–169, 174–178, 180–183, 185–191, 196, 198–201, 203–205, 207–210, 212, 214, 224–225, 227–230, 232–233, 238, 240–246, 248, 281, 292–293, 298–299, 302, 307–312, 319–320, 322, 327–328, 339–345, 397, 399, 405, 416, 419, 421, 423, 425, 459, 490–492, 494, 496–497, 499–502, 505–507, 509–510, 513, 516–525, 527, 536–537, 540–542, 544–545, 555–556, 558, 576, 578, 581, 583–584, 586–587, 589, 598–599, 601, 603–606, 609, 611, 614–616, 620, 689, 795, 899, 972
agents/chat_completion
   chat_completion_agent.py2303385%68, 73, 78, 84, 100, 102, 108–112, 170, 173, 183, 191, 194, 196, 205, 231, 250, 252–253, 255–256, 259–261, 263, 265, 267, 415, 512, 589
agents/open_ai
   openai_assistant_agent.py3637180%74, 110–113, 118, 122–123, 156, 173–174, 182–187, 194–195, 198, 203–204, 215–221, 399–400, 407–408, 410–411, 413–414, 416–421, 423, 471–472, 475, 478, 481–490, 492, 502, 526–527, 565, 581, 591, 607, 620, 656, 800, 909, 1016
   openai_responses_agent.py41010474%65, 94, 113–116, 124, 128–129, 161–165, 169, 174, 179, 184, 190, 195–196, 199, 202, 207–212, 217–218, 220–221, 227–230, 236, 238–239, 243–247, 338, 342, 346, 348, 354, 367, 369, 371, 375, 470–471, 478–479, 481–482, 484–485, 487–492, 494, 542–543, 546, 591, 607, 617, 651, 659, 662, 666, 668, 671, 694, 697–701, 711, 751, 776, 787, 878, 998, 1039, 1041, 1115, 1155–1156, 1158–1162, 1181
TOTAL26693459282% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3659 22 💤 0 ❌ 0 🔥 2m 2s ⏱️

@moonbox3 moonbox3 added this pull request to the merge queue Jul 24, 2025
Merged via the queue into microsoft:main with commit 1efc7ad Jul 24, 2025
29 checks passed
@moonbox3 moonbox3 deleted the declarative-agent-w-settings branch July 24, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python: Bug: Declarative agent creation doesn't pass args through
3 participants