Class RemoteAgentOptions

java.lang.Object
com.google.genkit.client.RemoteAgentOptions

public final class RemoteAgentOptions extends Object
Options for configuring a RemoteAgent HTTP client.

Build with builder().

  • url() — the agent turn endpoint (e.g. http://host:8080/myAgent).
  • getSnapshotUrl() — companion snapshot endpoint; defaults to url + "/getSnapshot".
  • abortUrl() — companion abort endpoint; defaults to url + "/abort".
  • headers() — optional extra request headers.
  • serverManaged() — whether state is server-managed; default true.
  • Method Details

    • builder

      public static RemoteAgentOptions.Builder builder()
      Creates a builder for RemoteAgentOptions.
      Returns:
      a new builder
    • url

      public String url()
      Returns the agent turn endpoint URL.
      Returns:
      the URL
    • getSnapshotUrl

      public String getSnapshotUrl()
      Returns the companion getSnapshot URL (defaults to url + "/getSnapshot").
      Returns:
      the getSnapshot URL
    • abortUrl

      public String abortUrl()
      Returns the companion abort URL (defaults to url + "/abort").
      Returns:
      the abort URL
    • headers

      public Map<String,String> headers()
      Returns extra HTTP request headers sent on every request.
      Returns:
      an unmodifiable map of headers (never null)
    • serverManaged

      public boolean serverManaged()
      Returns whether the agent is server-managed (default true).
      Returns:
      true if server-managed