Package-level declarations
Types
Entry points for calling the suspending and Flow-returning parts of the ADK from Java, and for bridging a Flow to Reactive Streams.
Java-friendly base for implementing an ArtifactService. The engine's methods are suspend; a Java subclass returns CompletableFutures instead. Return each future promptly and do any blocking work inside it, not before returning it.
Java-friendly base for implementing a MemoryService. The engine's methods are suspend; a Java subclass returns CompletableFutures instead. addEventsToMemoryAsync and addMemoryAsync are optional -- their default throws UnsupportedOperationException (as the engine does), so override them only if the service supports those writes. Return each future promptly and do any blocking work inside it, not before returning it.
Java-friendly base for implementing a Plugin -- the cross-cutting interception point. The engine's Plugin has 12 suspend callbacks plus close(), every one with a default body. This base final-overrides all 12 and re-exposes each as a CompletableFuture-returning hook whose result is the outcome; each default hook completes with the value that leaves execution unchanged. Return the future promptly and do any blocking work inside it, not before returning it.
Java-friendly base for implementing a SessionService. Every method of the engine interface is suspend; this base final-overrides each and asks the Java subclass for a CompletableFuture instead. Return each future promptly and do any blocking work inside it, not before returning it. The two methods with default bodies (closeSession, appendEvent) keep those defaults reachable: leave the hook unoverridden and the engine's own behaviour runs.
Java-friendly base for implementing a BaseTool asynchronously. A Java subclass overrides declaration and runAsync, which returns a CompletableFuture; this base awaits it to satisfy the suspend run contract that Java cannot express.
Java-friendly base for implementing a Toolset -- a dynamically resolved group of tools. Both engine methods are suspend; a Java subclass returns CompletableFutures instead. Return each future promptly and do any blocking work inside it, not before returning it. processLlmRequest defaults to returning the request unchanged; override processLlmRequestAsync to rewrite it.
Java-friendly base for implementing a BaseAgent. A Java subclass overrides runAsyncImplJava, which returns a Reactive Streams Publisher of the turn's events; this base adapts it to the Flow-returning runAsyncImpl contract that Java cannot express. The publisher is subscribed to lazily and honours backpressure.
Java-friendly base for implementing a Model. A Java subclass overrides generateContentJava, which returns a Reactive Streams Publisher; this base adapts it to the Flow-returning generateContent contract that Java cannot express. Both the unary and streaming cases flow through the one method, exactly as they do for a Kotlin Model.
Java factories for the sealed CallbackChoice.
Java-friendly adapters for the engine's callback interfaces.
Java-friendly wrapper around a Runner. A run is exposed as a Reactive Streams Publisher of events, so Java callers never touch Flow; collect it with AsyncJavaHelpers.collect/forEach or any Reactive Streams consumer. Session management is not a runner concern -- reach the session service via asKotlinRunner().sessionService (or wrap it in a BaseFutureSessionService).
Builds a BaseTool from a Tool-annotated Java method, the reflective counterpart of the engine's KSP @Tool path (which needs the Kotlin compiler and so is closed to a javac-only build). It reads the same Tool/Param annotations, relying on Param.name/Param.required because Java retains neither parameter names nor nullability. JVM-only and intended for javac-only modules; prefer the KSP @Tool path whenever the code is built with the Kotlin compiler, which processes .java sources too.