Repository navigation
Conversation
Tehsmash
force-pushed
the
feat/collaborate-example
branch
from
November 20, 2026 13:33
076f23c to
f5610c4
Compare
Tehsmash
force-pushed
the
feat/a2acli-collaborate
branch
2 times, most recently
from
November 20, 2026 16:16
ba6256d to
c325d00
Compare
E-commerce scenario with three specialist agents (orders, inventory, shipping), mirroring the Go reference at: a2aproject/experimental-cpb-slimrpc@3a82760 Agents have hardcoded domain data (no LLM) and respond only to queries that touch their domain via keyword matching: - orders: ORD-1001 status, tracking numbers - inventory: P-500 Wireless Headphones stock levels - shipping: TRK-9001 tracking and delay information New files: - examples/src/collaborate/fan_in.rs — FanInHandler RequestHandler middleware that routes relay messages into the active executor's inbox channel instead of starting new executions - examples/src/collaborate/agent.rs — CollabExecutor with both required extension URIs declared in AgentCard capabilities - examples/src/collaborate/server.rs — shared server startup logic - examples/src/collaborate/{orders,inventory,shipping}.rs — binary entry points (ports 9001, 9002, 9003) Usage: # Terminal 1-3: start each agent cargo run --bin collaborate-orders --package examples cargo run --bin collaborate-inventory --package examples cargo run --bin collaborate-shipping --package examples # Terminal 4: query all three a2acli collaborate \ --agent http://localhost:9001 \ --agent http://localhost:9002 \ --agent http://localhost:9003 \ "Customer ORD-1001 has not received their order" Closes #573. Part of #569. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
- Remove unused `a2a-collab` dependency from examples/Cargo.toml (the examples implement server-side FanIn; they do not use the relay helpers from a2a-collab) - Fix clippy::while_let_loop in collaborate/agent.rs - Fix clippy::collapsible_if in collaborate/agent.rs and fan_in.rs - Fix rustfmt violations across examples, a2a-collab, a2a, a2acli - Fix broken external link in a2acli/README.md (a2a-cli/specification/SPEC.md was removed; link to repo root) Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
…b client API Adds examples/src/collaborate/client.rs — a standalone binary that shows programmatic use of the a2a-collab crate client-side: - require_collaborative_extensions() pre-flight-checks each AgentCard - Opens one streaming connection per agent - Merges all streams with futures::stream::select_all - Relays every StreamResponse to peer agents via translate_peer_response() - Echo suppression: never routes an event back to its originator - Sets return_immediately=true on all relay send_message calls Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
…ssion Replace the manual relay loop with CollaborativeSession::new(agents).start(). The example now only handles rendering — all relay orchestration lives in a2a-collab as intended. Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
Tehsmash
force-pushed
the
feat/collaborate-example
branch
from
November 20, 2026 16:19
f5610c4 to
89bd666
Compare
This branch has not been deployed
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.
Summary
New e-commerce collaborative task example with three specialist agents.
Modelled on the Go reference at a2aproject/experimental-cpb-slimrpc@3a82760.
Agents
collaborate-orderscollaborate-inventorycollaborate-shippingAll agents use hardcoded data and keyword matching — no LLM required. Each responds only to queries about its own domain.
Example session
Expected output:
Key components
fan_in.rs—FanInHandler<H>wraps anyRequestHandler. Whensend_messagearrives with atask_idthat has an active inbox, the message is routed to the executor's inbox channel instead of starting a new execution.agent.rs—CollabExecutorregisters its inbox on start, reads relay messages from it, and both required extension URIs are declared in the AgentCard.server.rs— shared startup: createsInboxRegistry, passes it to both executor and handler.Depends on #578. Closes #573. Part of #569.