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

# A2A Config

> Connect to a remote A2A agent using WithA2AConfig and call its skills as tools

Connects to a remote A2A agent using `WithA2AConfig` and `A2A_URL` — skills become tools the LLM can call.

Source: [`examples/agent_with_a2a_config/`](https://github.com/agenticenv/agent-sdk-go/tree/main/examples/agent_with_a2a_config)

## What it demonstrates

* `agent.A2AServers` map with URL, token, skill filters
* Tool names `a2a_<server>_<skillId>`
* Same env as [A2A Client](/examples/a2a-client) — differs only in config vs explicit client

## Run

From `examples/`:

```bash theme={null}
go run ./agent_with_a2a_config
go run ./agent_with_a2a_config "What tools do you have available?"
```

## Local server workflow

1. Terminal 1: `go run ./agent_with_a2a_server`
2. Terminal 2: `export A2A_URL=http://localhost:9999` then run config or client example

Client env vars: `A2A_URL`, optional `A2A_TOKEN`, `A2A_HEADERS`, `A2A_ALLOW_SKILLS`, `A2A_BLOCK_SKILLS` — see [Configuration](/examples/configuration).

## Expected output

With `agent_with_a2a_server` running in terminal 1:

```
I have access to the following skills via a remote agent: echo, weather_lookup,
calculator. What would you like to do?
```

Skills listed depend on what the server advertises in its agent card.

## Learn more

<CardGroup cols={2}>
  <Card title="A2A" icon="network-wired" href="/features/a2a">
    A2A feature documentation
  </Card>

  <Card title="A2A Client" icon="code" href="/examples/a2a-client">
    WithA2AClients variant
  </Card>

  <Card title="A2A Server" icon="server" href="/examples/a2a-server">
    Inbound server example
  </Card>
</CardGroup>
