Skip to content

Commit 535d01d

Browse files
committed
docs: document time_of_last_update field in /ping response
The /ping endpoint returns a time_of_last_update field (Unix timestamp) alongside the status, but this was not documented anywhere. Developers using the SDK had no way to know this field exists or what it represents. Fixes #471
1 parent b64a0d9 commit 535d01d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/examples/a2a_protocol_examples.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,12 @@ Builds a Starlette ASGI application without starting a server. Useful for testin
142142
Returns a `Starlette` application with routes:
143143
- `POST /` — A2A JSON-RPC endpoint (`message/send`, `message/stream`, `tasks/get`, `tasks/cancel`)
144144
- `GET /.well-known/agent-card.json` — Agent card discovery
145-
- `GET /ping` — Bedrock health check
145+
- `GET /ping` — Bedrock health check. Returns JSON:
146+
```json
147+
{"status": "Healthy" | "HealthyBusy", "time_of_last_update": 1715000000}
148+
```
149+
- `status` — current health status from the `ping_handler` (or `"Healthy"` by default)
150+
- `time_of_last_update` — Unix timestamp (seconds) indicating when the status was last updated
146151

147152
### `build_runtime_url(agent_arn, region=None)`
148153

@@ -192,3 +197,5 @@ serve_a2a(executor, ping_handler=my_ping)
192197
```
193198

194199
If the ping handler raises an exception, the server falls back to `PingStatus.HEALTHY`.
200+
201+
The `/ping` response always includes a `time_of_last_update` field (Unix timestamp in seconds) reflecting when the status last changed. Clients can use this to detect stale health state.

0 commit comments

Comments
 (0)