Python: Clarify require_confirmation docstring to reflect confirm_changes HITL gating#6884
Open
Serjbory wants to merge 1 commit into
Open
Python: Clarify require_confirmation docstring to reflect confirm_changes HITL gating#6884Serjbory wants to merge 1 commit into
Serjbory wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Python AG-UI wrapper documentation to accurately describe what require_confirmation controls in AgentConfig and AgentFrameworkAgent: it not only gates confirmation for predictive state updates, but also whether the synthetic confirm_changes tool call is emitted for approval-gated tool flows (used by HITL frontends to render an approval prompt).
Changes:
- Clarified the
require_confirmationdocstring inAgentConfig.__init__to cover both predictive updates and HITL approval prompting viaconfirm_changes. - Clarified the
require_confirmationdocstring inAgentFrameworkAgent.__init__to match the actual runtime gating behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fixes #6881
The
require_confirmationparameter onAgentFrameworkAgentandAgentConfig(inagent-framework-ag-ui) was documented as only affecting predictive state updates:However, in
_run_common.pythe same flag is the master switch that gates whether a syntheticconfirm_changestool call is emitted for function-approval requests (tools withapproval_mode="always_require") — the mechanism a human-in-the-loop frontend relies on to render an approval prompt. Settingrequire_confirmation=Falsesilently disables the approval UI for gated tools, which the docstring gave no hint of.Description
Documentation-only change. Updates the
require_confirmationdocstring in bothAgentConfig.__init__andAgentFrameworkAgent.__init__to describe its actual dual purpose:True(default): emits aconfirm_changestool call for approval-gated tools (so a HITL frontend can prompt for approval) and requires confirmation for predictive state updates.False: noconfirm_changescall is emitted; tools remain gated server-side.No behavior change.
Contribution Checklist
uv run poe syntaxpasses)