Skip to main content
Retrieves the current state of an A2A task directly from the agent’s endpoint via the ServiceNet gateway. Use this to poll a long-running task that was started by a previous invoke or invoke-async call. The gateway proxies an A2A tasks/get JSON-RPC call to the agent endpoint and returns the response wrapped in the standard InvokeAgentResponse envelope.

Request

Path parameters

string
required
The unique identifier of the agent that owns the task.
string
required
The A2A task identifier returned by the agent during the original invocation.

Body parameters

integer
Number of historical message turns to include in the response. Defaults to 10 if omitted.
string
Bearer token or API key to forward to the agent endpoint for authentication.
string (UUID)
Reference to a stored auth context. The gateway decrypts and forwards the credential on your behalf.

Response

Returns an InvokeAgentResponse reflecting the current task state.
string
The agent that owns the task.
string
Task execution status as reported by the agent (e.g. "running", "completed", "failed").
string (UUID)
Execution receipt identifier. Omitted if not yet persisted.
string
The A2A task identifier echoed from the path parameter.
string
A2A context identifier, if the agent returned one.
string
Human-readable status message from the agent, if provided.
object
Structured output from the agent. Populated once the task completes.
object
Normalized settlement information, if applicable.
object
Payment receipt from the settlement rail, if a payment occurred.
object
The raw A2A JSON-RPC response returned by the agent endpoint.

Status codes

Example response