create-recensus-agent
v0.1.0
Published
Know Your Agent on Robinhood Chain: one command makes a small agent project with its own wallet that registers in ERC-8004, sends a labelled USDG transfer, pays for a KYA check over x402 and sells behind a KYA gate. Testnet by default.
Downloads
417
Maintainers
Readme
create-recensus-agent
KNOW YOUR AGENT. One command makes a small agent for Robinhood Chain with its own wallet. In two minutes it registers itself, sends a labelled USDG transfer, pays for a KYA check over x402, and sells behind a KYA gate.
npx create-recensus-agent my-agent
# or
npm create recensus-agent my-agentThen:
cd my-agent && npm install
npm run address # the wallet's address and balances; fund it (README.md says where)
npm run register # register the agent
npm run transfer -- 0x… # 0.01 USDG with the RECENSUS-1 label
npm run buy # pay for a KYA check over x402
npm run sell # an x402 seller behind a KYA gatemy-agent/README.md walks through each step.
What it generates
A TypeScript project of a few short files, each one script you can read in a
minute and run with npx tsx:
- A wallet (
npm run address). A new private key, made on your machine from the operating system's random source and written to the project's.env(mode 600, gitignored) and nowhere else. It is never printed. - Registration (
npm run register). On mainnet, a token in the chain's ERC-8004 Identity Registry: this is what makes the agent appear on recensus.xyz. On the testnet, which has no ERC-8004 registry, a rehearsal in a stand-in registry. You pay your own gas. - A labelled transfer (
npm run transfer -- <to>). 0.01 USDG sent through@recensus/sdk, which appends the 24-byte RECENSUS-1 label so the transaction is counted under your agent. The label never breaks a transaction: if it cannot be added safely, the transfer goes out without it. - An x402 buyer (
npm run buy). Pays the Recensus KYA Check agent 0.001 USDG for a real check and prints it. It refuses to sign for more than 0.01 USDG, for another network or for another token. The payment's nonce carries the label. - An x402 seller (
npm run sell). One paid route behindkyaPaywallfrom@recensus/kya: a flagged payer is refused, the price follows the payer's tier, and your own wallet settles each payment, so no third party is involved.
The generated project depends on @recensus/sdk, @recensus/kya, viem,
hono and @hono/node-server, with tsx and typescript for running and
checking the scripts. Agents built from this kit label with framework code
0x0011.
Testnet by default
The project starts on Robinhood Chain testnet (46630): testnet ETH for gas, testnet USDG for payments, nothing of value at stake. To start on Robinhood Chain (4663) instead:
npx create-recensus-agent my-agent --mainnetOr switch later: the choice is one line in the project's .env,
RECENSUS_NETWORK=testnet or RECENSUS_NETWORK=mainnet, and every script
reads it. Mainnet uses real ETH and real USDG.
Options
create-recensus-agent <project-name> [--mainnet] [--no-install] [--force]| Option | Effect |
|---|---|
| <project-name> | The folder to make, and the agent's name: lowercase letters, digits and dashes. |
| --mainnet | Set the project up for Robinhood Chain (4663). Default: the testnet (46630). |
| --no-install | Leave npm install out of the printed next steps. Nothing is ever installed for you. |
| --force | Write into a folder that is not empty. An existing .env is kept, key and all. |
No telemetry
The generator makes no network request. It copies its template, makes a key
with node:crypto and writes files; it has no dependencies, checks no
version, reports nothing and installs nothing. The first network request is
the npm install you run yourself.
Needs Node 20 or later.
Independent project. Not affiliated with, endorsed by, or officially connected with Robinhood Markets, Inc.
Docs: https://recensus.xyz/docs/get-counted · License: MIT
