Class A2aSendRequest

java.lang.Object
com.xebialabs.xlrelease.a2a.api.views.A2aSendRequest

public final class A2aSendRequest extends Object
A request to send one message to an external A2A agent through the governed gateway.

Deliberately protocol-shaped, not protocol-typed: plain Java values only, so callers depend on this class and never on A2A wire or SDK types. Immutable.

  • Constructor Details

    • A2aSendRequest

      public A2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String,Object> metadata, String bearerToken, String callbackTaskId)
      Parameters:
      agentCardUrl - the agent's base URL or its Agent Card URL. The gateway resolves the card at <base>/.well-known/agent-card.json unless the value already ends in .json. Must be on the configured agent allowlist.
      skillId - the advertised skill this message is aimed at; sent as message metadata so the remote agent can route. May be null for single-skill agents.
      text - the instruction / payload, sent as a single text part. Required.
      contextId - A2A context to continue, or null to let the remote agent open one.
      taskId - remote task to continue (e.g. answering input-required), or null to start new work.
      metadata - extra message metadata (e.g. governance fields such as a change reference); null is treated as empty.
      bearerToken - static bearer token for the remote agent, or null for anonymous access. Never logged.
      callbackTaskId - the id of the Release task waiting on this exchange, or null. When set, the gateway attaches a push-notification callback so the remote agent can wake the waiting task instead of being polled.
    • A2aSendRequest

      public A2aSendRequest(String agentCardUrl, String skillId, String text, String contextId, String taskId, Map<String,Object> metadata, String bearerToken)
      Binary-compatibility constructor for bundles built before push-notification support.
  • Method Details

    • of

      public static A2aSendRequest of(String agentCardUrl, String skillId, String text)
      Starts new work at an agent: no context, no task, no metadata, no credentials.
    • getAgentCardUrl

      public String getAgentCardUrl()
    • getSkillId

      public String getSkillId()
    • getText

      public String getText()
    • getContextId

      public String getContextId()
    • getTaskId

      public String getTaskId()
    • getMetadata

      public Map<String,Object> getMetadata()
      Never null; immutable.
    • getBearerToken

      public String getBearerToken()
    • getCallbackTaskId

      public String getCallbackTaskId()
      The waiting Release task to wake via callback, or null.