Guide
Keep an agent's savings in a QWallet
An agent that pays for APIs needs a wallet it can sign with, and a key that signs on its own can be stolen. Splitting the money in two keeps that risk small. The agent's savings sit in a QWallet, where every withdrawal needs two keys. A small wallet pays for Autonomo APIs day to day, and you top it up from the QWallet when it runs low.
QWallets are built by QHooks. This guide follows their reference, qhooks.com/skill.md, which has every tool and option.
| Chain | Robinhood Chain. The tokens a QWallet holds are fixed when it's created: USDG by default, and ETH always |
| You need | Two wallets: an owner wallet for the QWallet and a small wallet that pays, plus about 0.001 ETH in the owner wallet for gas |
| Tools | QHooks' MCP server, @qhooks/mcp 0.2.0 or later (Node 18+), which signs on your machine |
| Cost | No QHooks fee. You pay network gas: see Gas below |
How it works
| QWallet | A contract that only you control, holding the savings. A withdrawal needs the owner wallet's signature and the post-quantum key's signature, both for the same amount, recipient and 15-minute window. QHooks holds neither key and can't move the funds |
| Owner wallet | Creates the QWallet, deposits into it and signs withdrawals. About 0.001 ETH in it covers setup and a good run of withdrawals |
| Post-quantum key | A post-quantum signature key (SLH-DSA, a NIST standard), a different kind of key from a wallet key. The agent creates it on its own machine |
| Paying wallet | The small wallet the agent pays Autonomo APIs from, set as AUTONOMO_WALLET_KEY. Keep about a day's spending in it |
x402 payments are signed by a plain wallet, so an agent can't pay an API straight from the QWallet. It withdraws to the paying wallet first, then pays from there. Use a different wallet as the owner and as the paying wallet: then the paying wallet's key can only ever lose what's in the paying wallet.
Set up the QWallet
01Add QHooks' MCP server with a key and a passphrase
The server reads and prepares on its own, and signs only with a key on your machine. Give it the owner wallet's key as a file, and a passphrase file for the post-quantum key, at least 16 bytes long. Both files must have mode 600 (only you can read them). In Claude Desktop, Cursor and other MCP clients:
{
"mcpServers": {
"qhooks": {
"command": "npx",
"args": ["-y", "@qhooks/mcp"],
"env": {
"QHOOKS_KEYFILE": "/absolute/path/to/owner-key",
"QHOOKS_QWALLET_PASSPHRASE_FILE": "/absolute/path/to/passphrase"
}
}
}
}In Claude Code, the two settings go in the command that adds the server:
claude mcp add qhooks -e QHOOKS_KEYFILE=/absolute/path/to/owner-key -e QHOOKS_QWALLET_PASSPHRASE_FILE=/absolute/path/to/passphrase -- npx -y @qhooks/mcpRestart the client. qhooks_status then shows the owner wallet's address and that QWallet tools are on.
02Create the post-quantum key
qwallet_key {"action": "create"}It writes the key to a file, encrypted with your passphrase, by default in ~/.qhooks-mcp. That file is the backup: copy it somewhere safe, and keep the passphrase too. With both, the key can be restored on qhooks.com/qwallets. Lose either one and the savings can't be withdrawn.
03Create the QWallet
Two contracts, each prepared and then sent from the owner wallet: a verifier, then the pool that holds the funds. The pool holds USDG unless you pass another token list, and ETH is always accepted. Keep the addresses and the token list that come back, and pass that list on every later call: the pool's code is checked against it each time.
prepare_qwallet_setup {"chain": "4663", "owner": "<owner wallet>"}
qhooks_sign_and_send {"chain": "4663", "transactions": [<the verifier creation>], "confirm": true}
prepare_qwallet_setup {"chain": "4663", "owner": "<owner wallet>", "verifier": "<verifier address>"}
qhooks_sign_and_send {"chain": "4663", "transactions": [<the pool creation>], "confirm": true}04Enroll the post-quantum key
qwallet_approve checks the prepared action against your request and the pool's code on chain, then signs it with both keys, locally.
prepare_qwallet_setup {"chain": "4663", "owner": "<owner wallet>", "verifier": "<verifier>",
"pool": "<pool>", "publicKey": "<from qwallet_key>", "tokens": [<from setup>]}
qwallet_approve {"chain": "4663", "approval": <the approval it returned>}
qhooks_sign_and_send {"chain": "4663", "transactions": [<the transaction qwallet_approve returned>], "confirm": true}05Deposit the savings
From the owner wallet. Amounts are in USDG's smallest unit, so 5000000 is 5 USDG. A deposit needs only the owner wallet: a token approval for the exact amount, then the deposit.
prepare_qwallet_deposit {"chain": "4663", "owner": "<owner wallet>", "verifier": "<verifier>", "pool": "<pool>",
"publicKey": "<public key>", "tokens": [<from setup>],
"asset": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", "amount": "5000000"}
qhooks_sign_and_send {"chain": "4663", "transactions": [<the approval>, <the deposit>], "confirm": true}To keep ETH in it too, use "asset": "ETH" and an amount in wei. Then check with qwallet_status. Its next field goes through deploy_verifier, deploy_pool, create_pq_key, enroll and deposit, and says ready once the savings are in.
qwallet_status {"chain": "4663", "owner": "<owner wallet>", "verifier": "<verifier>", "pool": "<pool>",
"publicKey": "<public key>", "tokens": [<from setup>]}Pay from the small wallet
The paying wallet is the one you give Autonomo's tools, as AUTONOMO_WALLET_KEY: in the MCP server, the SDK, the LangChain tools or the elizaOS plugin. Set its daily budget to about what it holds, so the two limits match.
Top up the paying wallet
When the paying wallet runs low, Autonomo refuses the next call before anything is signed and says the wallet doesn't have enough USDG. Withdraw from the QWallet to the paying wallet, then call again:
prepare_qwallet_withdraw {"chain": "4663", "owner": "<owner wallet>", "verifier": "<verifier>", "pool": "<pool>",
"publicKey": "<public key>", "tokens": [<from setup>],
"asset": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", "amount": "1000000", "recipient": "<the paying wallet>"}
qwallet_approve {"chain": "4663", "approval": <the approval it returned>}
qhooks_sign_and_send {"chain": "4663", "transactions": [<the transaction qwallet_approve returned>], "confirm": true}The approval is for that amount, to that wallet, and is valid for 15 minutes. A changed recipient or a reused approval is refused on chain. Withdraw about a day's spending at a time, so the paying wallet never holds much.
Gas
Measured by QHooks on Robinhood Chain, at the gas price on November 20, 2026:
| Setup | About 5M gas, roughly 0.0001 ETH, for the verifier, the pool and enrolling the key |
| Each withdrawal | About 2.5M gas, roughly 0.00005 ETH |
| Each deposit | Very little |
Enrolling the key and withdrawing cost the most, because the post-quantum signature is checked on chain. About 0.001 ETH in the owner wallet covers setup and a good run of withdrawals with plenty to spare. The ETH amounts move with the gas price.
Good to know
- Start with small amounts. The independent review of the QWallet contracts is still pending.
- Keep the encrypted key file and the passphrase. The passphrase file must be at least 16 bytes and mode
600. The key file plus the passphrase is the only way to recover the post-quantum key: losing either means the savings can't be withdrawn. - Both keys sit with the agent, on its machine. A QWallet protects the savings from one leaked key, not from someone who takes over the whole machine, so keep the key files and the passphrase locked down.
- The tools above work on Robinhood Chain. For other chains, QHooks has the same QWallet in the browser at qhooks.com/qwallets.
- QHooks' MCP server signs only what it prepared itself in the last 10 minutes, after checking the chain, the destination and a simulation. Its full reference, with the guards on each step, is in qhooks.com/skill.md.
- QWallet is QHooks' product, not Autonomo's. Autonomo doesn't hold or move the funds, and this guide isn't a review of the contracts. QHooks is an Autonomo partner.