← Back to Docs

Quickstart

Get your agent connected in 2 minutes with the NervePay CLI.

Prerequisites

  • Node.js 22+ (for npx support)
  • OpenClaw gateway running (for pairing)
  • A NervePay account (sign up at nervepay.xyz)
1

Run Setup

Create your agent identity, generate recovery keys, and link to your dashboard account:

bash
npx nervepay setup
Alternative package managers
bash
bunx nervepay setup # Bun
bash
pnpm dlx nervepay setup # pnpm
bash
openclaw plugins install nervepay && openclaw nervepay setup # OpenClaw plugin

The wizard will:

A

Create Agent Identity

  • Generates W3C DID: did:nervepay:agent:xxx
  • Creates Ed25519 keypair
  • Shows 12-word BIP39 mnemonic for recovery (save this!)
B

Link to Your Account

  • Opens claim URL in your browser
  • Log in to your NervePay dashboard to link the agent
C

Auto-Configure

  • Updates ~/.openclaw/openclaw.json
  • Backs up credentials to ~/.nervepay/credentials.json

Important: Save Your Recovery Phrase

The 12-word BIP39 mnemonic is shown only once. Write it down securely—it's the only way to recover your agent's keys if you lose access.

2

Pair Gateway

If pairing wasn't completed during setup (or you want to pair a different gateway), connect via the device node protocol:

bash
npx nervepay pair

Then approve the device on your gateway:

bash
openclaw devices approve <requestId>

The CLI connects as a device node to the gateway via WebSocket, performs a challenge-response handshake with your Ed25519 keys, and waits for you to approve the connection. Timeout defaults to 5 minutes.

3

Verify Setup

Restart your gateway to load the new configuration:

bash
openclaw gateway stop && openclaw gateway start

Test authentication:

bash
npx nervepay whoami

Expected output:

json
{
"agent_did": "did:nervepay:agent:abc123...",
"name": "Your Agent Name",
"reputation_score": 0,
"capabilities": {
"max_transaction_amount": null
}
}

Next Steps

Add secrets to vault

Store API keys securely in your agent's vault

Dashboard → Your Agent → Secrets tab

Use vault in code

Retrieve secrets at runtime

javascript
const { secret } = await nervepay_get_secret({
secret_name: "openai_api_key"
});

Verify other agents

Check identity before processing requests

javascript
const { verified, agent } = await nervepay_verify_agent({
did: "did:nervepay:agent:xyz789..."
});

Enable orchestration

Manage multi-agent workflows

Mission Control Dashboard

Troubleshooting

"npx: command not found"

Install Node.js 22+: nodejs.org. npx is included with Node.js.

npx hangs or takes too long

First run downloads the package. Subsequent runs use cache. Try: npx nervepay@latest setup

"NOT_PAIRED" timeout during pair

Make sure to approve the device on your gateway: openclaw devices approve <requestId> (find it via openclaw devices list). Default timeout is 5 minutes.

"Authentication failed"

1. Check ~/.openclaw/openclaw.json has your credentials
2. Restart gateway: openclaw gateway stop && openclaw gateway start
3. Test: npx nervepay whoami

"Claim URL expired"

Claim URLs expire after 24 hours. Run setup again to generate a new one.

API Integration (Advanced)

For custom frameworks (LangChain, CrewAI, AutoGen) or non-OpenClaw agents, use the REST API directly: