skillfed

traia-iatp

Inter-Agent Transfer Protocol (IATP) - Enable AI Agents to utilize other AI Agents as tools

traia-iatp v0.1.112 230.1K downloads/30d#9,117 on PyPI
License unclear Active released

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-iatp

uv

uv add traia-iatp

poetry

poetry add traia-iatp

Installing 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

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

HTTP 402 payment protocolagent payment middlewareD402 payment requiredblockchain API monetizationpaid MCP serversagent-to-agent paymentsweb3 service charging
blockchain-paymentsagent-monetizationmcp-integration

More Application Frameworks packages

Further reading