Skip to content

Commit 328f2c7

Browse files
committed
Add READMEs for acp-core, acp-annotations, acp-test, acp-websocket-jetty
Lightweight module READMEs with key classes, installation, and doc links.
1 parent 4c67888 commit 328f2c7

4 files changed

Lines changed: 128 additions & 0 deletions

File tree

acp-annotations/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# acp-annotations
2+
3+
Zero-dependency annotation library for declarative ACP agent development. Use with `acp-agent-support` for annotation processing at runtime.
4+
5+
## Annotations
6+
7+
| Annotation | Target | Purpose |
8+
|-----------|--------|---------|
9+
| `@AcpAgent` | Class | Marks a class as an ACP agent |
10+
| `@Initialize` | Method | Handles initialization requests |
11+
| `@NewSession` | Method | Handles new session creation |
12+
| `@LoadSession` | Method | Handles session resume |
13+
| `@Prompt` | Method | Handles prompt requests |
14+
| `@Cancel` | Method | Handles cancel notifications |
15+
| `@SessionState` | Parameter | Injects session-scoped state |
16+
| `@SetSessionMode` | Method | Handles mode change requests |
17+
| `@SetSessionModel` | Method | Handles model change requests |
18+
19+
## Installation
20+
21+
```xml
22+
<dependency>
23+
<groupId>com.agentclientprotocol</groupId>
24+
<artifactId>acp-annotations</artifactId>
25+
<version>0.9.0</version>
26+
</dependency>
27+
```
28+
29+
## Documentation
30+
31+
- [Annotation-based Agent API](https://springaicommunity.mintlify.app/acp-java-sdk/reference/java#annotation-based-api)
32+
- [Tutorial](https://springaicommunity.mintlify.app/acp-java-sdk/tutorial)

acp-core/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# acp-core
2+
3+
Core implementation of the Agent Client Protocol for Java. Provides client and agent APIs, protocol types, stdio transport, and Project Reactor-based async support.
4+
5+
## Key Classes
6+
7+
| Class | Purpose |
8+
|-------|---------|
9+
| `AcpClient` | Factory — `AcpClient.sync()` and `AcpClient.async()` |
10+
| `AcpAgent` | Factory — `AcpAgent.sync()` and `AcpAgent.async()` |
11+
| `AcpSchema` | All protocol types (requests, responses, updates) |
12+
| `StdioAcpClientTransport` | Launches agent as subprocess, communicates over stdin/stdout |
13+
| `StdioAcpAgentTransport` | Reads from stdin, writes to stdout |
14+
15+
## Installation
16+
17+
```xml
18+
<dependency>
19+
<groupId>com.agentclientprotocol</groupId>
20+
<artifactId>acp-core</artifactId>
21+
<version>0.9.0</version>
22+
</dependency>
23+
```
24+
25+
## Documentation
26+
27+
- [API Reference](https://springaicommunity.mintlify.app/acp-java-sdk/reference/java)
28+
- [Tutorial](https://springaicommunity.mintlify.app/acp-java-sdk/tutorial)

acp-test/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# acp-test
2+
3+
Test utilities for unit testing ACP clients and agents without subprocesses or network connections.
4+
5+
## Key Classes
6+
7+
| Class | Purpose |
8+
|-------|---------|
9+
| `InMemoryTransportPair` | Creates connected client/agent transports in-process |
10+
| `MockAcpAgent` | Records requests, provides configurable responses |
11+
| `MockAcpClient` | Records session updates, handles agent requests |
12+
13+
## Installation
14+
15+
```xml
16+
<dependency>
17+
<groupId>com.agentclientprotocol</groupId>
18+
<artifactId>acp-test</artifactId>
19+
<version>0.9.0</version>
20+
<scope>test</scope>
21+
</dependency>
22+
```
23+
24+
## Usage
25+
26+
```java
27+
var pair = InMemoryTransportPair.create();
28+
29+
// Build client with one side
30+
AcpSyncClient client = AcpClient.sync(pair.clientTransport()).build();
31+
32+
// Build agent with the other
33+
AcpSyncAgent agent = AcpAgent.sync(pair.agentTransport())
34+
.initializeHandler(req -> InitializeResponse.ok())
35+
.promptHandler((req, ctx) -> { /* ... */ })
36+
.build();
37+
```
38+
39+
## Documentation
40+
41+
- [Module 16: In-Memory Testing](https://springaicommunity.mintlify.app/acp-java-sdk/tutorial/16-in-memory-testing)

acp-websocket-jetty/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# acp-websocket-jetty
2+
3+
WebSocket transport for ACP agents using embedded Jetty. Allows agents to accept WebSocket connections from clients instead of using stdio.
4+
5+
## Key Classes
6+
7+
| Class | Purpose |
8+
|-------|---------|
9+
| `WebSocketAcpAgentTransport` | Embedded Jetty WebSocket server for agents |
10+
11+
## Installation
12+
13+
```xml
14+
<dependency>
15+
<groupId>com.agentclientprotocol</groupId>
16+
<artifactId>acp-websocket-jetty</artifactId>
17+
<version>0.9.0</version>
18+
</dependency>
19+
```
20+
21+
## When to Use
22+
23+
Use WebSocket transport when the agent runs as a long-lived server process that multiple clients connect to over the network. For single-client CLI usage, stdio transport (`acp-core`) is simpler.
24+
25+
## Documentation
26+
27+
- [API Reference — Transports](https://springaicommunity.mintlify.app/acp-java-sdk/reference/java#transports)

0 commit comments

Comments
 (0)