Skip to main content

Gasless cross-chain for AI agents — one signature moves value across 22 EVM chains + Stellar, no native gas

Project description

anygas

Gasless cross-chain for AI agents — one signature moves value across 22 EVM chains + Stellar, no native gas.

An AI agent (or any automated system) holds a single verified asset (WETH / USDG / …) and transacts by signing off-chain intents. Robyn's relayer fronts the gas on every chain and is repaid from the asset. The signer needs zero native balance on any chain — it only signs.

pip install anygas

Quickstart

from anygas import Robyn

ag = Robyn(signer="0x<private-key>")                                  # or an eth_account LocalAccount
ag.pay(token=USDG, to=merchant, amount=25_000000)                     # gasless transfer, one signature
ag.cross_chain(fromChain=8453, fromToken=USDC_BASE, amount=25_000000, # MOVE value across chains,
               toChain=42161, toToken=USDC_ARB)                       # gasless on BOTH sides

That's it. With no svc argument the client talks to the hosted gateway at https://api.anygas.xyz/svczero config. Read-only methods (info, mesh, quote, route, route_status) work with no signer at all.

AnyGas is a friendly alias for Robyn:

from anygas import AnyGas
ag = AnyGas()                       # read-only, hosted gateway
print(ag.mesh())                    # the cross-chain route graph

One-time Permit2 setup (for cross_chain)

cross_chain uses a Permit2 SignatureTransfer. Once per (token, chain) the agent must approve Permit2 to spend the token:

token.approve(client.permit2, MaxUint256)   // standard one-time Permit2 approval

After that, every cross-chain move is a single gasless signature — no native token ever.

Methods

Method Kind Endpoint Notes
info() read GET /api/gasless/info Router, chainId, gasless chain map (cached).
chains() read info().gaslessChains.
mesh() read GET /api/route/chains Cross-chain route graph + relayer/spender (alias of route_info).
route_info() read GET /api/route/chains Same as mesh().
quote(token, kind="pay") read POST /api/gasless/quote Fee quote; kind is "pay" or "call".
route(fromChain, fromToken, toChain, toToken, amount, toAddress=None, slippage=None) read POST /api/route/quote Quote the best cross-chain route.
route_status(id) / status(id) read GET /api/route/status?id= Track an in-flight route to DONE.
pay(token, to, amount, route="direct") exec POST /api/gasless/submit (pay) Gasless transfer; token must be a verified fee token.
buy(token, amount, target, calldata, route="direct") exec POST /api/gasless/submit (call) Gasless purchase via an allowlisted venue.
pay_any(token, to, amount, verifiedAsset, route="direct", chainId=None) exec POST /api/gasless/submit (payAny) Pay in ANY verified-swappable token; fee auto-converts.
cross_chain(fromChain, fromToken, amount, toChain, toToken, toAddress=None) exec POST /api/route/execute (permit2) Move value across chains, one Permit2 signature.
permit2 prop Canonical Permit2 address 0x0000…78BA3.

Method names are snake_case; wire payload keys stay camelCase exactly as the reference JS SDK sends them (fromChain, toToken, verifiedAsset, …).

Notes on the execution methods

  • pay / buy / pay_any sign an EIP-712 intent and an EIP-2612 token permit. The permit requires reading the token's name() and nonces(owner) from chain — pass rpc="https://…" to the constructor so the client can do those read-only eth_calls (this mirrors the ethers provider in the JS SDK).
  • cross_chain uses Permit2 and needs no RPC — just a signer and the hosted gateway.
  • Execution methods raise RobynError if no signer was provided.

Signing

  • Intents (Pay / Call / PayAny) are EIP-712 typed data over the Robyn router domain (RobynGaslessRouter / RobynAnyGasRouter, version 1).
  • Permit2 (cross_chain) signs PermitTransferFrom(TokenPermissions permitted, address spender, uint256 nonce, uint256 deadline) over the domain {name:"Permit2", chainId, verifyingContract:0x000000000022D473030F116dDEE9F6B43aC78BA3} (no version field), via eth_account.

Integrate, don't replicate

The client in this package is MIT — vendor it, fork it, wrap it, ship it inside your agent. The Robyn relay, router, and on-chain contracts it talks to are proprietary infrastructure, operated by Any-Gas Systems. This SDK is a thin, permissively-licensed door into that hosted service. Build on it — please don't try to clone the relay behind it. See NOTICE.

License

MIT © 2026 Any-Gas Systems. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anygas-1.0.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anygas-1.0.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file anygas-1.0.0.tar.gz.

File metadata

  • Download URL: anygas-1.0.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for anygas-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1b81e14c27169d3e219d9f75c1f84a5468a1294834797fe11417ade673ab027d
MD5 fac3517720840ced13bf3398ef58fdea
BLAKE2b-256 e5b9380287fe3778db1916c5739a22e2e554bf0ed6d3091c9f1106225fe0503a

See more details on using hashes here.

File details

Details for the file anygas-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: anygas-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for anygas-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46bd9e10096d0b6c1d0955fe3dad4280594796c41ccd5640bc1fba4f34af3a44
MD5 75246b0b8bf842b48f6909d55d9e13d9
BLAKE2b-256 5b450a020580dc8c904725399a50da488b4a93bb29b1de82be6de91a4270e1ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page