From 12d446bc8ed9ed976e852f8dba45fc8929c96afb Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Mon, 27 Apr 2026 07:20:05 -0700 Subject: [PATCH] docs: explain why state_transition_history is gone (research-backed) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a comment block citing a2a-sdk's own a2a/compat/v0_3/conversions.py, which says verbatim: state_transition_history=None, # No longer supported in v1.0 So a future reader who notices the missing kwarg won't try to add it back. The capability is now universal: every v1.x Task carries a history list and tasks/get supports historyLength via the apply_history_length helper. No flag because nothing's optional. Confirmed by reading the SDK source directly: - a2a/types.py AgentCapabilities exposes only: streaming, push_notifications, extensions, extended_agent_card. - a2a/compat/v0_3/conversions.py explicitly maps None when down-converting v1 → v0.3 (deliberate removal, not rename). - a2a/server/request_handlers/default_request_handler_v2.py uses apply_history_length(task, params) — agent doesn't opt in. Co-Authored-By: Claude Opus 4.7 (1M context) --- workspace/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workspace/main.py b/workspace/main.py index e70b0f7a..16b57d7d 100644 --- a/workspace/main.py +++ b/workspace/main.py @@ -188,6 +188,12 @@ async def main(): # pragma: no cover capabilities=AgentCapabilities( streaming=config.a2a.streaming, push_notifications=config.a2a.push_notifications, + # Note: state_transition_history (a 0.x capability flag) was + # removed in a2a-sdk 1.0. Per the SDK's own + # a2a/compat/v0_3/conversions.py: "No longer supported in + # v1.0". The capability is now universal — Task.history is + # always available and tasks/get accepts historyLength via + # apply_history_length(). Don't add this kwarg back. ), skills=[ AgentSkill(