A2A Protocol Client Tool for LangGraph
Project description
LangGraph A2A Client
A2A (Agent-to-Agent) Protocol Client Tool for LangGraph.
Overview
This library provides functionality to discover and communicate with A2A-compliant agents in LangGraph applications.
Key Features
- Agent discovery through agent cards from multiple URLs
- Message sending to specific A2A agents
- LangChain tool integration for easy use in LangGraph workflows
Installation
pip install langgraph-a2a-client
Or with uv:
uv add langgraph-a2a-client
Usage
from langgraph_a2a_client import A2AClientToolProvider
# Initialize the A2A client
a2a_client = A2AClientToolProvider(
known_agent_urls=["https://example.com/agent"],
timeout=300,
webhook_url="https://your-webhook.com/notify",
webhook_token="your-webhook-token"
)
# Get the tools for use in LangGraph
tools = a2a_client.tools
# Use in your LangGraph application
# ...
API
A2AClientToolProvider
Main class that provides A2A client functionality.
Parameters
known_agent_urls(list[str] | None): List of A2A agent URLs to discover initiallytimeout(int): Timeout for HTTP operations in seconds (default: 300)webhook_url(str | None): Optional webhook URL for push notificationswebhook_token(str | None): Optional authentication token for webhook notifications
Tools
The provider exposes three tools:
- a2a_discover_agent: Discover an A2A agent and return its agent card
- a2a_list_discovered_agents: List all discovered A2A agents and their capabilities
- a2a_send_message: Send a message to a specific A2A agent
Examples
Basic Usage
uv run examples/basic_usage.py
Supervisor Agent Example
export OPENAI_API_KEY="your-openai-api"
uv run --extra examples examples/supervisor_agent.py
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langgraph_a2a_client-0.1.0.tar.gz.
File metadata
- Download URL: langgraph_a2a_client-0.1.0.tar.gz
- Upload date:
- Size: 96.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3397c9b6f08a7154fc4498b33d7411ddc40e73b9b4503e863de67dcec97f525
|
|
| MD5 |
faac4ca2e2b8684a9511366e4225141a
|
|
| BLAKE2b-256 |
9fba0befa650e2411c87db69d42300ad0ad15777a97067e4da3619ed01122e7d
|
File details
Details for the file langgraph_a2a_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langgraph_a2a_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a4ac8a0e58fdb19699e7f1820c53090f3498854d77776b0e31aa66eee5f100b
|
|
| MD5 |
9489edec58ed23e27809eaed3e042efb
|
|
| BLAKE2b-256 |
673b96394495fa683ddd7ece2362a800dfb681eb9a8d21eb97e1a808f1078a2c
|