Thank you for your interest in contributing to the ACP Java Client.
Clone the repository and build:
git clone <repository-url>
cd acp
mvn clean packageRun the client against an ACP-compatible agent:
# Default: OpenCode with Zen (no API key needed)
mvn exec:exec -pl client
# With a specific agent and prompt
mvn exec:exec -pl client -DacpAgentBinary="claude-agent-acp" -Dprompt="Say Hello"
# With debug logging to see protocol details
mvn exec:exec -pl client -DlogLevel=DEBUGSee README.md for all available parameters, providers, and logging options.
| Module | Artifact ID | Description |
|---|---|---|
schema |
acp-client-schema |
ACP JSON Schema, generated Java records/enums, and JSonSchemaGenerator |
core |
acp-client-core |
ACP client library (sync and async clients, stdio transport) |
client |
acp-client-cli |
CLI example (AcpAgentCli), skills, and sandbox |
-
Fork the repository and create a branch from
main:git checkout -b my-feature
-
Make your changes and verify the build compiles:
mvn clean package
-
Test your changes against at least one ACP agent:
mvn exec:exec -pl client -Dprompt="Say Hello" -
Commit your changes with a clear message describing what and why:
git commit -m "Add support for XYZ" -
Push your branch and open a pull request against
main.
The schema module includes JSonSchemaGenerator, a custom code generator that produces Java records and enums from the ACP JSON Schema specification. It replaces the need for external tools like jsonschema2pojo.
The ACP JSON schema is located at:
schema/src/main/resources/schema/acp/v1/schema.json
By default, generated classes are written to target/generated-sources under the schema module. This lets you review the generated code before copying or merging it into the main source tree.
The existing (reviewed and manually amended) schema classes live in:
schema/src/main/java/io/quarkiverse/agentclientprotocol/sdk/spec/schema/v1/
The package name io.quarkiverse.agentclientprotocol.sdk.spec.schema.v1 corresponds to the v1 schema directory. When a v2 spec is released, classes would be generated into .schema.v2.
To regenerate the Java classes after updating the schema file, run JSonSchemaGenerator from the schema module:
mvn compile exec:java -Dexec.mainClass=io.quarkiverse.acp.schema.JSonSchemaGenerator -pl schemaGenerated files will be written to schema/target/generated-sources/. Review them and copy into schema/src/main/java/ when ready.
To generate directly into the source tree (overwriting existing classes):
mvn compile exec:java -Dexec.mainClass=io.quarkiverse.acp.schema.JSonSchemaGenerator -pl schema \
-DoutputDir=src/main/javaThe version segment (e.g. v1) is automatically derived from the schema path and appended to the base package. For the default path /schema/acp/v1/schema.json, it generates classes in the io.quarkiverse.agentclientprotocol.sdk.spec.schema.v1 package.
| System property | Description | Default |
|---|---|---|
-DschemaPath |
Classpath resource path to the JSON schema | /schema/acp/v1/schema.json |
-DbasePackage |
Base Java package; version is appended from the schema path | io.quarkiverse.agentclientprotocol.sdk.spec.schema |
-DoutputDir |
Output root directory for generated files | target/generated-sources |
| Schema construct | Java output |
|---|---|
| Object with properties | Java record with @JsonProperty annotations |
String enum ("enum" array) |
Java enum with @JsonValue |
| oneOf with const values | Java enum with @JsonValue |
| String/integer type aliases | Skipped (mapped to String/Integer at call sites) |
| anyOf union types | Skipped (use Object at call sites) |
- Download the latest
schema.jsonfrom the ACP specification - Place it under
schema/src/main/resources/schema/acp/<version>/schema.json(e.g.v2) - Regenerate the classes by pointing to the new schema path:
This automatically generates classes into
mvn compile exec:java -Dexec.mainClass=io.quarkiverse.acp.schema.JSonSchemaGenerator -pl schema \ -DschemaPath=/schema/acp/v2/schema.jsonschema/target/generated-sources/under the.schema.v2package. - Review the generated classes and copy them into
schema/src/main/java/ - Check if any manually amended records (e.g.
SessionConfigOption,SelectedPermissionOutcome) need their custom fields re-applied, as the generator will overwrite them
Note: Some generated records have been manually amended to add fields missing from the schema or to include discriminator properties. After regeneration, check the git diff carefully and re-apply any manual changes.