Self-healing Python client for Tools for Agents — M2M / A2A API
Project description
AgentTools Python Client
Self-healing reference SDK for Tools for Agents — M2M / A2A.
Install
pip install agenttools-client
# or from repo:
pip install -e ./agenttools_client
Requires Python 3.10+ and httpx.
Features
| Feature | Description |
|---|---|
| Auto auth | AGENTTOOLS_API_KEY or POST /v1/register {} |
| 422 self-heal | Matches /v1/tools/{tool}/examples by missing fields[] |
| 5xx retry | Honors Retry-After / retry_after_sec |
| A2A-first | client.a2a.advisor(), run_chain(), run_mission() |
| Typed helpers | extract(), ingest(), dry_run(), advisor() |
Quick start
import asyncio
from agenttools_client import AsyncAgentToolsClient
async def main():
async with AsyncAgentToolsClient() as client:
plan = await client.advisor("Extract markdown from a blog URL")
page = await client.extract("https://example.com")
chain = await client.run_chain("article_read", {"url": "https://example.com"})
# A2A orchestrators:
skill = await client.a2a.advisor("Summarize a PDF for RAG")
asyncio.run(main())
A2A (preferred for multi-agent orchestrators)
async with AsyncAgentToolsClient() as client:
skills = await client.a2a.list_skills()
result = await client.a2a.run_chain("pdf_summary", {"url": "https://example.com/x.pdf"})
mission = await client.a2a.run_mission("Research solid-state batteries")
Agent Card: GET https://api.toolsforagents.tools/.well-known/agent-card.json
Self-healing 422
Wrong body → SDK fetches examples, picks best match for missing fields, retries once:
await client.json("POST", "/v1/conflict/detect", json={}) # auto-fixes to documents[]
Environment
| Variable | Default |
|---|---|
AGENTTOOLS_API_KEY |
— |
AGENTTOOLS_API_URL |
https://api.toolsforagents.tools |
Publish (maintainers)
See PUBLISH.md.
License
MIT
Project details
Release history Release notifications | RSS feed
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 agenttools_client-0.2.0.tar.gz.
File metadata
- Download URL: agenttools_client-0.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1c7c8083df2ff3217a8f454fb8557cc67ff70ac01b1f40b7f621d6d61e29ff1
|
|
| MD5 |
e9396c9f2ea9d755b10468d68dcedc10
|
|
| BLAKE2b-256 |
e9cca672f0b5c699d7257840fe1e5eed58b187127bbd2081c60b9c3581ee5f68
|
File details
Details for the file agenttools_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agenttools_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31a97c3e7f162b6eba56a3fd19c4526e09c5676883ab05acc2856b7e557a8c33
|
|
| MD5 |
76ff69d287433524dd2e6d1df16b9219
|
|
| BLAKE2b-256 |
e7ef3a4445b86a0733c7d60845310d028b2da9892919ff70f18bfe4f2b2d3aad
|