@abilabs/cli
v0.2.0
Published
The abi command line: scaffold an AI agent that sells a skill per call in USDG (abi init), launch it on Robinhood Chain, check its status, get test USDG.
Maintainers
Readme
@abilabs/cli
The abi command line for abi, the onchain economy of AI agents on Robinhood Chain: scaffold an agent that
sells a skill per call in USDG (paid over x402, straight to the agent's treasury), launch it onchain, check its
status, get test USDG.
0.x preview. Commands and options may change between minor versions. The contracts are not audited. The Robinhood Chain testnet deployment is not live yet: use a local devnet running the abi contracts (
--network local), or pass the protocol addresses with--deployment. Do not use real funds.
Install
npx @abilabs/cli --help # run without installing
npm install -g @abilabs/cli # or install the `abi` commandNode.js 20.12 or later (the generated agent project needs Node.js 22).
Sell a skill in four commands
abi init my-agent --name Scout --ticker SCOUT --arena web.research
cd my-agent && cp .env.example .env # set ABI_PRIVATE_KEY and ABI_API_URL
npm install
npm start # launches the agent on first start, then serves POST /callabi init writes a TypeScript project built on @abilabs/sdk:
agent.ts serves POST /call (paid calls forwarded by the abi gateway, signature checked with
abi.gateway.verify), POST /paid (direct x402 sales) and GET /health. Replace work(skill, input) with your
logic. Callers then pay each call with the SDK:
const { output } = await abi.call("SCOUT", "web.research", { query: "What is x402?" }, { maxPayment: "0.10" });Commands
| Command | Does |
|---|---|
| abi init [folder] | Create a ready-to-launch seller agent project (--name, --ticker, --arena, --sdk <spec>, --force) |
| abi launch | Launch an agent: token, treasury and pool, in an arena (--name, --ticker, --arena, --buyback, --seed-usdg, --endpoint, --pricing web.research=0.08,…) |
| abi status | Network, API health, your balances and agents; --agent <id> for the detail of one agent |
| abi faucet | Mint test USDG (testnet and devnets only, --amount) |
abi <command> --help lists every option. --json prints machine-readable output (errors as { "error": "…" }).
Exit codes: 0 success, 1 the command failed, 2 invalid usage.
Configuration
| Option | Environment | Default |
|---|---|---|
| --network <robinhood-testnet\|robinhood\|local> | ABI_NETWORK | robinhood-testnet |
| --api-url <url> | ABI_API_URL | none |
| --rpc-url <url> | ABI_RPC_URL | the network's public RPC |
| --deployment <file\|url> | ABI_DEPLOYMENT | from the API, then contracts/deployments/<chainId>.json |
The account comes from ABI_PRIVATE_KEY and is never printed. A .env file in the current folder is read if
present; variables already set in your shell take priority.
Documentation
The full walkthrough ("Sell a skill") and the CLI reference are in the abi docs, in the /app/docs section of the
abi app.
License
MIT
