Skip to content

Python: Include InvokeAzureAgent input.arguments in agent text - #7907

Draft
Shivani . (Shivani767) wants to merge 1 commit into
microsoft:mainfrom
Shivani767:fix/7902-invoke-azure-agent-arguments
Draft

Python: Include InvokeAzureAgent input.arguments in agent text#7907
Shivani . (Shivani767) wants to merge 1 commit into
microsoft:mainfrom
Shivani767:fix/7902-invoke-azure-agent-arguments

Conversation

@Shivani767

@Shivani767 Shivani . (Shivani767) commented Aug 27, 2026

Copy link
Copy Markdown

Motivation & Context

InvokeAzureAgentExecutor._build_input_text() evaluated input.arguments into evaluated_args and then never used that dict. Actions that supply only input.arguments (as in the customer_support sample) therefore invoked the agent with an empty string.

Fixes #7902

Description & Review Guide

  • What are the major changes?

    • Format evaluated input.arguments as key: value lines (same shape as multi-value Workflow.Inputs fallback).
    • Include that text in the agent input, alone or combined with explicit messages / fallback input.
    • Add regression tests for arguments-only, arguments+messages, and expression-valued arguments.
  • What is the impact of these changes?

    • Argument-only InvokeAzureAgent actions now pass structured values to agent.run().
    • Existing messages-only and fallback-input behavior is unchanged when no arguments are present.
  • What do you want reviewers to focus on?

    • Whether folding arguments into text is the right Python parity approach vs. a Foundry structured_inputs channel (.NET uses the latter; Python run() has no equivalent parameter).

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Fold evaluated input.arguments into the text passed to agent.run() so
argument-only InvokeAzureAgent actions no longer silently invoke with
an empty string.
Copilot AI balanced review requested due to automatic review settings August 27, 2026 10:25
@agent-framework-automation agent-framework-automation Bot added the python Usage: [Issues, PRs], Target: Python label Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes #7902 by preserving evaluated InvokeAzureAgent arguments in agent input text.

Changes:

  • Formats arguments as key: value lines.
  • Combines arguments with explicit or fallback message text.
  • Adds regression coverage for argument-only, combined, and expression-based inputs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
python/packages/declarative/agent_framework_declarative/_workflows/_executors_agents.py Includes evaluated arguments in agent input text.
python/packages/declarative/tests/test_graph_coverage.py Adds regression tests for argument handling.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET: Python: [Bug]: InvokeAzureAgent silently drops input.arguments, never sends them to the agent

2 participants