Repository navigation
Java host SDK for the Agent Control Specification (FFM over the Rust C ABI): interest, and is the C ABI public? #4273
Replies: 2 comments
|
Thanks for building this and for asking before opening the PR. Answers in order.
Open the RFC issue when ready and link this thread. I will review it within the week. |
Uh oh!
There was an error while loading. Please reload this page.
We run a Spring Boot report generator on the JVM in which an LLM may call MCP tools, and we want ACS to mediate those calls (
pre_tool_call, with adenythat carriesapprovalleading to human approval). There is no Java SDK today, so we built one. Before opening a PR we would like to know whether it is welcome and in what shape.What we built (working, not yet public):
policy-engine/sdk/java, a Java SDK that binds the Rust host C ABI (sdk/rust/src/ffi.rs, the same one the .NET SDK uses) with the Foreign Function & Memory API (java.lang.foreign, final in Java 22; language level 25, no JNI glue, no native code in the SDK). It mirrors the .NET API:AgentControl(evaluate*for each intervention point,run/runModel/runTool),NativeRuntime,ArtifactValidator, hostAnnotatorDispatcher/PolicyDispatcherthrough upcall stubs, approval resolution bound to the engine's action identity, transform splicing.tests/conformance/cases) passes 24 of 25 cases through the binding (the 25th is Rust-only). We would addjavatosdk_support, the schema andrun_parity.pyin the same PR.Questions
policy-engine/sdk/java(next todotnet), or do you prefer a standalone folder such asagent-governance-java/?acs_*functions as they are today.--features opa,bundled-dispatchersand runs Gradle on JDK 25. Is a newjavajob inworkflows.tomlacceptable?We understand the CLA and the DCO (commits are signed off) and can open the PR once the direction is agreed.
All reactions