@AcpAgent in the same JVM, with
configuration only, in Spring Boot, Micronaut and Quarkus. Breaking changes are marked Breaking;
pre-1.0, they come without compatibility shims. The source of every statement here is the
v0.82.0 changelog.
An agent in process, with configuration only
Set one property and the integration serves the@AcpAgent bean on one side of an
InMemoryTransportPair and gives the application its AcpSyncClient and AcpAsyncClient on the
other, with the client properties, initialized once the agent has started and closed when the
application stops. The application writes no transport, pair, client or lifecycle code.
Inject the client and open sessions; the applicationâs handler beans receive the agentâs updates and
answer its permission requests:
- Client handler beans.
AcpSessionUpdateHandler(every bean receives every session update) andAcpPermissionHandler(at most one; it answerssession/request_permission), incom.agentclientprotocol.sdk.integration. Every client the three integrations build picks them up, on every transport, and they may block. @AcpAgentalone makes a class a bean in Spring Boot and Micronaut, as it already did in Quarkus. Spring Boot scans the applicationâs packages (those of its@SpringBootApplication). Micronaut needs the newacp-micronaut-processoron the annotation processor path, besidemicronaut-inject-java, and@Import(packages = "...")for an agent compiled elsewhere.acp-annotationskeeps no framework dependency.- The integrations close an
AutoCloseableagent bean once the agent has stopped. AcpClient.AsyncSpec.defaultRequestPermissionHandler, a permission handler that applies when the application registers none, for frameworks, likedefaultSessionUpdateHandler.- A supported in-process transport in
acp-core,com.agentclientprotocol.sdk.agent.transport.InMemoryTransportPair: build the agent onagentTransport()and the client onclientTransport().create()takes the JSON mapper from the classpath once for the pair;create(AcpJsonMapper)takes one you configure. Either sideâs close now ends the connection for both, andconnect()andstart()complete at once. See Testing.
Breaking changes, and what to do
Also changed, without an upgrade step:
- Either sideâs close ends the in-process connection for both.
AcpSyncAgent.run()returns once the client closes, the client fails its requests still waiting for the agent at once instead of at their timeout, and a request the agent sent the client and that is still unanswered fails with-32603, as on stdio. A send after the end fails withAcpConnectionException(it was aRuntimeException). - A handler failure on one message no longer stops delivery of the next on the client side of the in-process transports, and transport errors are logged at WARN unless an exception handler is set.
- SLF4J 2.0.20 and JSpecify 1.0.1, the versions Spring Boot 4.1.2 manages (were 2.0.18 and 1.0.0).
- Fixed: Spring Boot logs âDiscovered @AcpAgent beanâ once.
Known issues
- Spring WebFlux on Jetty: Jettyâs connection idle timeout still closes an ACP WebSocket after 30
seconds without traffic. Set
server.jetty.connection-idle-timeout(for example30m), or use Reactor Netty, the default for WebFlux. - Micronaut still serves ACP over HTTP on the SDKâs listener, on its own port, so Micronautâs own security does not apply to it. The in-process mode is unaffected. A Netty host is planned for a later release.
- The outbound queues of the stdio transports and the WebSocket client are still unbounded. Bounded outbound queues are planned for a later release.