> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# A2A integration

The A2A (Agent2Agent) protocol lets A2A-compatible clients or other Agents invoke a Forward Template. Forward supports protocol versions 0.3 and 1.0, using JSON-RPC and SSE for streaming responses.

## 1. Enable A2A access for a Template

Use [Update a template](/cloud-agents/api/forward/templates/update#a2a) to set `a2a.enabled` to `true` and configure the description and capabilities shown in the Agent Card:

`POST /api/v1/forward/templates/{template_id}`

```json
{
  "a2a": {
    "enabled": true,
    "description": "Summarize text and extract action items",
    "skills": [
      {
        "id": "summary",
        "name": "Text summarization",
        "description": "Summarize text provided by the caller",
        "tags": ["summary"],
        "examples": ["Summarize these meeting notes"]
      }
    ]
  }
}
```

A2A is disabled by default. `skills` describes the task capabilities shown in the Agent Card. For field details, see [Create a template — A2A](/cloud-agents/api/forward/templates/create#a2a).

You can also enable A2A, configure the description and capabilities, and save them in the Template's **Integration → A2A** section in the console.

## 2. Get the Agent Card URL

The Agent Card URL has a fixed format and can be constructed directly from the API base URL, Template ID, and authentication method.

When using a PAT, specify the runtime Identity in the URL:

```text
<API_BASE_URL>/api/v1/forward/templates/{template_id}/a2a/agent-card.json?identity_id={identity_id}
```

When using a SAT, the Agent Card URL is:

```text
<API_BASE_URL>/api/v1/forward/templates/{template_id}/a2a/agent-card.json
```

Replace `{template_id}` and `{identity_id}` with the actual IDs. URL-encode the `identity_id` query parameter. The client reads the invocation URL from the returned Agent Card.

You can also copy the Agent Card URL from the Template's **Integration → A2A** section in the console, or use **Check Agent Card** to confirm that the Card is accessible.

## 3. Configure the client

| Setting          | Description                                                                                                                           |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Agent Card URL   | The URL constructed as above or copied from the console. Authentication credentials are required when retrieving the Card.            |
| Authentication   | `Authorization: Bearer <PAT or SAT>` is required for both Card retrieval and subsequent calls.                                        |
| Protocol version | Select with `A2A-Version: 0.3` or `A2A-Version: 1.0`. Defaults to 0.3 when omitted. The client must use the matching protocol format. |
| Runtime Identity | With a PAT, specify it through `identity_id` in the Card URL. The returned invocation URL preserves this parameter.                   |

The caller must have access to the target Workspace, Template, and runtime Identity. For token acquisition and usage requirements, see [Authentication](/cloud-agents/api/conventions/authentication).

## Integration notes

- Disabling Template A2A retains the Card configuration and rejects new calls, but does not automatically cancel accepted tasks.
- A disconnected network or request timeout does not mean that the task was canceled. Save the Task ID to query the task or resubscribe. A2A subscriptions return the current task snapshot and subsequent updates; replaying historical events with `Last-Event-ID` is not supported.
- Message sending, streaming output, task queries, cancellation, and subscriptions are supported. Task listing is only available in 1.0. Push Notifications and Extended Agent Card are not supported.

## Official protocol documentation

- [Official A2A specification](https://a2a-protocol.org/latest/specification/)
- [A2A 0.3 specification](https://a2a-protocol.org/v0.3.0/specification/)
