Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ book/

run-build.sh
.amazonq/

chat.log
142 changes: 142 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version.workspace = true
license.workspace = true

[dependencies]
agent-client-protocol = "0.7.0"
amzn-codewhisperer-client.workspace = true
amzn-codewhisperer-streaming-client.workspace = true
amzn-consolas-client.workspace = true
Expand Down Expand Up @@ -55,6 +56,7 @@ rmcp = { version = "0.8.0", features = ["client", "transport-async-rw", "transpo
rusqlite.workspace = true
rustls.workspace = true
rustls-native-certs.workspace = true
sacp = "1.0"
schemars = "1.0.4"
semver.workspace = true
serde.workspace = true
Expand Down Expand Up @@ -95,4 +97,3 @@ tracing-test.workspace = true

[lints]
workspace = true

40 changes: 40 additions & 0 deletions crates/agent/src/acp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Agent-Client-Protocol (ACP)

This is an implementation of ACP agent interface using Amazon Q CLI agent

## Features

### Supported
- New Session setup ("session/new")
- Basic chat ("session/prompt" & "session/update")
- Using built-in tool like fs_read and fs_write ("tool_call")
- Request tool call permission ("session/request_permission")

### Not Supported
- Tool call update ("tool_call_update" as part of "session/update")
- Auth
- Slash commands
- MCP
- Cancel
- Session reload

## Usage

### Run ACP Agent (Standalone)
```bash
cargo run -p agent -- acp

# Test it with:
{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":1}}
```

### Run ACP Client (for testing)
```bash
# Build agent first
cargo build -p agent

# Run interactive test client
cargo run -p agent -- acp-client ./target/debug/agent
```

The test client automatically launch the ACP Agent. It provides a REPL interface for sending prompts to the agent and automatically approves tool permissions.
Loading