Skip to main content

Overview

Strands Agents 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:
uv add "strands-agents[a2a]" "strands-agents-tools[a2a_client]"
Strands pins the a2a-sdk 0.3 line, which matches StackOne’s A2A server, so no extra version handling is needed.

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.
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 for details on obtaining your API key and account ID.
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.

Choosing a model

Strands defaults to Amazon Bedrock, but you can use any supported provider. For example, with OpenAI:
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 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:
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

A2A SDK

Build custom A2A tools with the Python or JavaScript SDK

Authentication

Learn about authentication and security

Quickstart

Learn A2A basics with cURL