Class ResumabilityConfig

java.lang.Object
com.google.adk.apps.ResumabilityConfig

@Experimental public abstract class ResumabilityConfig extends Object
Resumability config for every agent in an app: pause on a long-running call and resume from the last event.

The two flags select different resumption flows and are mutually exclusive: isResumable() checkpoints agent state and resumes from it, isPlainTextContinuationAutoResume() selects the deprecated legacy flow, and with neither set the app never pauses.

Experimental: resume is best-effort and at-least-once, so a resuming tool must be idempotent and in-memory state is lost on resumption.

  • Constructor Details

    • ResumabilityConfig

      public ResumabilityConfig()
  • Method Details

    • isResumable

      public abstract boolean isResumable()
      Whether the app supports agent resumption, checkpointing agent state as it runs.
    • isPlainTextContinuationAutoResume

      @Deprecated public abstract boolean isPlainTextContinuationAutoResume()
      Deprecated.
      Back-compat shim for callers that deliver a resume as a plain-text turn; migrate to Runner.runAsync(userId, sessionId, invocationId, message, runConfig, stateDelta) or answer the paused call with a function response, and set isResumable() instead; this flag will be removed.
      Whether a plain-text runAsync continuation -- a user message that is not a function response -- resumes the last unfinished invocation instead of starting a new one; off by default.

      Selects the legacy resumption flow, which reconstructs the resume point from session events and never persists agent state; mutually exclusive with isResumable().

    • builder

      public static ResumabilityConfig.Builder builder()