Package-level declarations

Types

Link copied to clipboard
open class AdkApiServer(config: AdkServerConfig)

The Development UI stays unmounted unless AdkServerConfig.webUiEnabled or the adk.web.ui.enabled property asks for it.

Link copied to clipboard
data class AdkServerConfig(val agentLoader: AgentLoader? = null, val sessionService: SessionService, val artifactService: ArtifactService, val port: Int = DEFAULT_PORT, val host: String = DEFAULT_HOST, val apiServerSpanExporter: ApiServerSpanExporter = ApiServerSpanExporter(), val captureMessageContent: Boolean = false, val plugins: List<Plugin> = emptyList(), val webUiEnabled: Boolean? = null, val camelCaseEnforced: Boolean? = null, val includeAppInfo: Boolean? = null, val appLoader: AppLoader? = null, val allowOrigins: List<String> = emptyList(), val allowRemoteRequests: Boolean? = null, val avatarConfig: AvatarConfig? = null)

What an AdkApiServer or AdkDevServer needs to serve a set of agents over HTTP.

Link copied to clipboard

Marks the /apps/{appName}/app-info endpoint as experimental: its response shape and behavior may change in future releases without prior notice.

Functions

Link copied to clipboard
fun Application.adkApiModule(config: AdkServerConfig)

Installs the ADK agent runtime (health, version, app discovery, sessions, artifacts, the run endpoints including /run_live, and app-info when AdkServerConfig.includeAppInfo or the adk.app.info.enabled property asks for it) with loopback peer and browser-origin guards, installs Ktor WebSockets unless the application already did (install your own WebSockets before this module, or startup fails), registers OpenTelemetry from the standard OTEL_* settings unless the process already has one, and flushes AdkServerConfig.sessionService and buffered telemetry when the application stops, waiting up to 3 seconds for a flush that honors cancellation. Your own WebSockets should set maxFrameSize to at most 16 MiB and bound its outgoing channel: Ktor reads a socket's first frames with the plugin's cap, before /run_live sets its own.