ADK.Application (ADK v0.0.1-alpha.1)

Copy Markdown View Source

OTP Application for ADK.

Supervision Tree

ADK.Supervisor (rest_for_one)
 ADK.SessionRegistry         Registry for session lookup by {app, user, session_id}
 ADK.Plugin.Registry         Agent storing global plugins
 ADK.Auth.InMemoryStore      Agent for credential storage (dev/test)
 ADK.Artifact.InMemory       Agent for artifact storage (dev/test)
 ADK.Memory.InMemory         ETS-backed memory store (dev/test)
 ADK.Session.Store.InMemory  ETS-backed session persistence
 ADK.SessionSupervisor       DynamicSupervisor for session GenServers
 ADK.RunnerSupervisor        Task.Supervisor for async agent executions
 ADK.Telemetry.SpanStore     ETS-backed debug span storage
 ADK.Workflow.Checkpoint.EtsStore  ETS-backed workflow checkpoints
 ADK.Tool.Approval           GenServer for HITL tool approval (optional)
 ADK.LLM.CircuitBreaker      Circuit breaker for LLM calls
 ADK.LLM.Router              Smart multi-backend LLM router with failover

Uses rest_for_one because sessions depend on the Registry being alive. If the Registry restarts, all sessions must restart to re-register.

Configuration

Optional application env to control which children start:

config :adk,
  start_credential_store: true,   # default true
  start_artifact_store: true,     # default true
  start_circuit_breaker: true,    # default true
  start_llm_router: true,         # default true
  start_approval_server: false,   # default false — enable for HITL in server mode
  circuit_breaker: [              # CircuitBreaker options
    failure_threshold: 5,
    reset_timeout_ms: 60_000
  ],
  llm_router: [                   # LLM Router options
    backends: [],
    fallback_error: :all_backends_failed
  ]