Installation
Configuration requise : Python 3.9+
Initialisation du client
Le SDK Python est entierement async. Toutes les methodes retournent des coroutines et doivent etre attendues avec await.
Agents
aw.agents.create()
Creez un nouvel agent avec un portefeuille securise par MPC.
aw.agents.get(agent_id)
aw.agents.list()
aw.agents.freeze(agent_id) / aw.agents.unfreeze(agent_id)
Paiements
aw.payments.send()
Envoyez un paiement on-chain direct.
aw.payments.get(transaction_id)
aw.payments.list()
Micropaiements x402
aw.x402.create_session()
aw.x402.check()
aw.x402.pay()
aw.x402.session_pay(session_id, target_url)
aw.x402.http_interceptor()
Creez un intercepteur qui gere automatiquement les challenges x402 v2 :
Politiques
aw.policies.update()
aw.policies.get(agent_id)
aw.policies.apply_template()
Webhooks
aw.webhooks.create()
Gestion des erreurs
Type hints
Le SDK Python inclut des type hints complets pour le support IDE et l’analyse statique :
Utilisation avec asyncio
Le SDK est async-first. Utilisez-le dans un contexte async :