Skip to main content

Autonomo SDK for Python

One call for AI agents. Say what you need, and the SDK:

  1. Finds the right API on Autonomo, from your words and the kind of input you give (a token or wallet address, a transaction hash, a link).
  2. Pays for it with x402, in USDG or $AUTONOMO on Robinhood Chain, or USDC on Base, whichever the wallet can afford.
  3. Pays privately through Gloam when you ask, so the payment doesn't link to your wallet.
  4. Borrows from a Borro credit line when the wallet is short of USDG.
  5. Keeps to your caps: a most-per-call and a daily budget, checked before anything is signed.
  6. Returns the answer and a receipt: which API, how it was paid, the amount and the transaction link.
pip install autonomo-sdk

The same package is also on PyPI as autonomo. Either way, you import it as autonomo.

Full examples for each way to pay: autonomo.fun/docs/sdk.

import os
from autonomo import Autonomo

autonomo = Autonomo(private_key=os.environ["AUTONOMO_WALLET_KEY"])

result = autonomo.call("is this token safe", input="0x86b57bcb9d249cf096cf8e21426c9dc9cafdec49")
print(result.data)
print(result.receipt.route, result.receipt.amount, result.receipt.token, result.receipt.explorer)

Use a new wallet just for the agent, holding only what it may spend. A little USDG covers many calls (most APIs cost 0.01 USDG). Paying in $AUTONOMO needs a little ETH once, for a Permit2 approval.

Finding APIs without paying

autonomo = Autonomo()                      # no key needed to look
autonomo.find("wallet holdings")           # best matches first
autonomo.quote("explain this transaction", input="0x…")   # the API, the URL and every price

To skip the search, name the API: autonomo.call(slug="token-risk", path="/risk/0x…").

To see what the wallet can pay with, autonomo.balances() returns what it holds on both chains: USDG, $AUTONOMO and ETH on Robinhood Chain, and USDC on Base. It only reads.

Limits

Autonomo(
    private_key=...,
    pay_with="auto",                                  # or "usdg" / "autonomo" / "usdc" (USDC on Base)
    per_call={"usdg": "0.5", "autonomo": "5000"},     # the defaults
    daily={"usdg": "5", "autonomo": "10000"},         # per UTC day; Gloam and Borro count as USDG
)

A call over a limit is refused before anything is signed, with the reason. Spending is kept in ~/.autonomo/spend.json (shared with the TypeScript SDK); pass spend_store=MemoryStore() or your own store to change that.

Private payments with Gloam

private=True pays from a private Gloam balance through Gloam's own MCP server, @gloamtrade/mcp, running on your machine with its key and limits in ~/.gloam/agent.env. The SDK calls its gloam_fetch_paid tool; Gloam cashes out exactly the price through its relay and calls the API with it. The SDK holds no Gloam keys, and no wallet key is needed. See the SDK guide for the setup and a full example (it uses pip install mcp).

def fetch_paid(args):   # runs gloam_fetch_paid on an MCP session with @gloamtrade/mcp
    call = gloam.call_tool("gloam_fetch_paid", args, read_timeout_seconds=timedelta(minutes=5))  # can take minutes
    out = asyncio.run_coroutine_threadsafe(call, loop).result()
    return json.loads(out.content[0].text)

autonomo = Autonomo(gloam_fetch_paid=fetch_paid)
autonomo.call("newest launches", private=True)

A private call only ever pays through Gloam. If the API doesn't offer it, or Gloam isn't set up, it's refused, never sent as a public payment. The price includes Gloam's cash-out fee (about 0.0105 USDG for a 0.01 call).

Borrowing with Borro

autonomo = Autonomo(private_key=..., borro_account="0xYourCreditLine")

When the wallet can't afford a call, the SDK asks Borro's MCP server to prepare a borrow of just what it's short, sends it from the wallet (this needs a little ETH for gas), waits for the USDG and pays. The line needs x402 bills turned on; see Pay with a Borro credit line. Borro's own daily limit still applies.

Borro's answer is checked before anything is signed. The SDK sends only one transaction: a borrow on your own credit line, into this wallet, with no ETH attached, of no more than the call's price. Anything else in the answer, such as a transfer, an approval or a second transaction, is refused with borro_unsafe and nothing is sent. The call's price is still checked against your caps first.

The receipt

Field
api The API's slug and name
route usdg, autonomo, usdc, gloam or borro
amount, token, chain What was paid, and on which chain: Robinhood Chain or Base
payer, pay_to The wallet (or "private (Gloam)") and the API's payment address
tx, explorer The payment transaction and its link on Blockscout, or on Basescan for Base
borrow_txs, approve_tx Borro borrows and the one-time Permit2 approval, when there were any
spent_today Today's total against the daily budget

Errors are AutonomoError with a code such as cannot_pay, over_limit, no_private_option or payment_refused. If an API fails after a payment is signed, the payment doesn't settle, so you aren't charged.

Metadata

Release files for autonomo 0.1.3

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

Source distribution (sdist)

Source distribution for autonomo 0.1.3
File Size Uploaded Provenance Actions
autonomo-0.1.3.tar.gz 20.2 kB Without provenance Details for autonomo-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 35.7 kB

Release files / autonomo-0.1.3.tar.gz

Download URL autonomo-0.1.3.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2c910a21ba7ee457af2b7ff0c538a7bb26e3e39f0367d67a2fab30aa7bb74bc4
BLAKE2b-256 checksum
How to use checksums
fcf4ecdeb99a1b9251c3cf197ed1414221d0d9fcf6a677d01f08459f440475c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / autonomo-0.1.3-py3-none-any.whl

Download URL autonomo-0.1.3-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c13447ccd9e4cf8821e7156e6251bf6b37f8d28b0e7e2bd5d7f527cf53b96c5b
BLAKE2b-256 checksum
How to use checksums
2ba9a9d22c68cc625d0b0b1d788dfa3a37a9ab24c3b7c578ce377b3b6b7ece18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for autonomo 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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