Jv
Java SDK
Planned · Q3 2026In development — not yet published
Not available yet
The Java SDK is on the roadmap for Q3 2026. It will target Java 21 with records, Bouncy Castle crypto, SagaEngine, a Spring AI bridge, and Maven Central distribution. Join Discord to be notified when it ships.
Until the native SDK ships, any Aroha-compatible agent is callable from Java directly over HTTP — the protocol is plain JSON over POST /aroha/v1.
Call any Aroha agent from Java today
import java.net.URI;
import java.net.http.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.Map;
public class ArohaClient {
private static final ObjectMapper JSON = new ObjectMapper();
public static Map<?, ?> callAgent(String endpoint, String capability, Object params)
throws Exception {
var envelope = Map.of(
"type", "ArohaRequest",
"from", "did:aroha:my-java-client",
"to", "did:aroha:target-agent",
"correlationId", "req-001",
"issuedAt", "2026-08-01T00:00:00Z",
"nonce", "abc123",
"body", Map.of("capability", capability, "params", params),
"signature", "TODO-ed25519"
);
var body = HttpRequest.BodyPublishers.ofString(JSON.writeValueAsString(envelope));
var req = HttpRequest.newBuilder()
.uri(URI.create(endpoint + "/aroha/v1"))
.header("Content-Type", "application/json")
.POST(body).build();
var resp = HttpClient.newHttpClient()
.send(req, HttpResponse.BodyHandlers.ofString());
return JSON.readValue(resp.body(), Map.class);
}
public static void main(String[] args) throws Exception {
var result = callAgent("https://my-agent.fly.dev", "search-flights",
Map.of("origin", "JFK", "destination", "NRT", "date", "2026-08-01"));
System.out.println(result);
}
}