traia-iatp
Inter-Agent Transfer Protocol (IATP) - Enable AI Agents to utilize other AI Agents as tools
What it is and what it does
IATP-D402 is a framework that layers HTTP 402 Payment Required protocol support onto web services, MCP servers, and AI agents, allowing them to charge for API calls using blockchain payments. It provides middleware for FastAPI, Starlette, and ASGI frameworks, plus client libraries for making authenticated payments automatically. The package integrates with CrewAI, MCP (Model Context Protocol), and A2A (agent-to-agent) protocols, enabling AI agents to monetize their services and pay for other agents' services within a single framework.
The core workflow is: define a price in USD using the price builder, register endpoints or tools with that price, then clients authenticate requests with EIP-712 signatures and blockchain payments. Settlement happens on-chain via smart contracts. The package includes templates for building payment-enabled MCP servers and utility agents, and it abstracts away most of the blockchain complexity—you specify prices in USD and let the framework handle conversion and payment routing.
Use it for:
- Monetize a REST API by adding D402 middleware to FastAPI or Starlette endpoints with minimal code changes
- Build a payment-enabled MCP server that Claude or other AI clients can call while automatically handling micropayments
- Create a CrewAI agent that uses paid tools from other agents, with payment orchestration handled transparently
- Set up an A2A utility agent that other agents can invoke as a service, with per-call billing
- Integrate blockchain-based payments into existing web services without rewriting core business logic
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds HTTP 402 Payment Required protocol support to AI agents and APIs, enabling them to charge for services using blockchain-based payments through the D402 standard.
Yes, with conditions. Install if you need to monetize AI agent services or APIs using blockchain payments and are comfortable with the Web3 stack. The low install friction and active maintenance are positive signals. However, verify the license terms before production use, confirm that Python 3.12+ is available in your environment, and understand that the 25 runtime dependencies mean you're adopting a fairly opinionated ecosystem—use it when the D402 protocol and agent-payment model align with your architecture, not as a general payment library.
Install
traia-iatp on PyPI
pip
pip install traia-iatpuv
uv add traia-iatppoetry
poetry add traia-iatpInstalling traia-iatp
Before you install
Low friction install with a pure-Python wheel. Active maintenance as of the latest release. However, the package declares 25 runtime dependencies including heavy frameworks (FastAPI, CrewAI, Docker, Web3) and async utilities—most projects will only use a subset, so actual runtime footprint depends on which integrations you enable.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Before adopting this in production or proprietary code, verify the actual license terms in the repository.
Quickstart
# Install
pip install traia-iatp
# Add D402 to FastAPI
from fastapi import FastAPI
from traia_iatp.d402.servers.fastapi import D402FastAPIMiddleware
from traia_iatp.d402.price_builder import D402PriceBuilder
app = FastAPI()
price_builder = D402PriceBuilder(network="sepolia")
d402 = D402FastAPIMiddleware(server_address="0x...", facilitator_url="https://test-facilitator.d402.net")
price = price_builder.create_price(0.01)
d402.register_endpoint("/api/analyze", price_wei=price.amount, token_address=price.asset.address, network="sepolia")
d402.add_to_app(app)
Requires Python 3.12 or later. Blockchain integration requires a valid Ethereum account key and wallet address; testnet setup (Sepolia) is documented but requires initial wallet funding.
Verify before relying
- Whether all 25 declared runtime dependencies are truly required for basic usage, or if they are optional for specific integrations
- Actual license terms and any restrictions on commercial use or redistribution
- Production readiness and stability guarantees for mainnet (Arbitrum) facilitator
- Performance characteristics and cost implications of on-chain settlement
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 25 — a2a-sdk, aiohttp, anyio, crewai, crewai-tools, docker, fastapi, httpx, jinja2, mcp, nest-asyncio, openai, pydantic, pymongo, python-dotenv, pytz, requests, rich, starlette, tomli, typer, uvicorn, dnspython, eth-account, web3 |
| Maintenance | actively maintained — 101 days since the last release |
| First released | |
| Downloads | 230,050/month — #9,117 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: traia_iatp-0.1.112-py3-none-any.whl
Keywords: crewai, iatp, agent-to-agent, a2a, mcp, web3, cryptocurrency, tools
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
x402Implements the x402 payment protocol with…
permissive · top 15,000 on PyPI
mcpadaptAdapts MCP (Model Context Protocol) servers…
permissive · top 15,000 on PyPI
fast-agent-mcpfast-agent-mcp is a CLI-first framework for…
permissive · top 15,000 on PyPI
bedrock-agentcoreDeploy AI agents to AWS Bedrock AgentCore with…
permissive · top 5,000 on PyPI
ocppImplements the JSON version of the Open Charge…
permissive · top 15,000 on PyPI
PraisonAIPraisonAI is a framework for building and…
permissive · top 15,000 on PyPI
a2a-sdkA Python SDK for building agentic applications…
permissive · top 5,000 on PyPI
ag_ui_adkBridges Google ADK agents to the AG-UI…
permissive · top 15,000 on PyPI
praisonaiagentsPraisonAI agents is a Python framework for…
unclear · top 15,000 on PyPI
nvidia-natIntegrates enterprise agents with data sources…
permissive · top 15,000 on PyPI