Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.5 KB

File metadata and controls

44 lines (31 loc) · 1.5 KB

AgentContextOS — Java SDK

The Java SDK is generated from the gateway's two contracts:

The generated source is a build artifact (gitignored), produced on demand.

Generate

From the repo root, with buf and openapi-generator-cli (+ a JDK 17+) installed:

task sdk:gen           # both halves, all languages
task sdk:gen-openapi   # just the REST client
task sdk:gen-proto     # just the gRPC stubs

This writes:

  • sdks/java/generated/ — the REST client (Maven/Gradle project, coordinates com.agentcontextos:agentcontextos-sdk).
  • sdks/java/lib/src/main/java/… — the generated protobuf + gRPC stubs.

Use (after generating)

import com.agentcontextos.sdk.api.QueriesApi;
import com.agentcontextos.sdk.ApiClient;

Identity follows the same model as the other SDKs (Bearer token / dev headers for header-identity routes; body identity for query / retrieve / agent).

See docs/reference/sdks.md and docs/architecture/sdk-generation.md.