Skip to content

feat: exercise every A2A RPC in the echo agent example - #8

Merged
janosSarusiKis merged 3 commits into
mainfrom
echo-agent-full-rpc-demos
Sep 18, 2026
Merged

janosSarusiKis merged 3 commits into
mainfrom
echo-agent-full-rpc-demos

Conversation

@janosSarusiKis

Copy link
Copy Markdown
Contributor

Extends the echo agent to cover the A2A calls that were compiled but never
exercised at runtime, and fixes a server crash found while doing so.

Changes

  • ClientMain runs one demo per call shape — SendMessage,
    SendStreamingMessage + GetTask, SubscribeToTask + CancelTask,
    GetExtendedAgentCard — selectable with --demo message,stream,cancel,card.
  • EchoAgentExecutor picks its behaviour from a prefix on the message text:
    stream: <text> runs a task emitting one artifact per word, slow: <seconds>
    runs a cancellable long task, anything else replies with a plain message.
  • A2AEventStream (new) decodes the raw SlimRPC response stream into A2A
    domain events.

Fix: protobuf runtime pin

proto-google-common-protos 2.70.0 is generated against protobuf 4.33.2 while
the runtime was pinned to 4.33.1. Building an AgentCard proto loads
com.google.api.AnnotationsProto, whose version check fails with an
ExceptionInInitializerError; SlimA2AHandler catches only A2AError, so that
Error escaped and killed the server process. This is the
GetExtendedAgentCard "hang" the example previously warned about — clients were
seeing DEADLINE_EXCEEDED against a dead server. Raising the pin to 4.33.2
fixes it, and the call now returns the card.

Verification

All four demos pass against a local SLIM 2.0.0 gateway, across three
consecutive client runs on one long-lived server. CI has no gateway, so it only
compiles these examples — the runtime results are from local runs.

Follow-ups (not in this PR)

  • A2AEventStream belongs in slim-a2a: every caller of
    sendStreamingMessage/subscribeToTask needs it, since those return a
    ResponseStreamReader of protobuf bytes.
  • SlimA2AHandler should contain RuntimeException/Error from a handler
    rather than letting it take down the agent.

🤖 Generated with Claude Code

Signed-off-by: Janos Sarusi-Kis <janossk@cisco.com>
Signed-off-by: Janos Sarusi-Kis <janossk@cisco.com>
@janosSarusiKis janosSarusiKis self-assigned this Sep 18, 2026
@janosSarusiKis
janosSarusiKis merged commit 1520fdc into main Sep 18, 2026
2 checks passed
@janosSarusiKis
janosSarusiKis deleted the echo-agent-full-rpc-demos branch September 18, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants