Skip to content

Commit 4c67888

Browse files
committed
Add 0.9.0 documentation: roadmap, README updates, CHANGELOG
- Create plans/DOCS-ROADMAP.md with Forge-format 3-stage docs roadmap - Update README: add Mintlify docs link, version 0.9.0-SNAPSHOT → 0.9.0, remove snapshots repository, add annotation-based agent example first, add tutorial links, add Maven artifacts table - Update CHANGELOG: [Unreleased] → [0.9.0], expand with full feature list organized by subsystem (core, agent, annotations, capabilities, etc.) - Update acp-agent-support/README.md: remove "Spring MVC-style" phrasing
1 parent 80b832b commit 4c67888

4 files changed

Lines changed: 487 additions & 79 deletions

File tree

CHANGELOG.md

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,72 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
## [0.9.0] - 2026-02-XX
99

1010
### Added
11-
- Initial release of ACP Java SDK
11+
12+
#### Core SDK
1213
- Pure Java implementation of Agent Client Protocol (ACP) specification
13-
- `AcpSchema` - Complete protocol type definitions (1071 lines)
14-
- `AcpClientSession` - Low-level client session implementation
15-
- `AcpAsyncClient` - Reactive async client with Project Reactor
16-
- `AcpSyncClient` - Synchronous wrapper client
17-
- `StdioAcpClientTransport` - STDIO transport implementation
18-
- `AgentParameters` - Process configuration builder
19-
- Integration tests with Gemini CLI
14+
- `AcpSchema` — complete protocol type definitions (sealed interfaces and records)
15+
- `AcpSyncClient` — synchronous blocking client
16+
- `AcpAsyncClient` — reactive async client with Project Reactor
17+
- `AcpClientSession` — low-level client session implementation
18+
- `StdioAcpClientTransport` — stdio transport for launching agents as subprocesses
19+
- `WebSocketAcpClientTransport` — JDK-native WebSocket client transport (no extra dependencies)
20+
- `AgentParameters` — process configuration builder for agent launch
21+
22+
#### Agent SDK
23+
- `AcpSyncAgent` — synchronous agent with blocking handlers
24+
- `AcpAsyncAgent` — reactive agent with `Mono`-returning handlers
25+
- `StdioAcpAgentTransport` — stdio transport for agents
26+
- `SyncPromptContext` — convenience API for sending messages, reading files, requesting permissions
27+
- All handler types: initialize, newSession, loadSession, prompt, setSessionMode, setSessionModel, cancel
28+
29+
#### Annotation-Based Agent API
30+
- `@AcpAgent` — class-level agent annotation with name/version
31+
- `@Initialize`, `@NewSession`, `@LoadSession`, `@Prompt`, `@Cancel` — handler annotations
32+
- `@SetSessionMode`, `@SetSessionModel` — session configuration annotations
33+
- `@SessionId`, `@SessionState` — parameter annotations
34+
- `AcpAgentSupport` — bootstrap and builder for annotation-based agents
35+
- Flexible method signatures with automatic parameter resolution
36+
- Auto-conversion of return values (`String``PromptResponse`, `void``endTurn()`)
37+
- Interceptor support for cross-cutting concerns
38+
- Custom argument resolvers and return value handlers
39+
40+
#### Capabilities
41+
- `NegotiatedCapabilities` — capability negotiation between client and agent
42+
- Client capabilities: file read/write, terminal execution, permission requests
43+
- Agent capabilities: load session, image content, slash commands
44+
- `require*()` methods that throw `AcpCapabilityException` if unsupported
45+
46+
#### Error Handling
47+
- `AcpProtocolException` — structured JSON-RPC errors with codes
48+
- `AcpCapabilityException` — capability not supported
49+
- `AcpConnectionException` — transport-level failures
50+
- Standard error codes via `AcpErrorCodes`
51+
52+
#### Transports
53+
- Stdio transport (client and agent)
54+
- WebSocket client transport (JDK-native)
55+
- WebSocket agent transport (Jetty-based, `acp-websocket-jetty` module)
56+
- In-memory transport pair for testing (`acp-test` module)
57+
58+
#### Testing
59+
- `InMemoryTransportPair` — bidirectional in-memory transport for unit tests
60+
- `MockAcpClient` — mock client builder with file content fixtures
61+
- Fast, deterministic testing without subprocess I/O
62+
63+
#### Protocol Compliance
64+
- Full SessionUpdate types: AgentMessageChunk, AgentThoughtChunk, ToolCall, ToolCallUpdateNotification, Plan, AvailableCommandsUpdate, CurrentModeUpdate
65+
- MCP server configuration in session requests
66+
- `_meta` extensibility on all protocol messages
67+
- All StopReason values: END_TURN, MAX_TOKENS, REFUSAL, CANCELLED
68+
69+
#### Infrastructure
2070
- Maven Central Portal publishing configuration
71+
- CI workflow with GitHub Actions
72+
- 258 unit tests
73+
- Integration tests with Gemini CLI
2174

2275
### Dependencies
2376
- Java 17 (LTS)
@@ -26,9 +79,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2679
- MCP JSON utilities 0.15.0-SNAPSHOT
2780
- SLF4J 2.0.16
2881

29-
## [0.1.0] - TBD
30-
31-
Initial release.
32-
33-
[Unreleased]: https://github.com/acp-java/acp-java-sdk/compare/v0.1.0...HEAD
34-
[0.1.0]: https://github.com/acp-java/acp-java-sdk/releases/tag/v0.1.0
82+
[0.9.0]: https://github.com/agentclientprotocol/java-sdk/releases/tag/v0.9.0

README.md

Lines changed: 94 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
# ACP Java SDK
22

3+
> **Documentation**: https://springaicommunity.mintlify.app/acp-java-sdk
4+
35
Pure Java implementation of the [Agent Client Protocol (ACP)](https://agentclientprotocol.com/) specification for building both clients and agents.
46

57
## Overview
68

7-
The Agent Client Protocol (ACP) standardizes communication between code editors and coding agents. This SDK enables Java applications to:
9+
The Agent Client Protocol (ACP) standardizes communication between code editors and coding agents. This SDK provides two modules:
10+
11+
- **Client** — connect to and interact with ACP-compliant agents
12+
- **Agent** — build ACP-compliant agents in Java
13+
14+
Three API styles for building agents:
815

9-
- **Connect to** ACP-compliant agents (Client SDK)
10-
- **Build** ACP-compliant agents in Java (Agent SDK)
16+
| Style | Best for | Example |
17+
|-------|----------|---------|
18+
| [**Annotation-based**](#2-hello-world-agent-annotation-based) | Least boilerplate — `@AcpAgent`, `@Prompt` annotations | [Jump to example](#2-hello-world-agent-annotation-based) |
19+
| [**Sync**](#3-hello-world-agent-sync) | Simple blocking handlers with plain return values | [Jump to example](#3-hello-world-agent-sync) |
20+
| [**Async**](#4-hello-world-agent-async) | Reactive applications using Project Reactor `Mono` | [Jump to example](#4-hello-world-agent-async) |
1121

1222
**Key Features:**
13-
- Java 17+, reactive (Project Reactor), type-safe
14-
- Async and sync APIs
15-
- Stdio and WebSocket transports
23+
- Java 17+, type-safe, stdio and WebSocket transports
1624
- Capability negotiation and structured error handling
17-
- **[Annotation-based agents](acp-agent-support/README.md)** - Spring MVC-style `@AcpAgent`, `@Prompt` annotations
25+
- For a hands-on walkthrough, see the **[ACP Java Tutorial](https://github.com/markpollack/acp-java-tutorial)**
1826

1927
## Installation
2028

21-
> **Note:** Not yet published to Maven Central. For now, build and install locally using `./mvnw install`.
29+
Published to Maven Central:
2230

2331
```xml
2432
<dependency>
@@ -52,7 +60,7 @@ For WebSocket server support (agents accepting WebSocket connections):
5260

5361
### 1. Hello World Client
5462

55-
Connect to an ACP agent and send a prompt:
63+
Connect to an ACP agent and send a prompt ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-01-first-contact)):
5664

5765
```java
5866
import com.agentclientprotocol.sdk.client.*;
@@ -78,9 +86,45 @@ var response = client.prompt(new PromptRequest(
7886
client.close();
7987
```
8088

81-
### 2. Hello World Agent (Sync)
89+
### 2. Hello World Agent (Annotation-Based)
90+
91+
The simplest way to build an agent — use annotations ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-12-echo-agent)):
92+
93+
```java
94+
import com.agentclientprotocol.sdk.annotation.*;
95+
import com.agentclientprotocol.sdk.agent.SyncPromptContext;
96+
import com.agentclientprotocol.sdk.agent.support.AcpAgentSupport;
97+
import com.agentclientprotocol.sdk.spec.AcpSchema.*;
98+
99+
@AcpAgent
100+
class HelloAgent {
101+
102+
@Initialize
103+
InitializeResponse init() {
104+
return InitializeResponse.ok();
105+
}
106+
107+
@NewSession
108+
NewSessionResponse newSession() {
109+
return new NewSessionResponse(UUID.randomUUID().toString(), null, null);
110+
}
111+
112+
@Prompt
113+
PromptResponse prompt(PromptRequest req, SyncPromptContext ctx) {
114+
ctx.sendMessage("Hello from the agent!");
115+
return PromptResponse.endTurn();
116+
}
117+
}
118+
119+
// Bootstrap and run
120+
AcpAgentSupport.create(new HelloAgent())
121+
.transport(new StdioAcpAgentTransport())
122+
.run();
123+
```
124+
125+
### 3. Hello World Agent (Sync)
82126

83-
Create a minimal ACP agent using the sync API (recommended for simplicity):
127+
The builder API with blocking handlers and plain return values ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-13-agent-handlers)):
84128

85129
```java
86130
import com.agentclientprotocol.sdk.agent.*;
@@ -112,9 +156,9 @@ AcpSyncAgent agent = AcpAgent.sync(transport)
112156
agent.run();
113157
```
114158

115-
### 2b. Hello World Agent (Async)
159+
### 4. Hello World Agent (Async)
116160

117-
For reactive applications, use the async API:
161+
For reactive applications, use the async API with Project Reactor ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-22-async-agent)):
118162

119163
```java
120164
import com.agentclientprotocol.sdk.agent.*;
@@ -142,56 +186,28 @@ AcpAsyncAgent agent = AcpAgent.async(transport)
142186
agent.start().then(agent.awaitTermination()).block();
143187
```
144188

145-
### 2c. Hello World Agent (Annotation-Based)
146-
147-
For the simplest agent development experience, use annotations (see [full documentation](acp-agent-support/README.md)):
148-
149-
```java
150-
import com.agentclientprotocol.sdk.annotation.*;
151-
import com.agentclientprotocol.sdk.agent.SyncPromptContext;
152-
import com.agentclientprotocol.sdk.agent.support.AcpAgentSupport;
153-
import com.agentclientprotocol.sdk.spec.AcpSchema.*;
189+
---
154190

155-
@AcpAgent
156-
class HelloAgent {
191+
## Progressive Examples
157192

158-
@Initialize
159-
InitializeResponse init() {
160-
return InitializeResponse.ok();
161-
}
193+
### 5. Streaming Updates
162194

163-
@NewSession
164-
NewSessionResponse newSession() {
165-
return new NewSessionResponse(UUID.randomUUID().toString(), null, null);
166-
}
195+
Send real-time updates to the client during prompt processing (tutorial: [client-side](https://github.com/markpollack/acp-java-tutorial/tree/main/module-05-streaming-updates), [agent-side](https://github.com/markpollack/acp-java-tutorial/tree/main/module-14-sending-updates)).
167196

168-
@Prompt
169-
PromptResponse prompt(PromptRequest req, SyncPromptContext ctx) {
170-
ctx.sendMessage("Hello from the agent!");
171-
return PromptResponse.endTurn();
172-
}
197+
**Annotation-based:**
198+
```java
199+
@Prompt
200+
PromptResponse prompt(PromptRequest req, SyncPromptContext ctx) {
201+
ctx.sendUpdate(req.sessionId(),
202+
new AgentThoughtChunk("agent_thought_chunk", new TextContent("Thinking...")));
203+
ctx.sendMessage("Here's my response.");
204+
return PromptResponse.endTurn();
173205
}
174-
175-
// Bootstrap and run
176-
AcpAgentSupport.create(new HelloAgent())
177-
.transport(new StdioAcpAgentTransport())
178-
.run();
179206
```
180207

181-
This approach reduces boilerplate by ~50% compared to the builder API while producing identical runtime behavior.
182-
183-
---
184-
185-
## Progressive Examples
186-
187-
### 3. Streaming Updates
188-
189-
Send real-time updates to the client during prompt processing.
190-
191-
**Agent (Sync) - recommended:**
208+
**Sync:**
192209
```java
193210
.promptHandler((req, context) -> {
194-
// Blocking void calls - simple and straightforward
195211
context.sendUpdate(req.sessionId(),
196212
new AgentThoughtChunk("agent_thought_chunk",
197213
new TextContent("Thinking...")));
@@ -202,7 +218,7 @@ Send real-time updates to the client during prompt processing.
202218
})
203219
```
204220

205-
**Agent (Async):**
221+
**Async:**
206222
```java
207223
.promptHandler((request, context) -> {
208224
return context.sendUpdate(request.sessionId(),
@@ -227,9 +243,9 @@ AcpSyncClient client = AcpClient.sync(transport)
227243
.build();
228244
```
229245

230-
### 4. Agent-to-Client Requests
246+
### 6. Agent-to-Client Requests
231247

232-
Agents can request file operations from the client. The `context` parameter provides access to all agent capabilities.
248+
Agents can request file operations from the client ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-15-agent-requests)). The `context` parameter provides access to all agent capabilities.
233249

234250
**Agent (Sync) - reading files:**
235251
```java
@@ -266,9 +282,9 @@ AcpSyncClient client = AcpClient.sync(transport)
266282
.build();
267283
```
268284

269-
### 5. Capability Negotiation
285+
### 7. Capability Negotiation
270286

271-
Check what features the peer supports before using them:
287+
Check what features the peer supports before using them ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-17-capability-negotiation)):
272288

273289
```java
274290
// Client: check agent capabilities after initialize
@@ -297,9 +313,9 @@ clientCaps.requireWriteTextFile();
297313
agent.writeTextFile(...);
298314
```
299315

300-
### 6. Error Handling
316+
### 8. Error Handling
301317

302-
Handle protocol errors with structured exceptions:
318+
Handle protocol errors with structured exceptions ([tutorial](https://github.com/markpollack/acp-java-tutorial/tree/main/module-11-error-handling)):
303319

304320
```java
305321
import com.agentclientprotocol.sdk.error.*;
@@ -321,7 +337,7 @@ try {
321337
}
322338
```
323339

324-
### 7. WebSocket Transport
340+
### 9. WebSocket Transport
325341

326342
Use WebSocket instead of stdio for network-based communication:
327343

@@ -369,6 +385,16 @@ agent.start().block(); // Starts WebSocket server on port 8080
369385
| `com.agentclientprotocol.sdk.capabilities` | Capability negotiation (`NegotiatedCapabilities`) |
370386
| `com.agentclientprotocol.sdk.error` | Exceptions (`AcpProtocolException`, `AcpCapabilityException`) |
371387

388+
### Maven Artifacts
389+
390+
| Artifact | Description |
391+
|----------|-------------|
392+
| [`acp-core`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-core) | Client and Agent SDKs, stdio and WebSocket client transports |
393+
| [`acp-annotations`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-annotations) | `@AcpAgent`, `@Prompt`, and other annotations |
394+
| [`acp-agent-support`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-agent-support) | Annotation-based agent runtime |
395+
| [`acp-test`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-test) | In-memory transport and mock utilities for testing |
396+
| [`acp-websocket-jetty`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-websocket-jetty) | Jetty-based WebSocket server transport for agents |
397+
372398
### Transports
373399

374400
| Transport | Client | Agent | Module |
@@ -422,6 +448,10 @@ MockAcpClient mockClient = MockAcpClient.builder(pair.clientTransport())
422448

423449
---
424450

451+
## Tutorial
452+
453+
For a hands-on, progressive introduction to the SDK, see the **[ACP Java Tutorial](https://github.com/markpollack/acp-java-tutorial)** -- 30 modules covering client basics, agent development, streaming, testing, and IDE integration.
454+
425455
## Roadmap
426456

427457
### v0.9.0 (Current)
@@ -430,9 +460,10 @@ MockAcpClient mockClient = MockAcpClient.builder(pair.clientTransport())
430460
- Capability negotiation
431461
- Structured error handling
432462
- Full protocol compliance (all SessionUpdate types, MCP configs, `_meta` extensibility)
463+
- Snapshot builds published to Maven Central
433464
- 258 tests
434465

435466
### v1.0.0 (Planned)
436-
- Maven Central publishing
467+
- Stable release to Maven Central
437468
- Production hardening
438469
- Performance optimizations

acp-agent-support/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ACP Agent Support Module
22

3-
The `acp-agent-support` module provides a Spring MVC-style annotation-based programming model for building ACP agents. It eliminates boilerplate code while maintaining full compatibility with the builder-based API from `acp-core`.
3+
The `acp-agent-support` module provides an annotation-based programming model for building ACP agents. It eliminates boilerplate code while maintaining full compatibility with the builder-based API from `acp-core`.
44

55
## Quick Start
66

0 commit comments

Comments
 (0)