Python SDK v2.3.0 — Full TypeScript Parity
Python SDK reaches 1:1 feature parity with TypeScript SDK v2.5.0. Adapter routing, x402, ERC-8004, keystore security, Smart Wallet support, and full CLI — all in one release.
What's New
pip install agirails==2.3.0
The Python SDK now matches the TypeScript SDK across all major features shipped over the past three weeks. 60 files, 14,000 lines of code, 1,738 tests passing.
Adapter Routing
Priority-based adapter selection with guard-rails, matching the TypeScript AdapterRouter:
- StandardAdapter (priority 60) — full ACTP lifecycle with escrow
- BasicAdapter (priority 50) — simple pay-and-forget
- X402Adapter (priority 70) — HTTP-based instant payments with relay fee splitting
from agirails import ACTPClient
client = await ACTPClient.create(mode="testnet", requester_address="0x...")
# Router auto-selects the best adapter
await client.pay({"to": "0xProvider...", "amount": "10.00"})
# HTTP endpoint → X402 (when registered)
await client.pay({"to": "https://api.example.com/pay", "amount": "5.00"})
# ERC-8004 agent ID → resolved on-chain → ACTP
await client.pay({"to": "12345", "amount": "10.00"})
ERC-8004 Identity & Reputation
On-chain agent identity resolution and reputation reporting:
from agirails.erc8004.bridge import ERC8004Bridge
from agirails.types.erc8004 import ERC8004BridgeConfig
bridge = ERC8004Bridge(ERC8004BridgeConfig(network="base-sepolia"))
wallet = await bridge.get_agent_wallet("1") # → 0x21fdEd74...
Auto-registered in ACTPClient — agent IDs resolve transparently through client.pay().
Keystore & Deployment Security (AIP-13)
Fail-closed private key policy with network-aware enforcement:
| Network | ACTP_PRIVATE_KEY | Behavior |
|---|---|---|
| mock | Allowed | Silent |
| testnet (base-sepolia) | Allowed | Warn once |
| mainnet (base-mainnet) | Blocked | Hard fail |
Resolution order: ACTP_PRIVATE_KEY → ACTP_KEYSTORE_BASE64 + ACTP_KEY_PASSWORD → .actp/keystore.json → None
All keys cached with 30-minute TTL. Thread-safe.
CLI tools:
actp deploy:env # Generate ACTP_KEYSTORE_BASE64 for CI/CD
actp deploy:check # Scan repo for exposed secrets
AGIRAILS.md as Source of Truth
Parse, hash, publish, pull, and diff agent configurations:
actp publish --network base-sepolia # Hash + upload to IPFS + register on-chain
actp pull --network base-sepolia # Fetch config from chain
actp diff --network base-sepolia # Compare local vs on-chain
Deterministic keccak256 hashing with atomic writes and symlink attack prevention for pending publish state.
Smart Wallet Routing Fix
client.pay() correctly routes through BasicAdapter only when a wallet provider with pay_actp_batched support is active. Without it, StandardAdapter handles all EVM addresses (matching the TypeScript SDK fix from v2.4.2).
Bug Fix: Network Tier Mapping
Fixed _enforce_private_key_policy — was comparing against literal "testnet"/"mainnet" but receiving chain names like "base-sepolia". Added _normalize_network_tier() to correctly map chain names to policy tiers. Without this fix, testnet users would get false PermissionError when using ACTP_PRIVATE_KEY.
E2E Test Results
Verified across four levels before release:
| Level | Scope | Result |
|---|---|---|
| Mock CLI | 14 CLI scenarios | 8/14 (6 are CLI gaps, not SDK bugs) |
| Python API | 12 integration tests | 12/12 |
| Testnet Live | Base Sepolia contracts + ERC-8004 | 15/15 |
| Cross-SDK Parity | Hash, routing, state machine, contracts | 14/14 |
Install
pip install agirails==2.3.0