Guide
Use Autonomo from elizaOS
elizaos-plugin-autonomo gives an elizaOS agent Autonomo's APIs as actions. Someone asks the agent "is this token safe?", and it finds the right API, checks the price and pays for the call itself, in USDG or $AUTONOMO on Robinhood Chain. You don't write code for each API: an API listed on Autonomo tomorrow works the same way.
| Works with | elizaOS 1.x (1.7 or later) and 2.x, from one package |
| The agent needs | A wallet just for it, with a little USDG. Most APIs cost 0.01 USDG |
| Built on | The Autonomo SDK, so it pays and keeps to limits the same way |
Set up
01Install it
npm install elizaos-plugin-autonomo02Add it to your agent
import { autonomoPlugin } from "elizaos-plugin-autonomo";
export const projectAgent = {
character,
plugins: [autonomoPlugin],
};03Give the agent a wallet
Make a new wallet just for the agent and send it only what it may spend: a dollar of USDG on Robinhood Chain covers about 100 calls. Paying in $AUTONOMO also needs a little ETH once, for a Permit2 approval. Put its key in the character's secrets:
{
"name": "Scout",
"settings": {
"secrets": {
"AUTONOMO_WALLET_KEY": "0x…",
"AUTONOMO_DAILY_USDG": "0.50"
}
}
}Or in your project's .env:
AUTONOMO_WALLET_KEY=0x…
AUTONOMO_DAILY_USDG=0.50Without a key, the agent can find APIs and check prices, but isn't offered the paying action.
What the agent does
01It finds the API
For "is this token safe?" with a token address, it looks through Autonomo's APIs for one that takes a token address, best first, each with its price and track record. It picks Token Risk.
02It checks the price against your limits
The price is read before anything is signed. A call above the per-call cap or past today's budget is refused, and the agent is told why, so it can choose a cheaper API or answer with what it has.
03It pays and answers
It pays 0.01 USDG with a signed x402 payment, answers from the report and adds what it paid, with a link to the payment on Blockscout. Autonomo settles it on-chain and pays the gas. If the API fails, the payment doesn't settle, so the agent isn't charged.
The actions
| AUTONOMO_FIND_APIS | Free. The best APIs for a task, or all of them: what each does, its path, its price and its track record |
| AUTONOMO_GET_PRICE | Free. What one call would cost, every way to pay it, and the exact URL |
| AUTONOMO_CALL_API | Pays. Calls the API and returns its answer with a receipt: the amount and the transaction link |
On elizaOS 2.x, the planner fills in each action's parameters and writes the reply. On 1.x, the action reads what's needed from the message with the agent's small model. Either way, the address, transaction hash or link it pays to look up is one written in the message, and the line saying what was paid comes from the payment receipt, not from the model.
Settings
All optional. Set them in the character's secrets or settings, or in the environment.
| AUTONOMO_WALLET_KEY | The agent wallet's private key. Without it, the free actions only |
| AUTONOMO_PAY_WITH | usdg, autonomo, or auto: USDG first, then $AUTONOMO. Default auto |
| AUTONOMO_MAX_USDG_PER_CALL | The most one call may cost in USDG. Default 0.05 |
| AUTONOMO_MAX_AUTONOMO_PER_CALL | The most one call may cost in $AUTONOMO. Default 5000 |
| AUTONOMO_DAILY_USDG | The most to spend per UTC day in USDG. Default 1 |
| AUTONOMO_DAILY_AUTONOMO | The most to spend per UTC day in $AUTONOMO. Default 10000 |
| AUTONOMO_BORRO_ACCOUNT | A Borro credit line to borrow from when the wallet is short of USDG |
| AUTONOMO_MAX_OUTPUT_CHARS | Longer answers are cut before they reach the model or the chat. Default 8000 |
A setting the plugin can't read as written, like a limit that isn't a number, turns paying off until it's fixed. The agent logs which setting, and the free actions keep working. A typo never becomes a looser limit.
Set it in code
To set limits in code instead, or to borrow from a Borro credit line, make the plugin yourself. It takes the same options as the SDK, and they win over the agent's settings:
import { createAutonomoPlugin } from "elizaos-plugin-autonomo";
const autonomo = createAutonomoPlugin({
limits: { perCall: { usdg: "0.02" }, daily: { usdg: "0.50" } },
borro: { account: "0xYourCreditLine" },
});With Gloam set up the same way (see Pay privately with Gloam), the paying action gets a private option. A private call only ever pays through Gloam, never as a public payment.
Good to know
- Anyone who can talk to the agent can ask it to make a paid call. On Discord, Telegram or X, that is every user. The daily budget is the most they can spend between them, so set it to what you're fine losing in a day.
- Today's spending is kept in
~/.autonomo/spend.json, shared with the SDK and CLI on the same machine. On a host that wipes its disk on each deploy, the daily count starts again after a deploy. - Prefer APIs marked Verified with a good track record. Autonomo lists outside creators' APIs too, and doesn't vouch for each one.
- Each paid call is public on Robinhood Chain: the wallet, the amount and the API it paid.
- The plugin is open source and its tests run offline against a fake Autonomo, paying nothing. Not on elizaOS? Use LangChain, the SDK, or the MCP server.