Skip to main content

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/svc — zero 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.

Metadata

Release files for anygas 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anygas 1.0.0
File Size Uploaded
anygas-1.0.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anygas 1.0.0
File Interpreter ABI Platform
anygas-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.1 kB

Release files / anygas-1.0.0.tar.gz

Download URL anygas-1.0.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1b81e14c27169d3e219d9f75c1f84a5468a1294834797fe11417ade673ab027d
BLAKE2b-256 checksum
How to use checksums
e5b9380287fe3778db1916c5739a22e2e554bf0ed6d3091c9f1106225fe0503a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / anygas-1.0.0-py3-none-any.whl

Download URL anygas-1.0.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46bd9e10096d0b6c1d0955fe3dad4280594796c41ccd5640bc1fba4f34af3a44
BLAKE2b-256 checksum
How to use checksums
5b450a020580dc8c904725399a50da488b4a93bb29b1de82be6de91a4270e1ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page