This document is the source of truth for the runnable REST example applications.
| App | Module | Artifact | Role |
|---|---|---|---|
| Server | examples/spring-boot/rest/server |
a2a-spring-boot-examples-rest-server |
Exposes the A2A REST server and the demo AgentExecutor. |
| Client | examples/spring-boot/rest/client |
a2a-spring-boot-examples-rest-client |
Renders the browser guide and playground and calls the server over HTTP. |
The client application renders a browser-based playground at /guide.
It demonstrates:
- agent discovery through
GET /.well-known/agent-card.json; - normal A2A message exchange through
POST /message:send; - task creation and inspection through
GET /tasks/{taskId}; - task streaming through
POST /message:stream; - task subscription through
POST /tasks/{taskId}:subscribe; - push notification configuration through the task push config endpoints;
- push callback delivery in the client inbox.
server:
port: 18080
spring:
ai:
openai:
base-url: https://openrouter.ai/api/v1
api-key: ${OPENROUTER_API_KEY:}
chat:
options:
model: openai/gpt-oss-120b:free
a2a:
executor:
core-pool-size: 2
max-pool-size: 4
keep-alive-seconds: 60
queue-capacity: 32
blocking:
agent-timeout-seconds: 30
consumption-timeout-seconds: 5If OPENROUTER_API_KEY is missing, the example server returns Mock response from LLM.
server:
port: 18081
spring:
a2a:
example:
server-url: http://localhost:18080
hello-message: hello from the Spring Boot REST client
stream-message: stream from the Spring Boot REST client
streaming-timeout-seconds: 15
callback-url: http://localhost:18081/guide/push-notifications/callbackStart the server:
mvn -pl examples/spring-boot/rest/server -am spring-boot:runStart the client in a second terminal:
mvn -pl examples/spring-boot/rest/client -am spring-boot:runThen open:
http://localhost:18081/guidehttp://localhost:18081/guide/playground
