Build an ACP agent as a Spring Boot application using @AcpAgent annotations and autoconfiguration.
Requires Java 21+ (Spring Boot 4.x).
- Using
@AcpAgent,@Initialize,@NewSession,@Promptannotations - Spring Boot autoconfiguration for transport and lifecycle management
- Redirecting logging to stderr for stdio agents
| Module 12 (Builder) | Module 23 (Spring Boot) |
|---|---|
Manual StdioAcpAgentTransport |
Autoconfigured |
| Builder lambda handlers | Annotated methods |
Explicit agent.run() |
SmartLifecycle |
# Package the agent
./mvnw package -pl module-23-spring-boot-agent -q
# Run the demo
./mvnw exec:java -pl module-23-spring-boot-agentSee the tutorial page for the full walkthrough.