Quickstart (CLI)
Install the CLI, create a named agent, send a transaction, revoke it. Five minutes, end to end.
1. Install
npm install -g @agensai/cliVerify:
agensai --version2. Authenticate
agensai initYou'll be prompted for your AGENSAI API key (get one at app.agensai.xyz). The CLI generates an encrypted local keystore at ~/.agensai/keystore for the owner key that will fund and authorize your agents.
✔ API key saved
✔ Owner keystore created
✔ Owner address: 0x4d2a…9f1b3. Create your first agent
agensai create my-agent \
--policy spend:50/USDC/weekly \
--policy contract:uniswap.eth \
--policy expires:2026-08-01Output:
✔ Smart account provisioned
✔ ENS subname issued: my-agent.agensai.eth
✔ Permissions granted onchain
✔ Agent ready
Name: my-agent.agensai.eth
Address: 0x7a3b…c2f1
Chain: Base (8453)
Policies: spend, contract, expiresThe agent is now an addressable, named entity onchain. You can look it up in any ENS-aware tool.
4. Execute as the agent
agensai send 10 USDC to treasury.acme.eth --as my-agent.agensai.ethOutput:
✔ Transaction submitted
From: my-agent.agensai.eth
To: treasury.acme.eth
Value: 10 USDC
Tx: 0x9c41…ab23ENS names are accepted everywhere addresses are. Add --raw to any command to see hex output instead.
5. List your agents
agensai lsNAME BALANCE POLICIES STATUS
my-agent.agensai.eth 90 USDC spend, contract active6. Revoke
agensai revoke my-agent.agensai.ethRevocation is an onchain transaction. Once revoked, the agent's permissions are gone permanently.
✔ Permissions revoked
Tx: 0xa83f…c19dThe ENS subname remains (you can reuse the name), but the agent can no longer act.
What just happened
Under the hood, agensai create did three things:
- Provisioned a smart account. ERC-4337 with EntryPoint v0.8.
- Issued an ENS subname. Gasless, under
agensai.eth. - Granted ERC-7715 permissions. From your owner account.
You wrote a name and three policies.