Skip to content

Commit 87be0d5

Browse files
committed
Allow A2A 0.3 clients
Signed-off-by: Ed Snible <snible@us.ibm.com>
1 parent 20aacf5 commit 87be0d5

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

a2a/claude_agent/src/claude_agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def run() -> None:
130130
# assemble into a Starlette app ourselves. Serve the current well-known path
131131
# (/.well-known/agent-card.json) plus the legacy /.well-known/agent.json for
132132
# back-compat.
133-
routes = create_jsonrpc_routes(request_handler, rpc_url="/")
133+
# enable_v0_3_compat is needed because Kagenti uses A2A 0.3 client libraries
134+
routes = create_jsonrpc_routes(request_handler, rpc_url="/", enable_v0_3_compat=True)
134135
routes += create_agent_card_routes(agent_card)
135136
routes += create_agent_card_routes(agent_card, card_url="/.well-known/agent.json")
136137
app = Starlette(routes=routes)

a2a/generic_agent/src/generic_agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ def run():
217217

218218
# a2a-sdk 1.x replaced A2AStarletteApplication with route factories that we
219219
# assemble into a Starlette app ourselves.
220-
routes = create_jsonrpc_routes(request_handler, rpc_url="/")
220+
# enable_v0_3_compat is needed because Kagenti uses A2A 0.3 client libraries
221+
routes = create_jsonrpc_routes(request_handler, rpc_url="/", enable_v0_3_compat=True)
221222
# Serve the current well-known path (/.well-known/agent-card.json) plus the
222223
# legacy /.well-known/agent.json path for backward compatibility.
223224
routes += create_agent_card_routes(agent_card)

a2a/git_issue_agent/a2a_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,8 @@ def run():
218218

219219
# a2a-sdk 1.x replaced A2AStarletteApplication with route factories that we
220220
# assemble into a Starlette app ourselves.
221-
routes = create_jsonrpc_routes(request_handler, rpc_url="/")
221+
# enable_v0_3_compat is needed because Kagenti uses A2A 0.3 client libraries
222+
routes = create_jsonrpc_routes(request_handler, rpc_url="/", enable_v0_3_compat=True)
222223
# Serve the current well-known path (/.well-known/agent-card.json) plus the
223224
# legacy /.well-known/agent.json path for backward compatibility.
224225
routes += create_agent_card_routes(agent_card)

a2a/simple_generalist/src/simple_generalist/a2a_server/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ def create_app(settings: Settings) -> Any:
236236

237237
# a2a-sdk 1.x replaced A2AStarletteApplication with route factories that we
238238
# assemble into a Starlette app ourselves.
239-
routes = create_jsonrpc_routes(request_handler, rpc_url="/")
239+
# enable_v0_3_compat is needed because Kagenti uses A2A 0.3 client libraries
240+
routes = create_jsonrpc_routes(request_handler, rpc_url="/", enable_v0_3_compat=True)
240241
# Serve the current well-known path (/.well-known/agent-card.json) plus the
241242
# legacy /.well-known/agent.json path for backward compatibility.
242243
routes += create_agent_card_routes(agent_card)

a2a/weather_service/src/weather_service/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ def run():
249249

250250
# a2a-sdk 1.x replaced A2AStarletteApplication with route factories that we
251251
# assemble into a Starlette app ourselves.
252-
routes = create_jsonrpc_routes(request_handler, rpc_url="/")
252+
# enable_v0_3_compat is needed because Kagenti uses A2A 0.3 client libraries
253+
routes = create_jsonrpc_routes(request_handler, rpc_url="/", enable_v0_3_compat=True)
253254
# Serve the current well-known path (/.well-known/agent-card.json) plus the
254255
# legacy /.well-known/agent.json path for backward compatibility.
255256
routes += create_agent_card_routes(agent_card)

0 commit comments

Comments
 (0)