A sample message says the heating is out in an Oulu office. The intake code prepares a structured request. It then discovers a separate availability agent through its Agent Card and sends the request over A2A's JSON-RPC transport. The availability agent returns candidate slots as a task artifact.

THE TESTED HANDOFF / LOCAL DEMO
  1. 01 / INPUTStructure the request
  2. 02 / DISCOVERRead the Agent Card
  3. 03 / SENDStart an A2A task
  4. 04 / RESULTRead the artifact

What crossed the boundary

The client sends a request ID and city as a text part containing JSON. The remote agent replies with the same request ID, a list of possible slots, and a state. It proposes a result; it does not confirm a booking.

{
  "city": "Oulu",
  "availableSlots": ["10:00", "14:00"],
  "state": "needs-human-approval"
}

The official A2A JavaScript SDK handles the protocol. The demo code owns the example rules and the handoff. You can download the runnable source, including its test.

What was tested

The automated test starts the agent on a local port, fetches its Agent Card, sends an A2A task, and checks the returned artifact. It also sends a city with no listed slots and checks that the result becomes manual-review. The demo ran successfully with Node.js and the official SDK.

Where this stops

There is no language model, authentication, database, real calendar, or production customer data here. The sample is deliberately small so the protocol handoff is visible. A real service would need identity, permissions, durable task storage, retries, monitoring, and a human approval path before it could make a booking.