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

# Strands Agents

> Build agents in Strands Agents (AWS) that call StackOne's A2A agents using the A2A client tools.

## Overview

[Strands Agents](https://strandsagents.com/) is AWS's open-source SDK for building AI agents. It has built-in A2A client support: the `A2AClientToolProvider` exposes tools that discover and call remote A2A agents like StackOne's, so your Strands agent can search and execute StackOne actions across your connected SaaS applications.

Use Strands to build agents that:

* Discover and connect to StackOne's A2A agents
* Send messages and receive responses
* Orchestrate StackOne actions alongside your own tools

## Installation

Install Strands with A2A support using `uv`:

```bash theme={null}
uv add "strands-agents[a2a]" "strands-agents-tools[a2a_client]"
```

<Note>
  Strands pins the `a2a-sdk` 0.3 line, which matches StackOne's A2A server, so no extra version handling is needed.
</Note>

## Quick Start

`A2AClientToolProvider` takes the StackOne agent URL and the auth headers. The headers (your API key as HTTP Basic, plus the account ID) are sent on every request, including the agent-card fetch.

```python theme={null}
import base64
from strands import Agent
from strands_tools.a2a_client import A2AClientToolProvider

STACKONE_API_KEY = "<stackone_api_key>"
STACKONE_ACCOUNT_ID = "<account_id>"
BASE64_API_KEY = base64.b64encode(f"{STACKONE_API_KEY}:".encode()).decode()

# Point Strands at the StackOne A2A agent; auth travels on every request.
provider = A2AClientToolProvider(
    known_agent_urls=["https://a2a.stackone.com"],
    httpx_client_args={
        "headers": {
            "Authorization": f"Basic {BASE64_API_KEY}",
            "x-account-id": STACKONE_ACCOUNT_ID,
        }
    },
)

# Strands uses Amazon Bedrock by default; configure any supported model provider.
agent = Agent(tools=provider.tools)

result = agent("List the first 5 employees")
print(result)
```

See [Authentication](/a2a/auth-security) for details on obtaining your API key and account ID.

<Note>
  `A2AClientToolProvider` adds three tools to your agent: `a2a_discover_agent`, `a2a_list_discovered_agents`, and `a2a_send_message`. The model uses them to find the StackOne agent and send it messages; StackOne runs the search-and-execute tools on its side.
</Note>

## Choosing a model

Strands defaults to Amazon Bedrock, but you can use any supported provider. For example, with OpenAI:

```python theme={null}
import base64
from strands import Agent
from strands.models.openai import OpenAIModel
from strands_tools.a2a_client import A2AClientToolProvider

STACKONE_API_KEY = "<stackone_api_key>"
STACKONE_ACCOUNT_ID = "<account_id>"
BASE64_API_KEY = base64.b64encode(f"{STACKONE_API_KEY}:".encode()).decode()

provider = A2AClientToolProvider(
    known_agent_urls=["https://a2a.stackone.com"],
    httpx_client_args={"headers": {"Authorization": f"Basic {BASE64_API_KEY}", "x-account-id": STACKONE_ACCOUNT_ID}},
)

model = OpenAIModel(client_args={"api_key": "<openai_api_key>"}, model_id="gpt-4o-mini")
agent = Agent(model=model, tools=provider.tools)
print(agent("List the first 5 employees"))
```

See the [Strands model providers](https://strandsagents.com/) documentation for the full list.

## Multiple StackOne accounts

To span more than one account, either pass several account IDs in the `x-account-id` header (comma-separated), or create a separate provider per account:

```python theme={null}
def stackone_provider(account_id: str) -> A2AClientToolProvider:
    return A2AClientToolProvider(
        known_agent_urls=["https://a2a.stackone.com"],
        httpx_client_args={
            "headers": {
                "Authorization": f"Basic {BASE64_API_KEY}",
                "x-account-id": account_id,
            }
        },
    )

hibob_agent = Agent(tools=stackone_provider("<hibob_account_id>").tools)
workday_agent = Agent(tools=stackone_provider("<workday_account_id>").tools)
```

## Next Steps

<CardGroup cols={2}>
  <Card title="A2A SDK" icon="code" href="/a2a/a2a-sdk">
    Build custom A2A tools with the Python or JavaScript SDK
  </Card>

  <Card title="Authentication" icon="shield" href="/a2a/auth-security">
    Learn about authentication and security
  </Card>

  <Card title="Quickstart" icon="rocket" href="/a2a/quickstart">
    Learn A2A basics with cURL
  </Card>
</CardGroup>
