Aomi Transact
Overview
Aomi Transact drives the aomi TypeScript CLI to build natural-language crypto agents and web3 assistants. It composes calldata, fork-simulates transactions as a batch, and stages wallet requests for explicit user signing — non-custodial throughout. Current chain metadata includes Ethereum, Polygon, Arbitrum, Base, Base Sepolia, Optimism, Sepolia, Linea, Linea Sepolia, Monad, Monad Testnet, Robinhood Chain, MegaETH, and local Anvil. The npm CLI is the production/end-user surface; the Rust aomi-cli in product-mono is an in-process dev/test CLI with a different command surface — never mix the two. For deep references, see commands.md, workflows.md, gotchas.md, account-abstraction.md, apps.md, examples.md, session.md, drain-vectors.md, troubleshooting.md.
Prerequisites
- Node.js 18+ with npm or npx
@aomi-labs/client v0.6.0 or newer: npm install -g @aomi-labs/client@latest
- For EVM signing: a 0x-prefixed private key via
aomi wallet set, --private-key, or PRIVATE_KEY
- For Solana sign-only flows: a base58 or JSON keypair via
aomi wallet set --solana (which also persists the cluster; --cluster overrides), --solana-private-key, or SOLANA_PRIVATE_KEY
- Optional:
AOMI_ACCOUNT_BEARER / --account-bearer for authenticated account-bound requests
- Native gas on the destination chain for the signing EOA — local signing is EOA-only, so there is no sponsorship fallback
Instructions
- Detect the CLI and check its version:
aomi --version 2>/dev/null || npx @aomi-labs/client@latest --version. If it prints below 0.6.0, stop and tell the user to run npm install -g @aomi-labs/client@latest, or prefix every command with npx @aomi-labs/client@latest instead. An already-installed global aomi is never upgraded by installing this skill, and the pre-0.4 surface differs.
- Start a new session:
aomi chat "<task>" --new-session
- Inspect queue:
aomi tx list
- For multi-step flows, simulate first:
aomi tx simulate tx-1 tx-2
- Sign:
aomi tx sign tx-1
- Verify:
aomi session status or aomi session log
For the full procedure (read-only requests, building wallet requests, signing policy, batch simulation, secret ingestion), see workflows.md.
Examples
aomi chat "what is the price of ETH?" --new-session
aomi chat "swap 1 ETH for USDC" --new-session --public-key 0xYourAddress --chain 1
aomi tx list && aomi tx simulate tx-1 tx-2 && aomi tx sign tx-1 tx-2
aomi chat "stake 0.5 ETH on Lido" --app lido --chain 1 --new-session
Four end-to-end walkthroughs (approve+swap, lending, bridging, staking) in examples.md. Per-app first-turn examples (Khalani, 0x, Polymarket, Binance, Neynar) in apps.md.
Output
aomi chat: agent response or ⚡ Wallet request queued: tx-N
aomi tx list: table of pending/signed tx ids with batch_status
aomi tx simulate: per-step success/failure, revert reason, gas usage
aomi tx sign: transaction hash and on-chain confirmation
Error Handling
| Error |
Cause |
Solution |
insufficient funds for transfer |
Signing EOA has no native gas |
Fund the EOA on the destination chain — local signing has no sponsorship path |
AA execution now runs in the backend lane |
An AA path was selected on tx sign |
Drop --aa/--aa-provider/--aa-mode; if no flags were passed, unset AOMI_AA_PROVIDER/AOMI_AA_MODE |
stateful: false in simulation |
Wrong batch order |
Reorder tx ids to match execution dependency |
RPC 401/429 |
Rate-limited or missing key |
Set --rpc-url to authenticated endpoint |
| No tx queued after chat |
Agent returned quote first |
Run aomi tx list; send a confirmation reply |
Orphaned tx-N in list |
Previous simulation failed |
Only sign txs with batch_status: passed |
Failed to get apps/models: HTTP 404 |
Public backend does not expose that introspection route |
Treat app list/model list as backend-dependent; do not block chat/sign flows on it |
Full troubleshooting in troubleshooting.md.
Safety Justification
This skill is risk_tier: L2 because it can sign and broadcast on-chain transactions. The permissions manifest enforces least privilege:
- Shell allowlist scopes execution to
aomi and npx @aomi-labs/client@latest only — no arbitrary subprocesses.
- Network allowlist restricts outbound traffic to
chat.aomi.dev (the CLI's default backend; api.aomi.dev is the legacy host). User-supplied --rpc-url endpoints are resolved by the CLI itself; operators must review them before allowing signing.
- File scope is read+write to
~/.aomi/ only; identity files (SOUL.md, MEMORY.md, AGENTS.md) are deny-listed against writes per OWASP AST03 mitigation #3.
- No blind signing. Multi-step flows go through
aomi tx simulate on a forked chain before aomi tx sign. Drain-vector calldata fields (recipient, onBehalfOf, mintRecipient, _to) are blocked at simulation time when they do not equal msg.sender — see drain-vectors.md.
- Opaque credentials. The skill never fabricates, derives, or echoes credential values; setup commands run only when the user explicitly asks and supplies the value in this turn. Full rules in gotchas.md → Hard Rules.
When to Use
- The user wants to chat with the Aomi agent from the terminal.
- The user wants balances, prices, routes, quotes, or transaction status.
- The user wants to build, simulate, confirm, sign, or broadcast wallet requests.
- The user wants to inspect or switch apps, models, chains, or sessions.
- The user wants to inspect or change Account Abstraction preferences (synced to the backend lane).
- The user wants to authenticate a CLI account with
aomi account login, inspect it with aomi account whoami, or inspect linked wallets and login methods with aomi account links.
- The user wants to build a new app from an API spec or SDK — use the companion skill aomi-build.
Command Surface
aomi Interactive REPL
aomi --prompt "<message>" Send one prompt and exit
aomi chat <message> Send a message
aomi tx list|simulate|sign
aomi session list|new|resume|delete|status|log|events|close
aomi model list|set|current
aomi app list|current
aomi chain list|set|current
aomi wallet set|current|whoami
aomi account login|whoami|logout|links|link|unlink|rename|update|delete|sessions|switch
aomi logout
aomi config set-backend|current
aomi secret list|clear|add
There is no aomi thread, aomi cron, aomi login, or aomi wallet ls|dev-key|set-mode on this CLI — those belong to the separate Rust aomi-cli. aomi deploy is advertised in --help but unreachable in v0.4.2 (fix pending in aomi-labs/aomi#467). Full command reference, flags, and env vars in commands.md.
Resources
1---2name: aomi-transact3description: Build natural-language crypto agents, web3 assistants, and trading bots that read and write EVM chain state. Aomi turns prompts ("swap 1 ETH for USDC", "open a 3x GMX long", "bet $100 on Polymarket") into wallet-signed transactions on Ethereum, Base, Arbitrum, Optimism, Polygon, Linea — non-custodial, fork-simulated. Use when the user wants a crypto/DeFi agent, AI trading/wallet assistant, or on-chain execution against Uniswap, Aave, Lido, GMX, Hyperliquid, Polymarket, Binance, OKX, or 40+ other protocols. Trigger with prompts about swaps, lending, bridging, staking, perps, prediction markets, or any DeFi/CEX action needing a wallet signature. Account-abstraction aware with EIP-7702/4337 in the backend lane; local CLI signing is EOA. MUST NOT fabricate or echo credentials; values reach the CLI only when the user explicitly supplied them.4license: MIT5---67# Aomi Transact89## Overview1011Aomi Transact drives the `aomi` TypeScript CLI to build natural-language crypto agents and web3 assistants. It composes calldata, fork-simulates transactions as a batch, and stages wallet requests for explicit user signing — non-custodial throughout. Current chain metadata includes Ethereum, Polygon, Arbitrum, Base, Base Sepolia, Optimism, Sepolia, Linea, Linea Sepolia, Monad, Monad Testnet, Robinhood Chain, MegaETH, and local Anvil. The npm CLI is the production/end-user surface; the Rust `aomi-cli` in `product-mono` is an in-process dev/test CLI with a *different command surface* — never mix the two. For deep references, see [commands.md](references/commands.md), [workflows.md](references/workflows.md), [gotchas.md](references/gotchas.md), [account-abstraction.md](references/account-abstraction.md), [apps.md](references/apps.md), [examples.md](references/examples.md), [session.md](references/session.md), [drain-vectors.md](references/drain-vectors.md), [troubleshooting.md](references/troubleshooting.md).1213## Prerequisites1415- Node.js 18+ with npm or npx16- `@aomi-labs/client` v0.6.0 or newer: `npm install -g @aomi-labs/client@latest`17- For EVM signing: a 0x-prefixed private key via `aomi wallet set`, `--private-key`, or `PRIVATE_KEY`18- For Solana sign-only flows: a base58 or JSON keypair via `aomi wallet set --solana` (which also persists the cluster; `--cluster` overrides), `--solana-private-key`, or `SOLANA_PRIVATE_KEY`19- Optional: `AOMI_ACCOUNT_BEARER` / `--account-bearer` for authenticated account-bound requests20- Native gas on the destination chain for the signing EOA — local signing is EOA-only, so there is no sponsorship fallback2122## Instructions23241. Detect the CLI and **check its version**: `aomi --version 2>/dev/null || npx @aomi-labs/client@latest --version`. If it prints below `0.6.0`, stop and tell the user to run `npm install -g @aomi-labs/client@latest`, or prefix every command with `npx @aomi-labs/client@latest` instead. An already-installed global `aomi` is never upgraded by installing this skill, and the pre-0.4 surface differs.252. Start a new session: `aomi chat "<task>" --new-session`263. Inspect queue: `aomi tx list`274. For multi-step flows, simulate first: `aomi tx simulate tx-1 tx-2`285. Sign: `aomi tx sign tx-1`296. Verify: `aomi session status` or `aomi session log`3031For the full procedure (read-only requests, building wallet requests, signing policy, batch simulation, secret ingestion), see [workflows.md](references/workflows.md).3233## Examples3435```bash36aomi chat "what is the price of ETH?" --new-session37aomi chat "swap 1 ETH for USDC" --new-session --public-key 0xYourAddress --chain 138aomi tx list && aomi tx simulate tx-1 tx-2 && aomi tx sign tx-1 tx-239aomi chat "stake 0.5 ETH on Lido" --app lido --chain 1 --new-session40```4142Four end-to-end walkthroughs (approve+swap, lending, bridging, staking) in [examples.md](references/examples.md). Per-app first-turn examples (Khalani, 0x, Polymarket, Binance, Neynar) in [apps.md](references/apps.md#usage-examples).4344## Output4546- `aomi chat`: agent response or `⚡ Wallet request queued: tx-N`47- `aomi tx list`: table of pending/signed tx ids with `batch_status`48- `aomi tx simulate`: per-step success/failure, revert reason, gas usage49- `aomi tx sign`: transaction hash and on-chain confirmation5051## Error Handling5253| Error | Cause | Solution |54|-------|-------|----------|55| `insufficient funds for transfer` | Signing EOA has no native gas | Fund the EOA on the destination chain — local signing has no sponsorship path |56| `AA execution now runs in the backend lane` | An AA path was selected on `tx sign` | Drop `--aa`/`--aa-provider`/`--aa-mode`; if no flags were passed, unset `AOMI_AA_PROVIDER`/`AOMI_AA_MODE` |57| `stateful: false` in simulation | Wrong batch order | Reorder tx ids to match execution dependency |58| `RPC 401`/`429` | Rate-limited or missing key | Set `--rpc-url` to authenticated endpoint |59| No tx queued after chat | Agent returned quote first | Run `aomi tx list`; send a confirmation reply |60| Orphaned `tx-N` in list | Previous simulation failed | Only sign txs with `batch_status: passed` |61| `Failed to get apps/models: HTTP 404` | Public backend does not expose that introspection route | Treat `app list`/`model list` as backend-dependent; do not block chat/sign flows on it |6263Full troubleshooting in [troubleshooting.md](references/troubleshooting.md).6465## Safety Justification6667This skill is `risk_tier: L2` because it can sign and broadcast on-chain transactions. The permissions manifest enforces least privilege:6869- **Shell allowlist** scopes execution to `aomi` and `npx @aomi-labs/client@latest` only — no arbitrary subprocesses.70- **Network allowlist** restricts outbound traffic to `chat.aomi.dev` (the CLI's default backend; `api.aomi.dev` is the legacy host). User-supplied `--rpc-url` endpoints are resolved by the CLI itself; operators must review them before allowing signing.71- **File scope** is read+write to `~/.aomi/` only; identity files (`SOUL.md`, `MEMORY.md`, `AGENTS.md`) are deny-listed against writes per OWASP AST03 mitigation #3.72- **No blind signing.** Multi-step flows go through `aomi tx simulate` on a forked chain before `aomi tx sign`. Drain-vector calldata fields (`recipient`, `onBehalfOf`, `mintRecipient`, `_to`) are blocked at simulation time when they do not equal `msg.sender` — see [drain-vectors.md](references/drain-vectors.md).73- **Opaque credentials.** The skill never fabricates, derives, or echoes credential values; setup commands run only when the user explicitly asks and supplies the value in this turn. Full rules in [gotchas.md → Hard Rules](references/gotchas.md#hard-rules).7475## When to Use7677- The user wants to chat with the Aomi agent from the terminal.78- The user wants balances, prices, routes, quotes, or transaction status.79- The user wants to build, simulate, confirm, sign, or broadcast wallet requests.80- The user wants to inspect or switch apps, models, chains, or sessions.81- The user wants to inspect or change Account Abstraction preferences (synced to the backend lane).82- The user wants to authenticate a CLI account with `aomi account login`, inspect it with `aomi account whoami`, or inspect linked wallets and login methods with `aomi account links`.83- The user wants to build a new app from an API spec or SDK — use the companion skill **aomi-build**.8485## Command Surface8687```88aomi Interactive REPL89aomi --prompt "<message>" Send one prompt and exit90aomi chat <message> Send a message91aomi tx list|simulate|sign92aomi session list|new|resume|delete|status|log|events|close93aomi model list|set|current94aomi app list|current95aomi chain list|set|current96aomi wallet set|current|whoami97aomi account login|whoami|logout|links|link|unlink|rename|update|delete|sessions|switch98aomi logout99aomi config set-backend|current100aomi secret list|clear|add101```102103There is **no** `aomi thread`, `aomi cron`, `aomi login`, or `aomi wallet ls|dev-key|set-mode` on this CLI — those belong to the separate Rust `aomi-cli`. `aomi deploy` is advertised in `--help` but unreachable in v0.4.2 (fix pending in aomi-labs/aomi#467). Full command reference, flags, and env vars in [commands.md](references/commands.md).104105## Resources106107- Source repository: https://github.com/aomi-labs/skills/tree/main/aomi-transact108- npm package: https://www.npmjs.com/package/@aomi-labs/client109- Companion skill for adding new protocol integrations: [aomi-build](https://github.com/aomi-labs/skills/tree/main/aomi-build)110- Account abstraction deep-dive: [references/account-abstraction.md](references/account-abstraction.md)111- Drain-vector catalog (security): [references/drain-vectors.md](references/drain-vectors.md)112- End-to-end transaction examples: [references/examples.md](references/examples.md)113- Troubleshooting playbook: [references/troubleshooting.md](references/troubleshooting.md)114- OWASP AST03 (Over-Privileged Skills) spec: https://owasp.org/www-project-agentic-skills-top-10/ast03115- Anthropic skill spec: https://docs.claude.com/en/docs/claude-code/skills