From 2d6d9f1c02f8b30cf89ece54ef79f9783a01f58b Mon Sep 17 00:00:00 2001 From: Sergey Borisov Date: Thu, 2 Jul 2026 15:03:13 +0200 Subject: [PATCH] fix: clarify require_confirmation docstring to reflect confirm_changes HITL gating --- python/packages/ag-ui/agent_framework_ag_ui/_agent.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python/packages/ag-ui/agent_framework_ag_ui/_agent.py b/python/packages/ag-ui/agent_framework_ag_ui/_agent.py index 191de68c5f3..7b8cd380866 100644 --- a/python/packages/ag-ui/agent_framework_ag_ui/_agent.py +++ b/python/packages/ag-ui/agent_framework_ag_ui/_agent.py @@ -30,7 +30,10 @@ def __init__( state_schema: Optional state schema for state management; accepts dict or Pydantic model/class predict_state_config: Configuration for predictive state updates use_service_session: Whether the agent session is service-managed - require_confirmation: Whether predictive updates require user confirmation before applying + require_confirmation: When True (default), emit a ``confirm_changes`` tool call for + approval-gated tools so a human-in-the-loop frontend can prompt for approval, and require + confirmation for predictive state updates. When False, no ``confirm_changes`` call is + emitted; tools remain gated server-side. snapshot_store: Optional AG-UI Thread Snapshot store. Snapshot persistence remains inactive unless endpoint setup also provides an explicit Snapshot Scope resolver. """ @@ -94,7 +97,10 @@ def __init__( description: Optional description state_schema: Optional state schema for state management; accepts dict or Pydantic model/class predict_state_config: Configuration for predictive state updates - require_confirmation: Whether predictive updates require user confirmation before applying + require_confirmation: When True (default), emit a ``confirm_changes`` tool call for + approval-gated tools so a human-in-the-loop frontend can prompt for approval, and require + confirmation for predictive state updates. When False, no ``confirm_changes`` call is + emitted; tools remain gated server-side. use_service_session: Whether the agent session is service-managed snapshot_store: Optional AG-UI Thread Snapshot store. Snapshot persistence remains inactive unless endpoint setup also provides an explicit Snapshot Scope resolver.