An agent is one annotated class
initializeis answered for you.agentInfocomes from@AcpAgent, and each handler method advertises the capability it implements. There is no@Initializemethod to write.session/newis answered for you with a generated session id, until you add a@NewSessionmethod of your own.- A
Stringreturn is the reply. It is streamed to the client as an agent message, and the turn ends. Return aPromptResponse, aMonoor aCompletionStagewhen you need more control.
@LoadSession, @ListSessions, @ResumeSession, @CloseSession
and @Logout each advertise theirs automatically, and @Prompt(image = true) declares the prompt
content you accept. Everything else in the protocol is one annotation away too: @Cancel,
@Authenticate, @SetSessionConfigOption, and @ExtRequest for methods of your own. Take a
SyncPromptContext parameter to stream progress, ask the client for permission, or check for
cancellation. Mistakes, such as two @Prompt methods or a parameter nothing can supply, fail when the
agent is built, naming the class, the method and the fix. See
Clients and Agents for the full model.
The lower-level APIs are still there
When you want to wire every handler yourself, write the same agent with the sync or async builder. All three styles speak the same protocol.- Sync builder
- Async builder (Reactor)
One agent, every Java framework
The sameEchoAgent runs on Spring Boot, Micronaut and Quarkus, and in plain Java with no framework
at all. The handler class doesn’t change. Only the startup differs: how the framework learns that the
class is a bean, and how the application starts. On Quarkus the class is used exactly as written.
- Plain Java
- Spring Boot
- Micronaut
- Quarkus
spring.acp.agent.transport.type=http, acp.agent.transport.type=http or
quarkus.acp.agent.transport.type=http. Spring Boot and Micronaut also need the HTTP module their page
names. In a Spring Boot web application, and in Quarkus, the agent is mounted on the application’s own
server, behind its own security. See Transports
for every deployment shape, plain Java included.
This is tested, not just documented. Every release is gated on a framework smoke matrix: one shared
handler class, hosted by Spring Boot (servlet and WebFlux), Micronaut and Quarkus, is driven by the
TypeScript SDK over stdio, Streamable HTTP and WebSocket. See
Cross-SDK Compatibility.
Getting Started
Overview
How ACP works, client and agent quick starts, adding the SDK to your build
Clients and Agents
The annotation model in full, and when to choose sync or async
First Contact
Launch an agent, create a session, send your first prompt
Upgrading from 0.18
Every breaking change in 0.80.0, and how to migrate
Tutorials
Progressive, runnable modules, each with integration tests:Client Basics
Sessions, prompts, streaming updates, permissions, cancellation, errors
Building Agents
A first agent, handlers, sending updates, in-memory testing, capabilities, MCP servers
Frameworks
The annotated agent on Spring Boot, Micronaut and Quarkus
Remote Agents
Serve an agent over Streamable HTTP and WebSocket, one runtime per connection
Reactive
Async client and agent with Project Reactor
IDE Integration
Run your agent in Zed, JetBrains IDEs and VS Code
Reference
Java API Reference
Client and agent classes, protocol types, transports, error codes
Concepts
Sessions, capabilities, the framework-neutral layer, where handlers run
Source Code
The SDK, including the Spring Boot, Micronaut and Quarkus integrations
Tutorial Code
Every tutorial module, runnable