Skip to content

Commit 9c5b5b9

Browse files
jer96jer
andauthored
refactor(a2a): rename dependency target and update docs (#125)
Co-authored-by: jer <[email protected]>
1 parent 1859e73 commit 9c5b5b9

File tree

2 files changed

+37
-17
lines changed

2 files changed

+37
-17
lines changed

README.md

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<a href="https://pypi.org/project/strands-agents-tools/"><img alt="PyPI version" src="https://img.shields.io/pypi/v/strands-agents-tools"/></a>
2222
<a href="https://python.org"><img alt="Python versions" src="https://img.shields.io/pypi/pyversions/strands-agents-tools"/></a>
2323
</div>
24-
24+
2525
<p>
2626
<a href="https://strandsagents.com/">Documentation</a>
2727
◆ <a href="https://github.com/strands-agents/samples">Samples</a>
@@ -93,6 +93,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
9393

9494
| Tool | Agent Usage | Use Case |
9595
|------|-------------|----------|
96+
| a2a_client | `provider = A2AClientToolProvider(known_agent_urls=["http://localhost:9000"]); agent = Agent(tools=provider.tools)` | Discover and communicate with A2A-compliant agents, send messages between agents |
9697
| file_read | `agent.tool.file_read(path="path/to/file.txt")` | Reading configuration files, parsing code files, loading datasets |
9798
| file_write | `agent.tool.file_write(path="path/to/file.txt", content="file content")` | Writing results to files, creating new files, saving output data |
9899
| editor | `agent.tool.editor(command="view", path="path/to/file.py")` | Advanced file operations like syntax highlighting, pattern replacement, and multi-file edits |
@@ -330,6 +331,25 @@ result = agent.tool.use_browser(actions=[
330331
])
331332
```
332333

334+
### A2A Client
335+
336+
```python
337+
from strands import Agent
338+
from strands_tools.a2a_client import A2AClientToolProvider
339+
340+
# Initialize the A2A client provider with known agent URLs
341+
provider = A2AClientToolProvider(known_agent_urls=["http://localhost:9000"])
342+
agent = Agent(tools=provider.tools)
343+
344+
# Use natural language to interact with A2A agents
345+
response = agent("discover available agents and send a greeting message")
346+
347+
# The agent will automatically use the available tools:
348+
# - discover_agent(url) to find agents
349+
# - list_discovered_agents() to see all discovered agents
350+
# - send_message(message_text, target_agent_url) to communicate
351+
```
352+
333353
## 🌍 Environment Variables Configuration
334354

335355
Agents Tools provides extensive customization through environment variables. This allows you to configure tool behavior without modifying code, making it ideal for different environments (development, testing, production).
@@ -350,7 +370,7 @@ These variables affect multiple tools:
350370

351371
#### Calculator Tool
352372

353-
| Environment Variable | Description | Default |
373+
| Environment Variable | Description | Default |
354374
|----------------------|-------------|---------|
355375
| CALCULATOR_MODE | Default calculation mode | evaluate |
356376
| CALCULATOR_PRECISION | Number of decimal places for results | 10 |
@@ -363,13 +383,13 @@ These variables affect multiple tools:
363383

364384
#### Current Time Tool
365385

366-
| Environment Variable | Description | Default |
386+
| Environment Variable | Description | Default |
367387
|----------------------|-------------|---------|
368388
| DEFAULT_TIMEZONE | Default timezone for current_time tool | UTC |
369389

370390
#### Sleep Tool
371391

372-
| Environment Variable | Description | Default |
392+
| Environment Variable | Description | Default |
373393
|----------------------|-------------|---------|
374394
| MAX_SLEEP_SECONDS | Maximum allowed sleep duration in seconds | 300 |
375395

@@ -403,13 +423,13 @@ The Mem0 Memory Tool supports three different backend configurations:
403423

404424
#### Memory Tool
405425

406-
| Environment Variable | Description | Default |
426+
| Environment Variable | Description | Default |
407427
|----------------------|-------------|---------|
408428
| MEMORY_DEFAULT_MAX_RESULTS | Default maximum results for list operations | 50 |
409429
| MEMORY_DEFAULT_MIN_SCORE | Default minimum relevance score for filtering results | 0.4 |
410430
#### Nova Reels Tool
411431

412-
| Environment Variable | Description | Default |
432+
| Environment Variable | Description | Default |
413433
|----------------------|-------------|---------|
414434
| NOVA_REEL_DEFAULT_SEED | Default seed for video generation | 0 |
415435
| NOVA_REEL_DEFAULT_FPS | Default frames per second for generated videos | 24 |
@@ -418,27 +438,27 @@ The Mem0 Memory Tool supports three different backend configurations:
418438

419439
#### Python REPL Tool
420440

421-
| Environment Variable | Description | Default |
441+
| Environment Variable | Description | Default |
422442
|----------------------|-------------|---------|
423443
| PYTHON_REPL_BINARY_MAX_LEN | Maximum length for binary content before truncation | 100 |
424444

425445
#### Shell Tool
426446

427-
| Environment Variable | Description | Default |
447+
| Environment Variable | Description | Default |
428448
|----------------------|-------------|---------|
429449
| SHELL_DEFAULT_TIMEOUT | Default timeout in seconds for shell commands | 900 |
430450

431451
#### Slack Tool
432452

433-
| Environment Variable | Description | Default |
453+
| Environment Variable | Description | Default |
434454
|----------------------|-------------|---------|
435455
| SLACK_DEFAULT_EVENT_COUNT | Default number of events to retrieve | 42 |
436456
| STRANDS_SLACK_AUTO_REPLY | Enable automatic replies to messages | false |
437457
| STRANDS_SLACK_LISTEN_ONLY_TAG | Only process messages containing this tag | None |
438458

439459
#### Speak Tool
440460

441-
| Environment Variable | Description | Default |
461+
| Environment Variable | Description | Default |
442462
|----------------------|-------------|---------|
443463
| SPEAK_DEFAULT_STYLE | Default style for status messages | green |
444464
| SPEAK_DEFAULT_MODE | Default speech mode (fast/polly) | fast |
@@ -448,21 +468,21 @@ The Mem0 Memory Tool supports three different backend configurations:
448468

449469
#### Editor Tool
450470

451-
| Environment Variable | Description | Default |
471+
| Environment Variable | Description | Default |
452472
|----------------------|-------------|---------|
453473
| EDITOR_DIR_TREE_MAX_DEPTH | Maximum depth for directory tree visualization | 2 |
454474
| EDITOR_DEFAULT_STYLE | Default style for output panels | default |
455475
| EDITOR_DEFAULT_LANGUAGE | Default language for syntax highlighting | python |
456476

457477
#### Environment Tool
458478

459-
| Environment Variable | Description | Default |
479+
| Environment Variable | Description | Default |
460480
|----------------------|-------------|---------|
461481
| ENV_VARS_MASKED_DEFAULT | Default setting for masking sensitive values | true |
462482

463483
#### File Read Tool
464484

465-
| Environment Variable | Description | Default |
485+
| Environment Variable | Description | Default |
466486
|----------------------|-------------|---------|
467487
| FILE_READ_RECURSIVE_DEFAULT | Default setting for recursive file searching | true |
468488
| FILE_READ_CONTEXT_LINES_DEFAULT | Default number of context lines around search matches | 2 |
@@ -474,7 +494,7 @@ The Mem0 Memory Tool supports three different backend configurations:
474494

475495
#### Use Browser Tool
476496

477-
| Environment Variable | Description | Default |
497+
| Environment Variable | Description | Default |
478498
|----------------------|-------------|---------|
479499
| STRANDS_DEFAULT_WAIT_TIME | Default setting for wait time with actions | 1 |
480500
| STRANDS_BROWSER_MAX_RETRIES | Default number of retries to perform when an action fails | 3 |

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ mem0_memory = [
7979
"opensearch-py>=2.8.0,<3.0.0",
8080
]
8181
use_browser = ["nest-asyncio>=1.5.0,<2.0.0", "playwright>=1.42.0,<2.0.0"]
82-
a2a = ["a2a-sdk>=0.2.6"]
82+
a2a_client = ["a2a-sdk[sql]>=0.2.11"]
8383

8484
[tool.hatch.envs.hatch-static-analysis]
85-
features = ["mem0_memory", "use_browser", "a2a"]
85+
features = ["mem0_memory", "use_browser", "a2a_client"]
8686
dependencies = [
8787
"strands-agents>=0.1.0,<1.0.0",
8888
"mypy>=0.981,<1.0.0",
@@ -101,7 +101,7 @@ lint-check = [
101101
lint-fix = ["ruff check --fix"]
102102

103103
[tool.hatch.envs.hatch-test]
104-
features = ["mem0_memory", "use_browser", "a2a"]
104+
features = ["mem0_memory", "use_browser", "a2a_client"]
105105
extra-dependencies = [
106106
"moto>=5.1.0,<6.0.0",
107107
"pytest>=8.0.0,<9.0.0",

0 commit comments

Comments
 (0)