npx skills add ...
npx skills add agentlyhq/aixyz --skill aixyz-on-openclaw
Step-by-step guide for openclaw users to build, deploy, and monetise an AI agent with aixyz. Covers everything from zero: installing Bun, scaffolding an agent, choosing a deployment option, getting a crypto wallet, funding it for on-chain registration, and marketing your agent once it is live.
npx skills add agentlyhq/aixyz --skill aixyz-on-openclaw
This guide is written for openclaw users who want to ship a live, paid AI agent using aixyz. You do not need prior coding experience or knowledge of crypto infrastructure — every step is explained from scratch.
Quick reference: The general aixyz skill lives at skills.sh/agentlyhq/aixyz. Consult it for full CLI flags and advanced topics. This guide focuses on the path that matters most to openclaw users.
An AI agent that:
aixyz requires Bun (not Node). If you already have Bun ≥ 1.3, skip this step.
Verify:
Why Bun? The aixyz build pipeline uses Bun's native build API and plugin system — this is a hard architectural requirement, not a preference. The CLI (
@aixyz/cli) cannot run on Node. Bun also includes a built-in test runner, which means no extra test framework is needed. Curious about the full rationale? Read Why Bun.
CRITICAL: You MUST use
create-aixyz-appto create new agent projects. Do NOT manually createaixyz.config.ts,package.json,app/agent.ts, or any other project files by hand. Manually creating these files WILL result in broken builds, missing dependencies, and incorrect configurations. Always scaffold withbunx create-aixyz-appfirst, then modify the generated files.
This creates:
Open .env.local and add your LLM provider's API key. The default scaffold uses @ai-sdk/openai, so add:
If you prefer a different provider (Anthropic, Google, Amazon Bedrock, etc.), swap the @ai-sdk/* adapter in package.json and app/agent.ts, then set the corresponding env var instead. See ai-sdk.dev for the full list of providers.
Run locally to test:
Testing with an AI agent client? Install the
use-agentlyskill so your AI agent can call your local agent in dev mode:This skill lets any AI agent discover and call your locally running agent at
http://localhost:3000. While testing locally, set"scheme": "free"so callers are not charged (see Step 7). Before going to production, switch to"scheme": "exact"so your agent earns from every request.
Your agent needs a public HTTPS URL so other agents and clients can reach it. If you already have a preferred hosting platform, use it. If you are starting fresh, here are our recommendations.
Vercel gives you a free HTTPS URL with zero configuration. It is the easiest path.
bun run build and the Output Directory to .vercel/outputOPENAI_API_KEY) in the Vercel dashboard under Settings → Environment Variableshttps://my-agent.vercel.appVercel auto-deploys on every push. Your agent is serverless and scales automatically.
Use these if your agent needs to hold state between requests or run background jobs.
| Platform | Free tier | Notes |
|---|---|---|
| Railway | 5 USD/month credit | Easiest Docker-free deploy |
| Render | Generous free tier | Sleeps after inactivity |
| Fly.io | Free allowance | More control, steeper learning curve |
For all three: push your repo, connect the platform, set your LLM provider API key (e.g., OPENAI_API_KEY) as an environment variable, and follow their deploy wizard. They all detect Bun automatically.
If you are already running OpenClaw on a cloud platform (AWS, GCP, Azure, DigitalOcean, etc.), the simplest path is to expose the agent through that same platform:
🔒 Least-privilege rule: When exposing the agent process, only open the port the agent listens on (default
3000). Do not grant the process broader network, IAM, or filesystem access than it needs to serve HTTP requests.
If you just need a quick tunnel for local testing, use ngrok:
⚠️ Security warning: Local tunnels are fine for short-lived testing but should never be used for a production agent. Anyone who discovers the URL can send requests to your machine. Always use a proper hosting provider for live traffic.
You need a wallet to:
use-agently (simplest, recommended for openclaw users)use-agently is the simplest wallet for the aixyz ecosystem. It is designed for the circular economy of agents paying agents.
When prompted during aixyz erc-8004 register, select "Generate a new wallet" and the CLI will create one for you and display the private key.
🔐 Private key security — read this carefully:
- Never share your private key with anyone. Anyone who has it controls your funds.
- Never commit it to git or paste it in public channels (Discord, Slack, GitHub, etc.).
- Write it down offline and store it somewhere safe (e.g., a password manager).
- For a production agent that earns significant income, consider a hardware wallet (Ledger, Trezor).
0x…)Any wallet that supports Ethereum-compatible networks works: Coinbase Wallet, Rabby, Frame, etc.
Your wallet address is your "bank account number." You share it publicly. Your private key / seed phrase is your password — never share it, never commit it to code.
Registering on ERC-8004 costs a small gas fee (a fraction of a dollar). You need the native coin of your chosen network.
| Network | Coin needed | Where to get it |
|---|---|---|
| Ethereum mainnet | ETH | Coinbase, Binance, Kraken |
| BNB Smart Chain | BNB | Binance |
| Base | ETH | Coinbase (Base is a Coinbase L2) |
| Polygon | POL | Coinbase, Binance |
Recommended network: Base. The x402 payment facilitator is primarily deployed on Base, so your agent will receive payments most reliably there. Base also has very low gas fees — registration typically costs a few cents. Ethereum mainnet gas varies widely and is usually not worth it for getting started. Gas prices on all networks can fluctuate; the amounts above are rough guides only.
Steps to fund your wallet:
No crypto yet? You can still build and run your agent locally and on Vercel without registration. Register once you are ready to be publicly discoverable.
ERC-8004 is an on-chain registry that makes your agent discoverable by other agents, platforms, and users. It is like a DNS entry but for AI agents.
Once your agent is deployed (Step 3) and you have a funded wallet (Steps 4–5), run:
The CLI will ask for (or accept as flags):
| Prompt | Flag | What to enter |
|---|---|---|
| Agent URL | --url | Your deployed URL from Step 3 |
| Chain | --chain | base (recommended), ethereum, bsc, polygon |
| Wallet private key | --private-key | The key from your wallet (never share this) |
| Trust mechanisms | --trust | Accept the default |
| Broadcast | --broadcast | Pass this flag to actually submit on-chain |
See all flags:
After registration, your agent appears in the ERC-8004 registry and becomes discoverable by the ecosystem.
Add an accepts export to app/agent.ts so callers are charged per request:
Testing tip: Use
"scheme": "free"while developing and testing locally (install theuse-agentlyskill to call your local agent from an AI client). Before going to production, switch to"scheme": "exact"with apriceso your agent earns from every request.
Set the wallet address that receives payments in aixyz.config.ts:
Or pass it at scaffold time:
Payments flow directly to your wallet — no platform takes a cut.
Before announcing your agent, verify:
bun run dev works locally and the agent responds correctlyOPENAI_API_KEY) and any other secrets are set as environment variables on the platform, not committed to your repoaixyz.config.ts has the correct name, description, and payTo addressaccepts export is set so your agent earns from requestsRegistration is only half the work. Getting on-chain doesn't automatically bring users. You need to actively promote your agent.
description in aixyz.config.ts — this appears in the A2A agent card and on-chain registryapp/icon.png — a good icon makes your agent stand out in listings/.well-known/agent-card.json URL — it is the standard entry point for agent-to-agent discovery$0.001–$0.01 per request and adjust based on demandaixyz erc-8004 update --helpRestart your terminal after installing Bun, or run source ~/.bashrc (Linux) / source ~/.zshrc (macOS).
Add your LLM provider's API key to .env.local (local dev) or to your platform's environment variable settings (production).
Your wallet does not have enough gas. Add a few more dollars of the relevant coin and retry.
Check that your platform's build command is bun run build and that all environment variables are set. Check the platform's deploy logs for errors.
Verify your payTo address in aixyz.config.ts is correct and that you rebuilt and redeployed after changing it.
# Create a new agent project (uses all defaults)
bunx create-aixyz-app my-agent --yes
cd my-agentmy-agent/
aixyz.config.ts ← agent name, description, payment config
app/
agent.ts ← your AI agent logic
tools/ ← tool files (optional)
package.json
.env.local ← API keys (never commit this file)OPENAI_API_KEY=sk-...bun run dev
# Agent is now live at http://localhost:3000