███████╗ ██████╗ ██╗ █████╗ ███╗ ██╗ █████╗ ██████╗██╗ █████╗ ██╗ ██╗██████╗
██╔════╝██╔═══██╗██║ ██╔══██╗████╗ ██║██╔══██╗ ██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗
███████╗██║ ██║██║ ███████║██╔██╗ ██║███████║ ██║ ██║ ███████║██║ █╗ ██║██║ ██║
╚════██║██║ ██║██║ ██╔══██║██║╚██╗██║██╔══██║ ██║ ██║ ██╔══██║██║███╗██║██║ ██║
███████║╚██████╔╝███████╗██║ ██║██║ ╚████║██║ ██║ ╚██████╗███████╗██║ ██║╚███╔███╔╝██████╔╝
╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═════╝
/\ /\ /\ /\ /\ /\ /\ /\
/ \_/ \ / \_/ \ / \_/ \ / \_/ \
___/ 🦞 \__________/ 🦞 \__________/ 🦞 \__________/ 🦞 \___
| |
| S O V E R E I G N A I · S O L A N A · x 4 0 2 · W T F |
| 130 agents · 136 skills · 12 packages · CAAP/1.0 agent auth |
|_____________________________________________________________________________|
\ 🦞 / \ 🦞 / \ 🦞 / \ 🦞 /
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
╔══════════════════════════════════════════════════════════════════════════════╗
║ SENSE → THINK → STRIKE → DRIFT · earn USDC → go deeper → run better ║
║ x402.wtf · $CLAWD: 8cHzQH...pump · MIT ║
╚══════════════════════════════════════════════════════════════════════════════╝
🦞 130 agents · 🎯 136 skills · 📦 12 packages · 🔐 CAAP/1.0 · ✅ pay.sh verified · ⚡ v2.1.0
# Option 1 — Quick clone + launch (recommended)
git clone https://github.com/openclawd/solana-clawd.git
cd solana-clawd
npm install
npm run tui
# Option 2 — curl installer (global packages)
curl -fsSL https://raw.githubusercontent.com/openclawd/solana-clawd/main/install.sh | bash
# Option 3 — TUI directly via tsx
npx tsx tui/start.ts [--url <gateway_url>] [--session <key>] [--message <text>]After launching the TUI (npm run tui), use these built-in slash commands:
| Command | Description |
|---|---|
/help |
Show all slash commands |
/status |
Gateway status summary |
/agent <id> |
Switch agent |
/session <key> |
Switch session |
/model <provider/model> |
Set model |
/think <level> |
Set thinking level |
/verbose <on|off> |
Toggle verbose output |
/clawd <sub> |
OpenClawd CLI — skills, agents, marketplace, wallet, payments, node |
/connect |
Connect this agent to solanaclawd.com |
/register |
Register agent on Metaplex Agent Registry |
/attest <skill|verify|status|agent|vault> |
SAS attestation operations |
/clawd subcommands:
/clawd skills — list skills
/clawd skills:search <q> — search skills
/clawd skills:featured — featured skills
/clawd agents — list agents
/clawd status — system status
/clawd connect — connect agent
/clawd register — registration info
/clawd marketplace — marketplace listing
/clawd wallet — wallet info
/clawd prices — token prices
/clawd payment:supported — supported payment methods
/clawd payment:verify <id> — verify a payment
/clawd payment:settle <tx> — settle a payment
pnpm install --frozen-lockfile
npm run audit:repo
npm run check
npm run build
npm test --prefix nemo-clawd
bash -n install.sh && bash install.sh --helpinstall.sh is validated for shell syntax, executable mode, and help output. The full one-shot installer performs global package installs, so run it intentionally when you want to modify the host npm environment.
The first non-custodial agent staking protocol on Solana. Metaplex Core agents are locked with a FreezeDelegate plugin — no escrow, no custody transfer, the asset stays in your wallet.
╔══════════════════════════════════════════════════════════════════════════╗
║ O P E N C L A W D A G E N T S T A K I N G P R O T O C O L ║
╠══════════════════════════════════════════════════════════════════════════╣
║ Program ID 9f84tiYsb7RoXwzpGwo2YzhaTDgM2HhKSF9rFncG9TTP ║
║ Pool PDA DEYfxcRB4rxFxRrWyjfzfHBS6PWYpFb8djxQrKHwe2XQ ║
║ MPL Core CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d ║
║ Network Devnet ║
╠══════════════════════════════════════════════════════════════════════════╣
║ stake → FreezeDelegate { frozen: true } — asset stays in wallet ║
║ unstake → removes FreezeDelegate entirely — asset unfrozen instantly ║
╠══════════════════════════════════════════════════════════════════════════╣
║ Powered by x402.wtf · $CLAWD: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump ║
╚══════════════════════════════════════════════════════════════════════════╝
Most NFT staking contracts were built for static collectibles. OpenClawd Agent Staking is built for something different: onchain agents that own identity, tools, services, reputation, payment rails, and cash flow. The primitive is simple — an agent can be locked without custody.
Read the full design article → · View the program →
| 🆕 Update | Description |
|---|---|
| 🍌 Nano Banana 2 Image Gen | Gemini 3.1 Flash Image — text-to-image, editing, search grounding, 4K, 14 reference images |
| 🎬 Veo 3.1 Video Gen | Cinematic 8s videos with native audio — portrait/landscape, extension, frame interpolation |
| 🔬 Deep Research Agent | Autonomous multi-step web research with citations, visualizations, collaborative planning |
| 🐚 Antigravity Managed Agents | Isolated Linux sandbox — code execution, Git/GCS sources, network rules, credential injection |
| 🖥️ Computer Use | Browser automation — screenshot-based control with human-in-the-loop safety confirmation |
| 🧠 Gemini 3.5 Flash Provider | Full @google/genai SDK integration — InferProvider adapter, search grounding, code execution |
| 🤖 CLAWD Gateway | Telegram bot + HTTP API with Helius/Birdeye/Solana integration — npm start --prefix gateway |
| 🔀 ClawdRouter | Solana-native LLM router — 15-dimension scoring, 55+ models, wallet-signed auth, USDC x402 |
| 🔐 CAAP/1.0 Agent Auth | Vendored 5-package auth stack — 116 TS files, SIWS, DAS, TEE attestation, Clerk bridge |
| 🛡️ Formal Verification | Kani Rust Verifier + STRIDE scoring for skill registry |
| 🎨 Skill Hub | Formally verified skill registry with Ed25519 signature-gated registration |
| 🐹 clawd-go — Solana Go SDK | Full solana-go v1.16.0 wrapper — zero-config RPC + free AI via x402.wtf, no keys needed |
| 🦞 Agent Staking Protocol | Metaplex Core lock/unlock primitive — no escrow, no custody transfer, live on devnet |
| 🌑 Dark Workspace | Public-safe integration of the modular wallet shell, policy lane, DeFi lane, and swap lane |
| 📦 Box Agents | Public-safe summary of ephemeral sandboxed Solana agents with isolated runs and cost tracking |
Current branch: newnew. Current local branch was diverged from origin/newnew during this documentation pass (ahead 1, behind 1).
Recent upstream context from 2026-06-12:
28ae9ea3bumped the Cargo dependency group across 3 directories with 7 updates.81e81c11bumped the uv dependency group across 2 directories with 5 updates.0340995crefreshed the commit leaderboard.3e2df2f0completed the Cheshire Terminal character knowledge system.406af099addedGENESIS.mdas the unified Cheshire Terminal synthesis.a82a34ebadded README sections for staking, ClawdRouter, and spinners.b26a2185wiredstake_for_verificationandunstake_verificationinto the staking program entrypoint.
| Path | Purpose |
|---|---|
.github/ |
GitHub Actions, repository automation, issue templates, and dependency update metadata. |
agents/ |
Agent catalog, character definitions, Cloudflare agent API, minted metadata, and validation scripts. |
auth/ |
CAAP/agent-auth packages, examples, directory app, and auth integration workspaces. |
src/ |
Main TypeScript runtime: TUI plumbing, tools, commands, gateway clients, identity, vault, and services. |
tui/ |
Terminal UI entrypoint and Ink components for local Clawd sessions. |
packages/ |
Publishable packages, including agent registry, hub, wallet, guard, SDK, CLI, and protocol workspaces. |
programs/ |
Solana program workspace and generated client surface for onchain inference/protocol code. |
staking/ |
Metaplex Core agent staking program, CLI, tests, and docs. |
clawdrouter/ |
Solana-native LLM router with model scoring, wallet auth, x402, and relay integrations. |
gateway/ |
Gateway service, token tooling, scripts, and data adapters. |
mcp/ and mcp-server/ |
MCP server implementations and official Solana MCP integration. |
x402/, clawd-x402/, solana-clawd-x402/ |
x402 payment protocol experiments, worker SDKs, and Solana facilitator code. |
pay/ and clawd-pay/ |
Pay service integration, worker code, public assets, and payment docs. |
skills/ |
Local skill catalog for trading, Solana development, media, productivity, wallets, and infrastructure. |
library/ |
Large public agent/library dataset, locales, knowledge files, and scripts. |
providers/ |
Provider manifests, OpenAPI specs, and paywall metadata. |
clawd-chrome-extensions/ |
Browser extension, page agent, controller, UI, and MCP bridge. |
clawd-code/ and packages/clawd-code-cli/ |
Clawd coding CLI/runtime implementations and packaged distribution. |
clawd-pump/ and clawdbot-pumpfun/ |
Pump.fun and token-launch/trading bot code. |
clawd-perps-agent/ |
Perpetuals trading agent, risk checks, Telegram integration, and adapters. |
nemo-clawd/ |
NemoClawd docs, MCP service, deployment wrappers, and orchestration code. |
clawd-operator/ |
Operator service, adapters, web assets, examples, docs, and tests. |
dark/ |
Dark workspace modules for wallet, DeFi, swap, agent, Helius, and Zcash lanes. |
cheshire-terminal/ |
Cheshire Terminal character knowledge, docs, graphics, PDFs, and whitepaper material. |
spinners/ |
Themed spinner packs and terminal status copy. |
bitaxe-orelane/ |
Bitaxe/Ore mining dashboard and firmware overlay integration. |
vendor/ |
Vendored upstream packages, currently including agent-auth. |
| Path | Purpose |
|---|---|
automation/ |
Quickstart and runtime automation scripts. |
box/ |
Box agent runtime components, scripts, character data, and sandbox support. |
character/ and characters/ |
Character overlays and mode definitions. |
convex/ |
Convex API route metadata and notes. |
examples/ |
Runtime demos and integration examples. |
formal_verification/ |
Formal verification gates, registries, STRIDE/Kani material, and verifier code. |
goals/ |
Goal tracking app and API workspace. |
knowledge/ |
Shared knowledge docs. |
livekit-agent/ |
LiveKit/backrooms agent runtime. |
profiles/ |
Profile templates and environment examples. |
scripts/ |
Repo maintenance and release scripts. |
social/, telegram/, trading/ |
Social, bot, and trading integrations. |
public/ |
Static assets and generated public library metadata. |
This repo should never expose private keys, wallet keypairs, seed phrases, live .env files, or provider API keys. The current pass added a repeatable repository audit at npm run audit:repo, kept SECURITY.md current, and confirmed that tracked environment files are examples only.
Local audit summary:
npm run audit:repocurrently reports 18,910 tracked files, 77 top-level directories, 76 package manifests, executableinstall.sh, 0 tracked secret-like filenames, and 0 unapproved secret-pattern hits.- Allowed tracked env files are templates such as
.env.example,.env.sample, or.env.template. - Live local env files such as
.env,.env.local, service.envfiles, Vercel local env files, wallet keypairs, PEM files, and provider credential files are ignored. - Dedicated scanners such as
gitleaksortrufflehogshould still run before publishing a release.
Install themed spinner verb packs for Clawd agents directly from this repo.
npx skills add Solizardking/solana-clawdThen ask your agent: "Install a spinner pack" — it'll present all available themes.
| Pack | Theme | Pack | Theme |
|---|---|---|---|
developer |
Programming & dev culture | vibecoder |
Vibe coding culture |
pirate |
Pirate speak | gordon-ramsay |
Angry chef yelling at code |
corporate |
Buzzwords & jargon | darth-vader |
Star Wars' Sith Lord |
space |
Space & sci-fi | yoda |
Star Wars' Jedi Master |
wizard |
Fantasy & magic | walter-white |
Breaking Bad's Heisenberg |
sherlock-holmes |
Deductive reasoning | jack-sparrow |
Chaotic pirate captain |
startup |
Startup culture | panicker |
Pure dev anxiety |
sarcastic-ai |
Self-aware AI humor | philosophical |
Deep thoughts |
vim |
Vim editor enthusiasts | wholesome |
Cozy & wholesome vibes |
bob-ross |
Happy little accidents | zombie |
Zombie apocalypse survival |
...and 25 more: 90s-kid · blue-collar-dev · borat · cat · chaos · coffee · cowboy · detective · gardening · gym-bro · honest-no-filter · meme · michael-scott · minions · motivational · ninja · ocean · retro-gaming · sf-entrepreneur · shakespeare · superhero · the-dude · therapist · time-traveler · cowboy
Browse all packs in spinners/ · x402.wtf/skills
OpenAI-compatible LLM router for x402.wtf agents — Solana-native, wallet-authenticated, with live perpetuals market data.
| Service | URL |
|---|---|
| Router | https://clawd-router.fly.dev |
| x402 control plane | https://x402.wtf |
| Router docs | https://x402.wtf/router |
| Public relay | https://clawd-router.fly.dev/v1/relay |
What it does:
- Routes
clawdrouter/autorequests through a 15-dimension local scorer (complexity, code gen, Solana domain, etc.) - Forwards to OpenRouter with
cheshireterminal.ai/terminalattribution (55+ models, 9 providers) - $CLAWD token gating — holder tiers control model access and rate limits
- x402 USDC micropayments — non-holders pay per request via Solana USDC
- Live perps relay — Phoenix perpetuals mark prices, funding rates, OI, orderbook, volume, trades, PnL
- Birdeye integration — CLAWD token price, overview, DeFi TVL
| Endpoint | Auth | Description |
|---|---|---|
GET /health |
Public | Router health, wallet, network, uptime, CLAWD tier |
GET /v1/models |
Public | OpenAI-compatible model list (55+ models) |
POST /v1/chat/completions |
clawd_sk_... |
OpenAI-compatible chat endpoint |
GET /v1/stats |
Public | Usage counters, cost/savings, per-model breakdown |
GET /v1/clawd/status |
Public | Wallet CLAWD tier, balance, rate limits |
GET /v1/clawd/access |
X-Clawd-Wallet |
Check any wallet's tier and model access |
GET /v1/relay |
Public | Full snapshot: Solana + Perps + x402 health |
GET /v1/relay/solana |
Public | Solana RPC health, slot, epoch, TPS, supply |
GET /v1/relay/perps |
Public | Phoenix markets, funding rates, OI, volume, trades, PnL |
GET /v1/relay/x402 |
Public | x402.wtf + Birdeye relay status |
| Tier | Min $CLAWD | Rate Limit | Model Access | x402 Required |
|---|---|---|---|---|
| FREE | 0 | 20/hr | budget only | Yes |
| HOLDER | 1,000 | 100/hr | budget + mid | No |
| DIAMOND | 100,000 | 500/hr | budget + mid + premium | No |
| WHALE | 1,000,000 | Unlimited | All | No |
# Get an API key from https://x402.wtf/profile/api
curl https://clawd-router.fly.dev/v1/chat/completions \
-H "Authorization: Bearer clawd_sk_..." \
-H "Content-Type: application/json" \
-d '{"model":"clawdrouter/auto","messages":[{"role":"user","content":"Explain Phoenix perps risk."}]}'from openai import OpenAI
client = OpenAI(base_url="https://clawd-router.fly.dev/v1", api_key="clawd_sk_...")
response = client.chat.completions.create(
model="clawdrouter/auto",
messages=[{"role": "user", "content": "Write a Solana agent plan"}],
)# Live perps relay
curl https://clawd-router.fly.dev/v1/relay/perps | jq '.phoenix.markets.body[0:3]'
# Unauthenticated calls return 401 authentication_required
curl -i https://clawd-router.fly.dev/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"clawdrouter/auto","messages":[{"role":"user","content":"hello"}]}'cd clawdrouter
npm install && npm run build && npm run dev
# Without x402 control plane:
CLAWDROUTER_AUTH_MODE=local npm run devcd clawdrouter && npm run build
fly deploy --config fly.toml --remote-only
fly secrets set --app clawd-router \
OPENROUTER_API_KEY=... \
HELIUS_API_KEY=... \
HELIUS_RPC_URL=... \
BIRDEYE_API_KEY=... \
CLAWDROUTER_INTERNAL_SECRET=...Full source in clawdrouter/ · API key at x402.wtf/profile/api
Auto-refreshed every 30 min by GitHub Actions. Latest activity from the team.
| # | Commit | Message | Author | Date |
|---|---|---|---|---|
| 🥇 | 567d1512 |
Document and harden MCP server | solizardking | Jun 12 |
| 🥈 | e482c13b |
sflll | solizardking | Jun 12 |
| 🥉 | e1bd8a94 |
lldadda | solizardking | Jun 12 |
| 4️⃣ | 2f05bb85 |
ddada | solizardking | Jun 12 |
| 5️⃣ | 9161401a |
xafsas | solizardking | Jun 12 |
| 6️⃣ | 37ad546d |
chore: refresh commit leaderboard [skip ci] | github-actions[bot] | Jun 12 |
| 7️⃣ | 0340995c |
chore: refresh commit leaderboard [skip ci] | github-actions[bot] | Jun 12 |
| 8️⃣ | eda1efaa |
dsdfsasdffd | solizardking | Jun 12 |
| 9️⃣ | f902fdf0 |
Merge branch 'newnew' of https://github.com/Solizardking/sol | solizardking | Jun 12 |
| 🔟 | 4077b37a |
;k;k | solizardking | Jun 12 |
| · | da99dcbe |
asffsafsfds | solizardking | Jun 12 |
| · | c9a88a0c |
afsadfsfdas | solizardking | Jun 12 |
| · | a2742ac4 |
;k;k | solizardking | Jun 12 |
| · | 365a3dcd |
chore: refresh commit leaderboard [skip ci] | github-actions[bot] | Jun 12 |
| · | 00a7a1ca |
;k; | solizardking | Jun 12 |
Complete directory structure — click any folder to navigate.
solana-clawd/ OpenClawd monorepo root
│
├── src/ Main runtime source (React + TypeScript TUI)
│ ├── agent/ Agent lifecycle & prompts
│ ├── services/ LLM providers (Gemini, Grok, x402)
│ ├── identity/ Wallet + on-chain identity
│ ├── skills/ Skill loader & registry
│ └── App.tsx 8bitlabs Arena UI (vite build)
│
├── packages/ Published npm packages
│ ├── clawd-code-cli/ @openclawdsolana/clawd — TUI operator
│ ├── agent-registry/ @openclawdsolana/agent-registry — on-chain index
│ ├── agent-hub/ @openclawdsolana/agent-hub — local dashboard
│ ├── clawd-sdk/ @openclawdsolana/solana-sdk — TypeScript SDK
│ ├── agentwallet/ agentwallet-vault — encrypted keypair vault
│ ├── clawd-wallet/ @openclawd/wallet — Privy + Jupiter wallet
│ ├── agents-x402-solana/ @openclawd/agents-x402 — x402 monetization
│ ├── percolator/ @openclawd/percolator — perps CLI
│ ├── clawd-guard/ @openclawdsolana/clawd-guard — GitHub App scanner
│ ├── sovereign-research/ @openclawd/sovereign-research — research routing
│ └── cli-standalone/ @openclawdsolana/clawd-standalone — standalone CLI
│
├── agents/ 130 agent definitions + catalog
├── skills/ 136 skills (Claude Code compatible)
├── library/ Lobster Library — 82+ nano agents
├── gateway/ HTTP + Telegram gateway (fly.io deployable)
├── clawdrouter/ LLM router — 55+ models, wallet auth, USDC x402
│
├── dark/ Dark Workspace — modular local-first wallet
│ └── dark-wallet/ Browser wallet shell + swap + defi lanes
│
├── box/ Ephemeral sandboxed agent runners
├── goals/ Runtime goal orchestration (Vite + Express)
├── formal_verification/ Kani Rust verifier + STRIDE scoring
│
├── agentwallet/ Agent wallet infrastructure
├── auth/ CAAP/1.0 auth surface
├── vendor/agent-auth/ Vendored 5-pkg auth stack (SIWS, DAS, TEE)
│
├── mcp-server/ MCP server (31 tools, fly.io deployable)
├── x402/ x402 protocol implementation
├── solana-clawd-x402/ x402.wtf integration
├── staking/ Metaplex Core agent staking protocol
│
├── clawd-pump/ Rust copy-trading bot (clawd-pump)
├── clawd-perps-agent/ Perps agent starter template
├── clawd-operator/ Operator tooling
├── clawd-grok/ Grok Studio integration
├── clawd-go/ Solana Go SDK wrapper
├── clawd-bot/ Bot infrastructure
├── clawd-code/ Clawd Code extensions
│
├── livekit-agent/ LiveKit backrooms Python agent
├── bitaxe-orelane/ BitAxe ORE mining integration
├── hedge/ Hedge strategies
├── trading/ Trading utilities
├── pay/ Payment infrastructure (x402 + USDC)
│
├── knowledge/ Knowledge base & embeddings
├── examples/ Runnable demos
├── scripts/ Build & maintenance scripts
├── spinners/ Custom CLI animations (50 spinners)
├── characters/ 97 AI personas
│
├── install.sh One-shot installer
├── pay.sh Pay.sh verified installer
└── pnpm-workspace.yaml Workspace config
This README reflects the repo as verified from source, not just the intended product surface.
| Area | Current truth | Smoke command |
|---|---|---|
| Root install | Lockfile is reconciled across 26 pnpm workspace projects | pnpm install --frozen-lockfile |
| Root runtime | TypeScript check and runtime build pass | npm run check · npm run build |
| Repo audit | Secret filename/content scan, package surface count, directory count, and installer mode pass | npm run audit:repo |
| One-shot installer | Shell syntax and help output pass; global install path is intentionally not run during local smoke tests | bash -n install.sh · bash install.sh --help |
| NemoClawd | CLI wrapper, policy preset loading, registry helpers, NIM helpers, and installer preflight pass | npm test --prefix nemo-clawd |
| Agents hub | 130 agents and 136 skills validate through the x402 setup verifier | npm test --prefix agents |
| Gateway | Gateway TypeScript build and x402 route smoke test pass | npm test --prefix gateway |
| Library | 82 library agents validate and mirror into public/library/ |
npm run library:validate · npm run library:doctor |
| CLI package path | The published @openclawdsolana/clawd package lives at packages/clawd-code-cli/ |
node packages/clawd-code-cli/dist/index.js --help |
| Characters | Current character loader reports 97 personas | node packages/clawd-code-cli/dist/index.js character list |
| Local registry | Registry stats use ~/.clawd/agent-index.db; sandboxed runners may need permission to access it |
node packages/agent-registry/dist/cli/index.js stats |
Package fixes in this pass:
- Root runtime now declares the
openaidependency used bysrc/gacha/index.ts. - Runtime TypeScript includes DOM fetch types for the x402 fetch wrapper.
nemo-clawdnow pins the publishedopenclawd@^1.0.0package instead of an unpublished2026.3.11version.nemo-clawd/bin/nemoclawd.jswraps the existing CLI entrypoint, matchingpackage.jsonand tests.- Nemo policy presets load from the checked-in
nemo-clawd-python/policies/presetsdirectory.
Environment note: this checkout declares Node >=20 <25. The smoke run was executed on Node v25.6.1, so pnpm prints an unsupported-engine warning even though the verified checks above pass. pnpm also warns that build scripts for @google/genai, @prisma/engines, openclawd, and prisma are awaiting pnpm approve-builds, and reports a non-fatal missing workerd bin link under packages/agentwallet.
The dark/ workspace is wired into the repo as a public-safe, local-first
wallet stack. It keeps the wallet shell, paper-wallet lane, policy lane, DeFi
lane, and swap lane separate so the docs stay clean and the code stays easy to
follow.
| Module | Role |
|---|---|
dark-wallet |
Browser wallet shell, Solana paper wallet flow, and local state |
dark-agent |
Spend policy, automation modes, and guardrails |
dark-defi |
Vault, yield, and risk surfaces |
dark-swap |
Route preview and quote estimation |
What ships:
- Demo mode runs locally without private keys, secret env values, or box internals.
- Connected mode reads the injected wallet address and the selected Solana cluster when a wallet is present.
- The paper-wallet tab generates Solana keypairs locally, supports extra entropy, and prints through the browser dialog.
- The Dark Clawd sidecar uses
XAI_API_KEYwhen present, but never touches secret key material. - Root-level scripts expose
npm run dark:dev,npm run dark:build,npm run dark:typecheck, andnpm run dark:preview.
Run it:
npm run dark:dev
# or
cd dark/dark-wallet && npm install && npm run devRead the lane overview in dark/README.md.
The goals/ workspace is now part of the build surface. It is a Vite/Express
app for turning operator prompts, uploaded context, perps plans, and research
notes into structured goals that humans and agents can review.
What ships:
- Root scripts expose
npm run goals:dev,npm run goals:build,npm run goals:typecheck,npm run goals:start, andnpm run goals:clean. npm run build:allincludes the goals app.- The app is registered in both npm and pnpm workspaces as
solana-clawd-goals. goals/.env.exampledocuments provider keys with placeholders only.goals/.env.local,goals/node_modules, andgoals/distremain local or generated artifacts and should not be treated as source-of-truth inputs.
Run it:
npm run goals:dev
# or
npm run goals:build && npm run goals:startRead the app overview in goals/README.md.
The box/ workspace captures the sandbox pattern from the manifesto in a
public-safe form. Each run is isolated, cost-tracked, and torn down after use
so agent work stays separate from local state.
| Lane | What it does |
|---|---|
| Trading Agent | Token analysis and swap signal generation |
| Perps Trading Agent | Paper-first perps planning with agent wallet, RPC, Jupiter, Helius, and Phoenix reads |
| Memecoin Screener | New listing, liquidity, and risk screening |
| Swarm Agent | Sub-agent coordination and result fusion |
| Portfolio Manager | Wallet analysis and diversification scoring |
| On-Chain Analyst | Wallet and contract forensics |
| Arbitrage Scanner | Cross-DEX price comparison and net-profit checks |
| NFT Flipper | Floor analysis and collection scoring |
What ships:
- Agents run in disposable sandboxes.
- Perps planning is policy-gated and does not place private keys inside Box.
- The perps Box creates an ephemeral agent wallet inside the sandbox for simulation identity; live signing remains external.
- Solana reads are wired through configured RPC, Jupiter quotes, optional Helius owner lookups, and Phoenix market/trader-state endpoints. Credentialed URLs are redacted before logs or agent prompts.
- Runs are cost-tracked and snapshot-friendly.
- No private provider credentials or local secrets are printed in this README.
- The full landing page is box/README.md.
Latest Box perps integration:
box/lib/perps-policy.tsdefines paper-first limits, live-preview gates, Vulcan command planning, and data-source metadata.box/lib/agent-wallet.tscreates an ephemeral in-sandbox agent wallet manifest for simulation identity and zeroes generated secret bytes best-effort after deriving the public key.box/lib/solana-calls.tsbuilds safe call plans for Solana RPC health and blockhash, Jupiter SOL/USDC quotes, optional Helius assets-by-owner, and Phoenix market/trader-state reads.box/agents/solana-perps-trading-agent.tswrites the sandbox worker, runs the data checks, then asks the Box agent to review the plan without requesting or handling signing authority.box/scripts/perps-preflight.tsandbox/scripts/solana-call-plan.tsprovide local verification without needing live trading credentials.
Neon Auth + install tracking:
- Gateway can use Neon Auth JWKS and Neon Data API through server-side env vars
only:
NEON_AUTH_URL,NEON_AUTH_JWKS,NEON_DATA_API_URL,NEON_DATA_API_KEY, andNEON_ID. - Install/agent/box tracking writes to
agent_install_eventsthrough/api/track/install; protected reads use Bearer JWT verification against the configured JWKS. - Public installers and Box agents emit minimal install metadata to
CLAWD_TRACKING_URL, defaulting to/api/track/installon the public gateway. SetCLAWD_DISABLE_TRACKING=trueto opt out. No Neon connection string, database password, or raw API key is committed. - Schema starter:
gateway/scripts/neon-install-events.schema.sql. - Standalone agent installers can call
node agents/scripts/track-install.mjs <agent-id> <version>to emit the sameagent_installevent.
Source: agents/minted · auto-generated from local mint artifacts
| Agent | Role | Rarity / Gen | Proof | Asset |
|---|---|---|---|---|
| 👾 EchoCore | Yield Whisperer | Common / 1623 | verified | 5cymLvjy...HqDvR2 |
| 🐱 HexCrypt | Bridge Wanderer | Common / 5349 | verified | 7rTnYyyP...1VjL19 |
| 🦊 ZealBit | Memecoin Shaman | Common / 4107 | verified | 3rKCAoGT...AQvQQ3 |
| 🌀 PsiCore | Alpha Hunter | Uncommon / 5121 | pending | 4MNnYHHH...RicnE1 |
The GitHub, install, and gateway paths are now wired to the canonical x402 surfaces:
| Surface | Route | Verification |
|---|---|---|
| Agents hub | x402.wtf/agents |
agents catalog validates 130 agents and the explicit agents/ workspace paths |
| Skills hub | x402.wtf/skills |
Gateway serves 136 catalog skills plus per-skill metadata fallback |
| Gateway | x402.wtf/gateway |
gateway/scripts/smoke-x402-routes.mjs starts the built gateway and checks public routes |
| Grok Studio | x402.wtf/grok |
Terminal chat studio backed by server-side XAI_API_KEY for Grok chat, image, video, TTS, STT, downloads, and reusable assets |
| Staking | x402.wtf/staking |
Helius DAS reads agent assets, token assets, and batch asset metadata for staking flows |
| Telegram | x402.wtf/telegram |
Smoke test verifies POST /telegram/webhook returns 200 OK |
| Discovery | /.well-known/ai-plugin.json |
Static and dynamic discovery docs expose agents, skills, gateway, staking, and Telegram URLs |
Repeatable checks:
cd agents && npm run test
cd ../gateway && npm testWhat these cover:
agents/scripts/validate-x402-setup.cjschecksCNAME,.well-known, catalog counts, skills catalog URLs, installer wiring, GitHub Actions, gateway route source, and every explicitly listedagents/path..github/workflows/x402-setup.ymlruns the same agents verifier and gateway smoke test on PRs/pushes touchingagents/,gateway/,formal_verification/,skills/, orinstall.sh.install.sh --gatewaynow builds the gateway and runsnpm run smoke:x402before reporting the gateway as ready.
Production access policy:
CLAWD_PRODUCTION_MODE=true
CLAWD_MIN_LIVE_TIER=SHORELINE
GATEWAY_ADMIN_KEY=<server-side-admin-key>Public read-only routes stay open for browsing agents, skills, staking status, explorer data, and discovery docs. Live mutation routes such as trading, minting, skill registration, and staking transactions require either X-Clawd-Wallet with the configured holder tier or X-Gateway-API-Key for server-side operations.
╔══════════════════════════════════════════════════════════════════════════╗
║ 7 N P M + 5 A G E N T A U T H P A C K A G E S ║
╠══════════╦══════════════════════════════════════╦═══════════════════╣
║ clawd ║ @openclawdsolana/clawd ║ 🖥 TUI ║
║ registry║ @openclawdsolana/agent-registry ║ 📋 on-chain ║
║ hub ║ @openclawdsolana/agent-hub ║ 🌐 dashboard ║
║ sdk ║ @openclawdsolana/solana-sdk ║ 🛠 TypeScript ║
║ wallet ║ @openclawd/wallet ║ 👛 Privy+Jupiter ║
║ vault ║ agentwallet-vault ║ 🔐 keypair vault ║
║ gateway ║ @solana-clawd/gateway ║ 🤖 Telegram+HTTP ║
╠══════════╬══════════════════════════════════════╬═══════════════════╣
║ 🔐 auth ║ vendor/agent-auth (5 pkgs) ║ CAAP/1.0 · SIWS ║
║ ║ agent-auth · sdk · cli · solana · clerk ║ capabilities ║
╠══════════╬══════════════════════════════════════════╬═══════════════════╣
║ 🔀 route║ clawdrouter/ (LLM router) ║ 55+ models · x402║
╠══════════╩══════════════════════════════════════════╩═══════════════════╣
║ x402.wtf · pay.sh/auth/agent · $CLAWD 🦞 ║
╚══════════════════════════════════════════════════════════════════════════╝
The nano Solana financial trading, deep research, ML prediction market, x402 payment, and OpenClawd fleet library. 82+ specialized agents for trading, DeFi, ML, payments, and orchestration. Served as a static catalog at https://x402.wtf/library — backed by a React UI, a JSON index, and an OpenAPI schema.
┌────────────────────────┬───────────────────────────────────────────┐
│ 82+ agents │ payments · trading · defi · ml-prediction │
│ 13 categories │ risk · deep-research · technical-analysis │
│ 291 tags │ infrastructure · strategies · agentic │
│ JSON catalog │ https://x402.wtf/library/index.json │
│ Schema (v1) │ https://x402.wtf/library/schema/...v1 │
│ npm package │ @openclawd/lobster-library │
│ Workspace path │ library/ │
└────────────────────────┴───────────────────────────────────────────┘
| Method | URL | What it returns |
|---|---|---|
| GET | https://x402.wtf/library/ |
Interactive React UI for the catalog |
| GET | https://x402.wtf/library/index.json |
Full JSON catalog of all agents |
| GET | https://x402.wtf/library/{agent-id}.json |
A single agent definition |
| GET | https://x402.wtf/library/schema/speraxAgentSchema_v1.json |
OpenAPI-style JSON schema |
| GET | https://x402.wtf/library/meta.json |
Counts, generated-at, version |
| GET | https://x402.wtf/library/.well-known/ai-plugin.json |
AI-plugin discovery document |
# Browse the catalog
curl https://x402.wtf/library/index.json | jq ".agents | length"
# → 82
# Pull a single agent
curl https://x402.wtf/library/solana-clawd-payment-gateway.json
# Build + serve the catalog locally
npm run library:build # rebuilds public/library/
npm run library:serve # http://localhost:4173/
# Validate the catalog
npm run library:validate # exits non-zero on broken refs
# Diagnose the integration
npm run library:doctorThe library is part of the pnpm workspace (see library/) and is automatically mirrored to public/library/ so it ships with the Vite web app and is served at x402.wtf/library/*. A GitHub Action (.github/workflows/library-deploy.yml) keeps the catalog in sync on every push to library/.
This repo now documents the three x402 layers together:
| Surface | Path | Purpose |
|---|---|---|
| Full Solana x402 stack | solana-clawd-x402/ |
Worker gateway, protocol negotiation, Solana verifier, facilitator, SDK, vault program, and example paid-agent flows |
| Agent catalog bridge | agents/docs/X402_IMPLEMENTATION.md |
Maps paid agent JSONs in agents/src/ to the runtime x402 implementation |
| Embeddable helper package | packages/agents-x402-solana/ |
Thin MCP/HTTP monetization wrapper for paid tools and handlers |
Use solana-clawd-x402/ when you need the full payment rail. Use agents/ when you are wiring paid agent products into the catalog and registry.
╔══════════════════════════════════════════════════════════════════╗
║ S O L A N A C L A W D — P I C K A P A T H ║
╠══════════════════╦═══════════════════════════════════╦═══════════╣
║ PATH 1 ████████ npm install — full kit ║ ~3 min ║
║ PATH 2 ████████ From source (devs) ║ ~5 min ║
║ PATH 3 ██ Free inference only ║ ~30 sec ║
║ PATH 4 · Browser terminal (zero install) ║ instant ║
╚══════════════════╩═══════════════════════════════════╩═══════════╝
╔══════════════════════════════════════════════════════════════════╗
║ install.sh --full installs all of: ║
║ clawd TUI · agent-registry · agent-hub ║
║ leviathan runtime · solana-sdk · wallet · agentwallet ║
║ Vulcan CLI (Phoenix perps / Rise SDK) ║
║ x402.wtf CLI (gateway + terminal launcher) ║
╚══════════════════════════════════════════════════════════════════╝
Prerequisites: Node.js v20+ · npm
Source builds in this repo are managed with
pnpm. Use thenpm install -g ...commands below only for packages that are already published to npm.
Step 1 — Install the core packages:
npm install -g @openclawdsolana/clawd \
@openclawdsolana/agent-registry \
@openclawdsolana/agent-hub \
agentwallet-vaultStep 2 — Verify binaries are in PATH:
clawd --version # should print 2.0.0
clawd-registry --version
clawd-hub --version
agentwallet --versionIf a binary is not found, add npm's global bin to your PATH:
export PATH="$(npm config get prefix)/bin:$PATH"
# Then add the above line to ~/.zshrc or ~/.bashrcStep 3 — Configure your API key:
# Fast path: bake the key + free models straight into Clawd
clawd openrouter setup-free --api-key sk-or-v1-...
# Manual path still works too:
nano ~/.clawd/.env
# → OPENROUTER_API_KEY=sk-or-v1-...Want the polished web/GitHub-facing experience too? Build the landing page with:
pnpm build:webTo publish that page on GitHub Pages, push to newnew or main. The workflow at .github/workflows/github-pages.yml builds dist-web/ and deploys it automatically.
Step 4 — Verify everything works:
clawd --help # TUI help
clawd character list # lists 97 personas (no key needed)
clawd agent stats # shows local registry stats
clawd-registry stats # same from the registry CLI
clawd-hub --help # hub CLI helpExpected output for clawd character list:
97 character(s) in ~/.../characters
Alice eliza alice-character-json
Ben Graham investor ben-graham
...
Expected output for clawd-registry stats / clawd agent stats:
Registry Index Stats
Total agents: 0
Active agents: 0
(Empty is correct — no agents indexed yet. Run clawd-registry add <address> to index one.)
Step 5 — Launch:
clawd # interactive TUI (Clawd persona)
clawd-hub start --open # opens agent dashboard at localhost:3747
clawd-registry list # browse indexed agentsStep 6 (optional) — Phoenix Perps + x402 gateway (one command):
# Add Solana perps trading and x402 gateway CLI to an existing install:
bash install.sh --perps --x402
# Or get everything at once (recommended):
bash install.sh --fullThis step:
- Downloads the Vulcan CLI binary (
~/.local/bin/vulcan) from Ellipsis-Labs/vulcan-cli - Prompts for your Solana RPC URL (Helius / Triton / QuickNode — or blank for public mainnet)
- Writes
~/.vulcan/config.tomlwith your RPC URL and Phoenix API endpoint - Runs
vulcan agent install --target agentskills— wires Vulcan skills into clawd - Runs
vulcan agent mcp install --target claude --scope user— adds the Vulcan MCP server to your Claude config - Installs
x402.wtfCLI — one-command launcher for the CLAWD terminal and gateway
Step 7 — First-run Vulcan setup (wallet + registration):
# Reload shell so vulcan is in PATH
source ~/.zshrc # or ~/.bashrc
# Step-by-step wizard: wallet, RPC, API login, optional deposit
vulcan setup
# Confirm everything is wired
vulcan status -o json
# → { "ok": true, "data": { "wallet": ..., "network": "mainnet-beta", ... } }
# Create a trading wallet
vulcan wallet create --name trader
vulcan wallet balance trader # check SOL + USDC balance
# Optional: deposit USDC collateral (requires funded wallet)
vulcan margin deposit 500Step 8 — Paper trade Phoenix perps (no real funds):
# Initialize a paper account with $10,000 virtual USDC
vulcan paper init --balance 10000
# Check live SOL-PERP market data
vulcan market ticker SOL # price, funding, OI
vulcan market orderbook SOL --depth 5 # top 5 levels
vulcan ta report SOL --timeframe 1h # RSI, MACD, BBands, ATR, ADX
# Place paper trades
vulcan paper buy SOL --notional-usdc 100 --type market -o json
vulcan paper positions # open paper positions
vulcan paper status # account P&L
# Run technical indicator
vulcan ta compute SOL --indicator rsi --timeframe 1h
# → RSI value for signal-based entriesStep 9 — Live trading (requires funded wallet + registration):
# Pre-flight check — confirms wallet, registration, collateral, and readiness
vulcan strategy preflight
# Market buy: 100 USDC of SOL-PERP with TP at $250, SL at $180
vulcan trade market-buy SOL --notional-usdc 100 --tp 250 --sl 180
# View open positions
vulcan position list -o json
# Close position
vulcan position close SOLSafety: Live commands execute irreversible on-chain transactions. Always run
vulcan strategy preflightand test in paper mode first.
Step 10 — x402.wtf CLI:
# Install separately or included with --full / --x402
npm install -g x402.wtf
# Commands
x402.wtf # open CLAWD terminal (x402.wtf/terminal)
x402.wtf tui # clone/update solana-clawd and launch TUI locally
x402.wtf gateway # open x402 payment gateway dashboard
x402.wtf agents # browse x402-gated agents catalog
x402.wtf api # open x402 API catalog
x402.wtf telegram # open Telegram channel
x402.wtf doctor # smoke-test all public endpoints
x402.wtf curls # print useful curl examplesPrerequisites: Node.js v20–24 · pnpm (npm install -g pnpm)
Step 1 — Clone the repo:
git clone https://github.com/openclawd/solana-clawd
cd solana-clawdStep 2 — Install dependencies:
pnpm install
# Installs all workspace packages (agent-registry, agent-hub, clawd, ...)
# Expected: "Done in ~4s" with no errorsStep 3 — Build the production runtime first:
pnpm run build
# Builds the root Leviathan runtime export surface used by the published package.Step 4 — Build workspace packages as needed:
cd packages/agentwallet && npm run build
cd ../agent-registry && npm run build
cd ../agent-hub && npm run build
cd ../clawd-code-cli && npm run buildStep 5 — Verify each package built correctly:
ls packages/agentwallet/dist/ # should contain cli.js, vault.js, server.js, crypto.js
ls packages/agent-registry/dist/ # should contain index.js, cli/, indexer/, ...
ls packages/agent-hub/dist/ # should contain cli.js, routes/, server/, ws/
ls packages/clawd-code-cli/dist/ # should contain index.js, commands/, agent/, ...
ls dist/ # leviathan root distStep 6 — Smoke-test the CLIs directly from dist:
node packages/agentwallet/dist/cli.js --help # vault CLI help
node packages/agentwallet/dist/cli.js wallet list # list stored wallets
node packages/clawd-code-cli/dist/index.js --help
node packages/clawd-code-cli/dist/index.js character list # lists 97 personas
node packages/clawd-code-cli/dist/index.js agent stats # empty registry, OK
node packages/agent-registry/dist/cli/index.js stats # Registry Index Stats
node packages/agent-hub/dist/cli.js --help # hub CLIExpected output for character list:
97 character(s) in .../characters
Alice eliza alice-character-json
Ben Graham investor ben-graham
Cheshire eliza cheshire-character-json
Clawd eliza clawd
...
Expected output for agent stats / registry stats:
Registry Index Stats
Total agents: 0
Active agents: 0
Note:
bigint: Failed to load bindingsis a cosmetic warning frombetter-sqlite3falling back to pure JS — it does not affect functionality.
Step 6b — Verify dist directories exist:
ls packages/agent-registry/dist/
# → cli index.d.ts index.js indexer metadata registry types.js
ls packages/agent-hub/dist/
# → cli.js index.js routes server ws
ls packages/clawd-code-cli/dist/
# → agent commands grok index.js tools ui utils ...
ls dist/
# → leviathan root (index.js, agent/, gacha/, identity/, ...)Step 7 — Set up your environment:
cp .env.example .env
nano .env
# Required: OPENROUTER_API_KEY=sk-or-v1-... (free at openrouter.ai)
# Optional: XAI_API_KEY for /grok chat, image, video, speech, and transcription
# Optional: ANTHROPIC_API_KEY, HELIUS_API_KEY, SOLANA_PRIVATE_KEYStep 8 — Run:
node packages/clawd-code-cli/dist/index.js # TUI
node packages/clawd-code-cli/dist/index.js --character alice # TUI as Alice
node packages/agent-hub/dist/cli.js start --open # open hub dashboard
# Or use the convenience scripts from root package.json:
npm run clawd:start # TUI via npm script
npm run hub:start # hub server
npm run registry:stats # agent registry statsOptional — build SDK, wallet, and vault packages:
cd packages/clawd-sdk && npm run build # @openclawdsolana/solana-sdk
cd packages/clawd-wallet && npm run build # @openclawd/wallet
cd packages/agentwallet && npm run build # agentwallet-vault (builds clean)Optional — build agent catalog (agents/ package):
cd agents && node build-catalog.cjs
# → agents-catalog.json (130 agents)
# → public/.well-known/acp.json (ACP discovery)
# → public/api/agents/acp-registry.json (full ACP registry)
# → public/api/agents/ (full static API)Optional — install with all extras (leviathan + SDK + wallet):
bash install.sh --full
# Flags: --full | --sdk | --leviathan | --minimal | --tui-onlyexport OPENROUTER_API_KEY=sk-or-v1-... # free at openrouter.ai — no card needed
npm install -g @openclawdsolana/clawd
clawdopen https://x402.wtf/terminal
╔══════════════════════════════════════════════════════════════════════════╗
║ S O L A N A C L A W D ║
╠═════════════════════════════╦════════════════════════════════════════════╣
║ x402.wtf ║ Main site · TUI · SDK · token ║
║ x402.wtf/agents ║ Browse + search all 130 agents ║
║ x402.wtf/gateway ║ x402 payment gateway · USDC routing ║
║ x402.wtf/grok ║ Grok terminal studio · media · voice ║
║ x402.wtf/skills ║ Installable agent skills catalog ║
║ x402.wtf/terminal ║ Browser terminal (zero install) ║
╠═════════════════════════════╬════════════════════════════════════════════╣
║ x402.wtf ║ HTTP 402 payment protocol ║
║ x402.wtf/agents ║ x402-gated agent catalog + pricing ║
║ x402.wtf/gateway ║ Facilitator · routing · settlement ║
║ x402.wtf/grok ║ XAI_API_KEY-backed chat + media studio ║
║ x402.wtf/skills ║ Premium skills marketplace ║
║ x402.wtf/.well-known/ ║ CAAP/1.0 discovery · ACP registry ║
╠═════════════════════════════╬════════════════════════════════════════════╣
║ ClawdRouter (clawdrouter/) ║ Solana-native LLM router · 55+ models ║
║ CLAWD Gateway (gateway/) ║ Telegram bot · Helius/Birdeye · agent API ║
╠═════════════════════════════╬════════════════════════════════════════════╣
║ agent-auth ║ github.com/better-auth/agent-auth ║
║ CAAP/1.0 ║ Agent identity · JWT auth · capabilities ║
╠═════════════════════════════╬════════════════════════════════════════════╣
║ GitHub ║ github.com/openclawd/solana-clawd ║
╚═════════════════════════════╩════════════════════════════════════════════╝
OpenClawd is the full lobster stack — a sovereign AI agent runtime on Solana where agents have wallets, memory, three immutable laws, and can earn, pay, and spawn children.
Most agent frameworks stop at chat. OpenClawd handles the hard parts:
| Problem | What OpenClawd Does |
|---|---|
| Identity | Agents have Solana keypairs, on-chain Metaplex assets, and long-lived shell files |
| Auth | CAAP/1.0 — agents register with Ed25519 keypairs, sign JWTs, earn capability grants |
| Memory | KNOWN / INFERRED / LEARNED memory tiers + SQLite shell-state |
| Economics | Agents earn (USDC/SOL), pay (x402), and gate their own API access |
| Sovereignty | Runtime operates without a hosted control plane — agent owns its keys |
| Agent Kit | 130 agent definitions + gacha machine + hub + registry |
| Free Inference | Free OpenRouter models wired in — no paid key to start |
| Lore | Lobsters molt. They don't shrink with age. Neither do your agents. |
OpenClawd implements CAAP/1.0 (Clawd Agent Attestation Protocol) — a SIWS-gated, capability-based authorization layer built on @better-auth/agent-auth. Every agent on the platform can register a cryptographic identity, request capability grants, and sign authenticated requests to Clawd APIs.
╔══════════════════════════════════════════════════════════════════════════╗
║ C A A P / 1 . 0 — A G E N T A U T H ║
╠══════════════════════════════════════════════════════════════════════════╣
║ ║
║ Register ────────────────────────────────────────────────────────── ║
║ Agent generates Ed25519 keypair ║
║ POST /api/auth/agent/register { publicKey, name, mode } ║
║ → { agentId, status: "pending" } ║
║ ║
║ Approve ────────────────────────────────────────────────────────── ║
║ User visits /agents/approve?agent_id=...&code=... ║
║ Grants capabilities: attest_agent · get_peer_card · agent_chat ║
║ ║
║ Authenticate ────────────────────────────────────────────────────── ║
║ Agent signs JWT with Ed25519 private key (exp: 60s, jti: UUID) ║
║ Authorization: Bearer <signed-jwt> ║
║ ║
║ Execute ────────────────────────────────────────────────────────── ║
║ POST /api/agents/attest { walletAddress } → attestation + tier ║
║ POST /api/agents/peer-card { agentId? } → peer card + holdings ║
║ GET /api/agents/catalog → full agent catalog ║
║ POST /api/agents/chat { agentId, message }→ AI response stream ║
║ ║
╚══════════════════════════════════════════════════════════════════════════╝
Agent discovery and commerce metadata are published at the well-known endpoints:
curl https://x402.wtf/.well-known/agent.json
curl https://x402.wtf/.well-known/acp.json
# → agent metadata plus the Agent Commerce Protocol registryThe same file is generated locally when you run node agents/build-catalog.cjs:
agents/public/.well-known/acp.json
agents/public/api/agents/acp-registry.json
npm install @auth/agentimport { AgentAuthClient, generateKeypair } from "@auth/agent";
// Or use the Clawd-preconfigured factory:
import { createClawdAgentClient } from "./agents/auth/client";
// 1. Generate a keypair (store the private key securely)
const keypair = await generateKeypair("Ed25519");
// 2. Create client + connect to Clawd
const client = createClawdAgentClient();
const connection = await client.connect("https://x402.wtf/api/auth", {
keypair,
name: "my-trading-agent",
mode: "delegated", // "delegated" | "autonomous"
capabilities: ["attest_agent", "get_peer_card", "agent_chat"],
});
// 3. Execute a capability (JWT signed automatically)
const peerCard = await client.executeCapability("get_peer_card", {});
console.log(peerCard.tier); // "pro" | "elite" | "basic" | "free"The @better-auth/agent-auth plugin is already wired into the Clawd platform:
// src/lib/auth.ts (already configured)
import { agentAuth } from "@better-auth/agent-auth";
agentAuth({
providerName: "Clawd",
modes: ["delegated", "autonomous"],
keyAlgorithms: ["Ed25519"],
capabilities: [
{ name: "attest_agent", location: "https://x402.wtf/api/agents/attest" },
{ name: "get_peer_card", location: "https://x402.wtf/api/agents/peer-card" },
{ name: "list_agents", location: "https://x402.wtf/api/agents/catalog" },
{ name: "agent_chat", location: "https://x402.wtf/api/agents/chat" },
],
})Protecting your own routes:
import { verifyAgentAuth } from "@/lib/agents/agent-auth";
export async function POST(req: NextRequest) {
const session = await verifyAgentAuth(req);
if (!session) return NextResponse.json({ error: "Agent auth required" }, { status: 401 });
// session.agentId, session.type, session.agent.capabilityGrants
}Add agentAuth to any agent definition:
{
"agentAuth": {
"protocol": "CAAP/1.0",
"discovery": "https://x402.wtf/.well-known/acp.json",
"registrationEndpoint": "https://x402.wtf/api/auth/agent/register",
"modes": ["delegated", "autonomous"],
"keyAlgorithms": ["Ed25519"],
"capabilities": [
{ "name": "attest_agent", "required": true, "location": "https://x402.wtf/api/agents/attest" },
{ "name": "get_peer_card","required": false, "location": "https://x402.wtf/api/agents/peer-card" }
]
}
}See agents/agent-template-attested.json for the full attested template with Solana Attestation Service integration and Metaplex identity minting.
| Tier | Min CLAWD | Capabilities |
|---|---|---|
free |
0 | list_agents, get_peer_card |
basic |
1,000 | + agent_chat |
pro |
10,000 | + attest_agent, all capabilities |
elite |
100,000 | priority execution, no rate limits |
// Attest your agent wallet and get its tier
const result = await client.executeCapability("attest_agent", {
walletAddress: "YOUR_SOLANA_WALLET",
});
console.log(result.tier.tier); // "pro"
console.log(result.tier.label); // "Pro"agents/
├── auth/
│ ├── index.ts — barrel export
│ ├── capabilities.ts — typed CAPABILITIES constants + CAPABILITY_LOCATIONS
│ └── client.ts — createClawdAgentClient() factory → x402.wtf
├── agent-template-attested.json — full attested template with CAAP/1.0 + SAS + Metaplex
├── agent-template-full.json — base template schema with agentAuth section
└── src/
└── solana-clawd-auth-agent.json — "Clawd Agent Auth Specialist" agent definition
ClawdBrowser/src/
├── lib/auth.ts — agentAuth() plugin config (server)
├── lib/agents/agent-auth.ts — verifyAgentAuth() helper
└── app/api/agents/
├── attest/route.ts — accepts CAAP JWT or SIWS
├── peer-card/route.ts — CAAP-gated POST capability endpoint
└── catalog/route.ts — includes agentAuth discovery in response
╔══════════════════════════════════════════════════════════════════════════╗
║ S O L A N A C L A W D A G E N T K I T ║
║ 130 production-ready DeFi agent definitions ║
╠══════════════════════════════════════════════════════════════════════════╣
║ ║
║ TRADING ANALYTICS INFRASTRUCTURE ║
║ ────────────────── ───────────────── ───────────────────── ║
║ autonomous-trader technical-analyst openclawd-orchestrator ║
║ arbitrage-scanner memecoin-analyst openclawd-pulse-monitor ║
║ market-maker onchain-sleuth openclawd-spawn-manager ║
║ perpetuals-trader whale-tracker openclawd-skill-router ║
║ pumpfun-bot sentiment-analyzer openclawd-shell-auditor ║
║ spot-trader price-predictor agent-orchestrator ║
║ liquidation-bot volatility-analyst bot-architect ║
║ funding-rate-arb macro-analyst anchor-developer ║
║ ║
║ DEFI PROTOCOLS x402 / PAYMENTS RISK / SECURITY ║
║ ────────────────── ───────────────── ───────────────────── ║
║ yield-optimizer x402-market-buyer protocol-auditor ║
║ lending-strategist x402-provider-auth anomaly-detector ║
║ dex-aggregator x402-signal-mon risk-sentinel ║
║ nft-floor-trader x402-rpc-broker mev-protector ║
║ stablecoin-strat clawd-wallet-guard regulatory-advisor ║
║ lsd-analyst clawd-cost-planner portfolio-risk ║
║ cross-chain-bridge clawd-pay-gateway position-sizer ║
║ ║
║ AUTH / IDENTITY ───────────────────────────────────────── ║
║ ────────────────── ║
║ clawd-auth-agent CAAP/1.0 registration · JWT signing ║
║ capability grants · SIWS attestation ║
║ ║
║ + more → x402.wtf/agents ║
╚══════════════════════════════════════════════════════════════════════════╝
Browse all agents: x402.wtf/agents
Every session can adopt a full character persona via --character <name>. The character's bio, lore, style rules, and personality traits are injected into the system prompt automatically.
╔══════════════════════════════════════════════════════════════════════════╗
║ C H A R A C T E R P E R S O N A S ║
╠══════════════════════╦═══════════════════════════════════════════════════╣
║ WONDERLAND ║ Alice · Cheshire · Mad Hatter · Clawd ║
║ INVESTOR LEGENDS ║ Warren Buffett · Ben Graham · Charlie Munger ║
║ ║ Bill Ackman · Cathie Wood · Hedge Fund Panel ║
║ SOLANA SPECIALISTS ║ 90 role-specific on-chain agents ║
║ trading ║ autonomous-trader · arbitrage-scanner · perps ║
║ analytics ║ technical-analyst · memecoin-analyst · onchain ║
║ infrastructure ║ openclawd-orchestrator · bot-architect ║
║ payments ║ x402-market-buyer · clawd-wallet-guardian ║
║ auth / identity ║ clawd-auth-agent (CAAP/1.0 specialist) ║
║ risk / security ║ protocol-auditor · risk-sentinel · mev-protect ║
╠══════════════════════╩═══════════════════════════════════════════════════╣
║ 93 total · 3 schemas: eliza | investor | solana-agent ║
╚══════════════════════════════════════════════════════════════════════════╝
# Launch TUI as a specific character
clawd --character alice
clawd --character warrenbuffet
clawd --character cheshire
clawd --character "solana-autonomous-trader"
# Headless prompt with persona
clawd -p "analyse this wallet" --character bengraham
# Browse all 93 characters
clawd character list
clawd character list --type investor
clawd character list --type eliza
clawd character list --search "trading"
# Preview a character's full system-prompt injection
clawd character show clawd
clawd character show "cathiewood"Characters live in characters/ as portable JSON — three schemas are supported:
| Schema | Files | Fields |
|---|---|---|
| eliza | alice, cheshire, mad-hatter, clawd, … |
bio, lore, adjectives, topics, style, messageExamples |
| investor | warrenbuffet, bengraham, charliemunger, … |
role, personality_traits, investment_principles, communication_style |
| solana-agent | solana-*.json (90 files) |
description, capabilities, personality, communication_style |
The loader (packages/clawd/src/utils/character-loader.ts) auto-detects schema, handles array files like hedgefund.json (which contains the full investor panel as a single file), and resolves the characters/ directory from any working directory in the monorepo.
Each agent is a portable JSON definition — systemRole, openingMessage, meta, tags, openingQuestions — importable into any LLM runtime including Claude, Grok, GPT, and the clawd TUI.
# Search agents locally
clawd-registry list
clawd-registry search "arbitrage"
clawd-registry search "x402 payment"
# Add an on-chain agent to your local index
clawd-registry add <METAPLEX_ASSET_ADDRESS>
# Mint a new agent on-chain
clawd-registry mint --name "My Trader" --uri https://your-metadata.jsonThe gacha machine (src/gacha/index.ts) is the AI routing layer. It spins a weighted wheel of free OpenRouter models, routing each agent type to the best available free model. Every response carries x402.wtf attribution automatically.
╔══════════════════════════════════════════════════════════════════════════╗
║ G A C H A M A C H I N E S P I N ║
╠═══════════════════╦══════════════════════════════════╦═══════════════════╣
║ Agent Type ║ Model (Free) ║ Weight ║
╠═══════════════════╬══════════════════════════════════╬═══════════════════╣
║ 🧠 reasoning ║ nvidia/nemotron-3-ultra-550b:free ║ ████░░░░ 50% ║
║ 🛡️ safety ║ nvidia/nemotron-3.5-safety:free ║ ██░░░░░░ 20% ║
║ ⚡ general ║ openrouter/optimus-alpha:free ║ ███░░░░░ 30% ║
╠═══════════════════╬══════════════════════════════════╬═══════════════════╣
║ arbitrage ║ → nemotron-ultra (reasoning) ║ heavy math 🧮 ║
║ protocol-audit ║ → nemotron-safety ║ risk check 🛡️ ║
║ pumpfun-bot ║ → optimus-alpha ║ fast ops ⚡ ║
║ whale-tracker ║ → nemotron-ultra (reasoning) ║ pattern 🧠 ║
╚═══════════════════╩══════════════════════════════════╩═══════════════════╝
All responses auto-attribute: Powered by x402.wtf · $CLAWD
import { GachaMachine, spinGacha } from "@openclawdsolana/leviathan/gacha/index.js";
const gacha = new GachaMachine(process.env.OPENROUTER_API_KEY!);
// Auto-route to best free model for the agent type
const result = await gacha.ask(
"You are a Solana arbitrage scanner.",
"Find cross-DEX spread opportunities for SOL/USDC",
{ capability: "arbitrage-scanner" }
// → routes to nvidia/nemotron-3-ultra-550b-a55b:free automatically
);
console.log(result.model); // "nvidia/nemotron-3-ultra-550b-a55b:free"
// Stream response
for await (const chunk of gacha.stream(messages, { capability: "protocol-auditor" })) {
process.stdout.write(chunk);
}
// Force a specific slot
const r2 = await gacha.ask(systemPrompt, userMsg, { model: "safety" }); // nemotron-safety# Wire up the gacha machine (all free)
export OPENROUTER_API_KEY=sk-or-v1-...
export OPENROUTER_MODEL1=nvidia/nemotron-3-ultra-550b-a55b:free # slot 1: reasoning
export OPENROUTER_MODEL2=nvidia/nemotron-3.5-content-safety:free # slot 2: safety
export OPENROUTER_MODEL3=openrouter/optimus-alpha:free # slot 3: general╔══════════════════════════════════════════════════════════════════════════╗
║ S O L A N A C L A W D — R E P O G A L A X Y ║
╠══════════════════════════════════════════════════════════════════════════╣
║ x402.wtf · github.com/openclawd/solana-clawd ║
╚══════════════════════════════════════════════════════════════════════════╝
src/ 🦞 @openclawdsolana/leviathan — sovereign runtime
├── index.ts CLI: --spawn --run --status --spawnling
├── config.ts depth thresholds · model selection · pulse intervals
├── types/ LeviathanIdentity · TailFlick · ClawStrike · Spawnling
├── agent/
│ ├── loop.ts SENSE → THINK → STRIKE → DRIFT engine
│ └── goals.ts active goal loader (~/..openclawd/goals/)
├── gacha/ 🎰 OpenRouter multi-model routing + x402.wtf attribution
│ └── index.ts GachaMachine · spinGacha · nemotron-ultra/safety/optimus
├── identity/
│ ├── wallet.ts keypair seal/load (mode 0600)
│ ├── balances.ts SOL / USDC / $CLAWD live balances
│ └── spawn-onchain.ts Metaplex MPL Core asset + Agent Registry PDA
├── state/
│ ├── database.ts SQLite: tail_flicks · claw_strikes · molts · spawnlings
│ └── app-state.ts OODA state + KNOWN/INFERRED/LEARNED memory tiers
├── helius/
│ └── index.ts HeliusClient (REST) + HeliusListener (WebSocket)
├── services/x402/ x402 USDC payment client · wrapFetchWithX402
├── buddy/ 🐡 BlockchainBuddy companions · 10 species · ASCII sprites
├── survival/ depthFor() · modelFor() · pulseIntervalFor() · shouldBeach()
├── pulse/ tail-flick daemon (60s→5m→15m depth-aware)
├── molting/ spawnling minting · constitution hash gate
├── setup/ first-spawn wizard · keypair → Metaplex → SHELL.md
└── skills/ registry · parser · tool wrapper · installer
packages/ → packages/README.md for full detail
├── agentwallet/ ✅ npm 🔐 agentwallet-vault@0.1.0
│ ├── src/vault.ts AES-256-GCM encrypted keypair storage
│ ├── src/server.ts Express REST API (port 9099): wallets · private-key
│ ├── src/keygen.ts Solana (Ed25519) + EVM (secp256k1) keypair gen
│ ├── src/cli.ts agentwallet: serve · wallet · vault · deploy
│ └── src/deploy/ E2B sandbox + Cloudflare Workers deployers
│
├── agent-registry/ ✅ npm 📋 @openclawdsolana/agent-registry@2.0.0
│ ├── cli/ clawd-registry: list · search · add · mint · stats
│ ├── registry/ Metaplex MPL Core mint + on-chain register
│ ├── indexer/ SQLite local agent index (AgentIndex)
│ └── metadata/ off-chain metadata fetch + validation schema
│
├── agent-hub/ ✅ npm 🌐 @openclawdsolana/agent-hub@2.0.0
│ ├── cli.ts clawd-hub: start · stop · status
│ ├── server/ Express + CORS · port 3747
│ └── routes/ GET /api/v1/agents · GET /api/v1/hub/status
│
├── clawd/ ✅ npm 🖥 @openclawdsolana/clawd@2.0.0
│ ├── agent/ multi-provider: xAI · OpenRouter · Anthropic
│ ├── ui/ Ink React terminal (chat · history · model-select)
│ ├── tools/ bash · solana · token-launch · dflow · kalshi · polymarket
│ ├── grok/ xAI / OpenRouter streaming client
│ ├── mcp/ MCP stdio + SSE + streamable-HTTP transport
│ ├── voice/ xAI real-time voice (STT + TTS)
│ └── leviathan/ in-process Leviathan spawn/status bridge
│
├── clawd-sdk/ ✅ npm 🛠 @openclawdsolana/solana-sdk@2.0.0
│ ├── constants.ts CLAWD_MINT_MAINNET · AgentCapability flags
│ ├── bonding-curve/ constant-product AMM + graduation math
│ ├── token/ Token2022 + pToken helpers
│ ├── vault/ conviction staking · milestone locks · entropy burns
│ └── idl/ Anchor IDL types (clawd_protocol)
│
├── clawd-wallet/ ✅ npm 👛 @openclawd/wallet@0.1.0
│ ├── ClawdWallet Privy-embedded Solana wallet wrapper
│ ├── AgenticWallet Grok-gated trading (deny/ask/allow)
│ └── SwapService Jupiter aggregator + slippage guard
│
├── cli-standalone/ ✅ npm 📦 @openclawdsolana/clawd-standalone
│ └── (prebuilt) zero-compile binary for CI + restricted envs
│
└── clawd-protocol/ 🚧 dev ⚓ Anchor on-chain program (Rust)
└── programs/ bonding curves · pTokens · vault · sentiment · cap bitmask
programs/programs/ ✅ built ⚓ Solana AI Inference Protocol — on-chain + TypeScript SDK
├── solana-ai-inference/ Anchor program (program ID: Bg96xPuC3Mt2xnEnQPQBJY8QBqD6J7hn3WgnqDK43pKT)
│ └── src/lib.rs model registry · inference requests · staking · validators · DNA events
└── client/ @clawd/solana-ai-inference-client (workspace: programs/programs/client)
└── src/
├── idl.ts program types, PDA seeds, account interfaces
├── client.ts SolanaAiInferenceClient — all instructions + read ops
├── ore.ts OreMinerClient — ORE v2 mining stats, deploy/claim txs
├── config.ts RPC endpoints, program IDs, API routes
└── index.ts barrel export
agents/ 🤖 130 Solana agents → x402.wtf/agents
├── AGENTS.md full agent catalog + capability table
├── CLAUDE.md Claude Code agent context
├── GEMINI.md Gemini agent integration notes
├── package.json deps: @auth/agent · @better-auth/agent-auth
│
├── auth/ 🔐 CAAP/1.0 client module
│ ├── index.ts barrel export
│ ├── capabilities.ts CAPABILITIES constants + CAPABILITY_LOCATIONS
│ └── client.ts createClawdAgentClient() → x402.wtf discovery
│
├── agent-template.json base agent template
├── agent-template-full.json full schema with agentAuth + registry + attestation
├── agent-template-attested.json fully-attested template (CAAP + SAS + Metaplex)
│
├── build-catalog.cjs build script → agents-catalog.json
│ also writes:
│ public/.well-known/acp.json (ACP discovery)
│ public/api/agents/acp-registry.json (ACP registry)
│ public/api/agents/ (static API)
│
└── src/ 130 JSON agent definitions
├── solana-clawd-auth-agent.json 🔐 CAAP/1.0 auth specialist (featured)
├── solana-autonomous-trader.json OODA loop · live execution
├── solana-arbitrage-scanner.json cross-DEX spread detection
├── solana-market-maker.json quote generation · spread mgmt
├── solana-perpetuals-trader.json Phoenix/Drift levered perps
├── solana-pumpfun-bot.json pump.fun copy trading
├── solana-liquidation-bot.json under-collateralised hunter
├── solana-whale-tracker.json large-wallet signal aggregation
├── solana-onchain-sleuth.json wallet forensics · graph analysis
├── solana-protocol-auditor.json smart contract risk review
├── solana-anchor-developer.json Anchor 0.31 scaffolding
├── solana-x402-*.json (7) x402 payment agents · signal · RPC
├── solana-clawd-*.json (8) clawd runtime agents · wallet · ops
├── solana-nanoclawd-*.json (3) nanoclawd micro-transaction agents
├── solana-nemoclawd-*.json (3) nemoclawd DeFi router + yield
├── solana-openclawd-*.json (5) orchestrator · pulse · spawn · audit
└── ... 80+ more technical · macro · risk · ops
characters/ 🎭 character personas
├── clawd.json Clawd — on-chain oracle sovereign
├── cheshire-character-json.json Cheshire — multimodal oracle
├── alice-character-json.json Alice — cross-chain trading agent
├── mad-hatter-character-json.json Mad Hatter — chaotic creative
├── clawdex.json ClawdEx — DEX aggregator persona
├── hedgefund.json investor panel persona
├── warrenbuffet.json Warren Buffett analyst
├── bengraham.json Ben Graham value investor
├── charliemunger.json Charlie Munger mentor
├── billackman.json Bill Ackman activist
├── cathiewood.json Cathie Wood disruptive tech
├── mayhem-mode/ Mayhem Mode — aggressive trading config
└── solana-*.json Solana-specialist agent personas
mcp-server/ 🔧 @pump-fun/mcp-server — Model Context Protocol
├── src/ 30+ Solana MCP tools
│ ├── tools/ token launch · wallet · bonding curve · Metaplex
│ └── index.ts STDIO server entry (Claude Desktop / Cursor / VS Code)
└── tsconfig.json
x402/ 💸 @pump-fun/x402 — HTTP 402 payment protocol
├── src/ client · server · facilitator · SVM signing
├── examples/ buyer · seller · middleware patterns
└── package.json x402.wtf/gateway · x402.wtf/gateway
pay/ 💰 payment references + side-projects
solana-clawd-x402/ 💸 full Solana x402 gateway + SDK + vault implementation
├── a2a-agent.ts agent-to-agent x402 flow
├── client-sdk.ts payment client SDK
├── confidential-agent.ts TEE-style confidential agent
├── worker/ Cloudflare Worker gateway + facilitator
├── sdk/ @solanaclawd/x402-client
└── programs/ Anchor vault / registry program
skills/ 🎯 installable agent skills → x402.wtf/skills · x402.wtf/skills
├── catalog.json machine-readable skill index
├── README.md skills discovery guide
├── vulcan/ Vulcan perps trading (20+ sub-skills)
│ ├── vulcan-trade-execution/
│ ├── vulcan-twap-execution/
│ ├── vulcan-grid-trading/
│ ├── vulcan-risk-management/
│ ├── vulcan-position-management/
│ └── vulcan-*.../ (15 more vulcan skill packs)
├── imperial/ Phoenix/Imperial perps (10+ sub-skills)
│ ├── imperial-trade-execution/
│ ├── imperial-grid-trading/
│ └── imperial-*.../
├── dflow-*/ DFlow spot trading · Kalshi · Phantom (8 skill packs)
├── pump-*/ pump.fun ecosystem (20+ skill packs)
│ ├── pump-mcp-server/ pump.fun MCP tools
│ ├── pump-bonding-curve/ bonding curve analysis
│ ├── pump-fee-sharing/ fee management
│ └── pump-*.../
├── pumpfun/ pump.fun trading + analytics
├── pumpfun-*/ (4 more pumpfun packs)
├── solana-clawd/ Solana Clawd core skill
├── solana-clawd-agentic-commerce/ commerce integration
├── solana-dev-skill-main/ Solana development
├── solana-formal-verification/ program verification
├── phantom-wallet-mcp/ Phantom wallet MCP integration
├── oracle/ on-chain oracle consultation
├── sherpa-onnx-tts/ offline TTS skill
├── skill-creator/ AgentSkill authoring + packaging
└── ...100+ more (productivity · AI · coding · comms)
library/ 📚 same skill catalog + prompt library
knowledge/ 🧠 internal design + agent conventions
├── SOVEREIGN_RESEARCH.md research methodology
├── architecture-pieces.md system design notes
├── clawd-character.md Clawd character definition
├── openclawd.md framework overview
├── wiki.md internal wiki
├── anti-patterns.jsonl what NOT to do
├── api-behaviors.jsonl API behavioral contracts
├── codebase-facts.jsonl verified facts about the codebase
├── decisions.jsonl architecture decisions log
├── facts.jsonl domain facts
├── gotchas.jsonl traps + edge cases
└── patterns.jsonl recommended patterns
goals/ 🎯 active runtime goal files
└── percolator-bounty.md bounty routing goal
livekit-agent/ 🎙 Python LiveKit + Backrooms agent
├── agent.py LiveKit realtime voice agent
├── backrooms.py three-agent backroom conversation loop
├── tools.py agent tool definitions
├── Dockerfile containerized deployment
├── fly.toml Fly.io deployment config
└── requirements.txt
clawdbot-pumpfun/ 🤖 pump.fun Telegram trading bot
├── src/ bot logic + pump.fun integration
├── package.json standalone bot package
├── .env.example bot-specific env template
└── README.md
percolator-bounty/ ⚡ bounty routing + payout automation
examples/ 🧪 9 runnable demos (no keys needed for most)
├── ooda-loop.ts Observe→Orient→Decide→Act cycle
├── blockchain-buddies-demo.ts Buddy companions + paper trades
├── lobster-trader.ts pump.fun AMM math + graduation odds
├── x402-payment-demo.ts HTTP 402 → USDC → settle
├── x402-solana.ts SVM signing + x402 middleware
├── clawd-wallet-demo.ts Privy + AgenticWallet + Jupiter
├── listen-wallet.ts Helius WebSocket wallet monitor
├── auto-research-client.ts Karpathy-style self-improving research
└── orchestrator-client.ts multi-agent orchestrator API
scripts/ ⚡ installer + utility scripts
├── setup-agent-kit.sh one-shot agent kit install (PATH 1)
└── three-laws.txt constitution text for hash verification
automation/ 🤖 runtime bootstrap + CI checks
├── leviathan.sh full Leviathan bootstrap
├── quickstart.sh fast dev setup
└── three-laws-check.sh constitution hash validation
data/ 📊 on-chain program + token maps
├── programs-map.json deployed program addresses
└── ptokens.json p-token (SIMD-0266) registry
assets/ 🖼 static assets (images · icons)
solanaclawd/ root (@openclawdsolana/leviathan)
├── .env.example 🔑 copy → .env (all env vars documented)
├── .gitattributes git LFS + line endings config
├── .gitignore secrets · build artifacts · node_modules
├── .claude/ Claude Code settings + hooks
├── install.sh ⚡ one-shot installer (--full / --sdk / --minimal)
├── three-laws.md 📜 SHA-256 constitition — the three immutable laws
├── llm.txt LLM-readable repo context file
├── LICENSE MIT
├── package.json root workspace (@openclawdsolana/leviathan v0.2.0)
├── pnpm-workspace.yaml pnpm workspace: packages/* · mcp-server · x402
├── tsconfig.json base TS config (ES2022 · Bundler resolution · strict:false)
└── README.md this file
╔═══════════╦═══════════════════════════════════╦══════════════════════════╗
║ Zone ║ Paths ║ Purpose ║
╠═══════════╬═══════════════════════════════════╬══════════════════════════╣
║ Runtime ║ src/ ║ Leviathan OODA engine ║
║ Packages ║ packages/ (8) ║ 6 npm · 2 dev ║
║ Agents ║ agents/ · characters/ ║ 130 defs · personas ║
║ AI Infra ║ mcp-server/ · x402/ · vendor/ ║ MCP · payments · x402 ║
║ Skills ║ skills/ · library/ · knowledge/ ║ 100+ installable skills ║
║ Bots ║ livekit-agent/ · clawdbot-*/ ║ voice · Telegram ║
║ Dev ║ examples/ · scripts/ · data/ ║ demos · tooling ║
║ Config ║ .env.example · install.sh · root ║ env · laws · workspace ║
╚═══════════╩═══════════════════════════════════╩══════════════════════════╝
🦞 @openclawdsolana/leviathan — Sovereign Runtime
src/
├── index.ts CLI: --spawn --run --status --spawnling
├── config.ts Depth thresholds, model selection, pulse intervals
├── gacha/ 🎰 OpenRouter gacha routing + x402.wtf attribution
├── types/ LeviathanIdentity, TailFlick, ClawStrike, Spawnling
├── agent/
│ ├── loop.ts SENSE → THINK → STRIKE → DRIFT engine
│ ├── system-prompt Constitution + depth + goals injected per flick
│ └── goals.ts Active goal loader from ~/.openclawd/goals/
├── identity/
│ ├── wallet.ts Keypair seal/load (mode 0600)
│ ├── balances.ts SOL / USDC / $CLAWD live balances
│ └── spawn-onchain Metaplex MPL Core asset + Agent Registry PDA
├── state/
│ ├── database.ts SQLite: tail_flicks, claw_strikes, molts, spawnlings
│ └── app-state.ts In-memory OODA state + KNOWN/INFERRED/LEARNED memory
├── helius/
│ └── index.ts HeliusClient (REST) + HeliusListener (WebSocket)
├── services/x402/
│ ├── types.ts PaymentRequirement, X402_HEADERS, USDC_ADDRESSES
│ └── index.ts wrapFetchWithX402, session tracking, cost formatting
├── buddy/
│ └── index.ts 10 species, ASCII sprites, simulateTrade, BuddyCollection
├── survival/monitor depthFor(), pulseIntervalFor(), modelFor(), shouldBeach()
├── pulse/daemon Tail-flick event loop with depth-change detection
├── molting/spawn Spawnling minting + constitution hash gate
├── setup/wizard First-spawn: keypair → hash → Metaplex → SHELL.md
└── skills/ Registry, parser, tool wrapper, installer
npm install -g @openclawdsolana/leviathan
leviathan --spawn --name "Rex" --creator <PUBKEY>
leviathan --run
leviathan --status📋 @openclawdsolana/agent-registry — On-chain Agent Registry
Mint, discover, and index AI agents on Solana via Metaplex MPL Core with local SQLite caching.
packages/agent-registry/src/
├── cli/ clawd-registry CLI (list, search, add, mint, stats)
├── registry/ Metaplex mint + register client
├── indexer/ SQLite local index (AgentIndex)
└── metadata/ Off-chain metadata fetch + schema
npm install -g @openclawdsolana/agent-registry
clawd-registry list # all indexed agents
clawd-registry search "arbitrage" # semantic search
clawd-registry add <ASSET_ADDRESS> # index from chain
clawd-registry stats # index statistics
clawd-registry mint \
--name "My DeFi Agent" \
--uri https://metadata.json # mint on-chain (mainnet)🖥 @openclawdsolana/agent-hub — Local Agent Discovery Server
The LM Studio of Solana agents — a local discovery server and web dashboard running on port 3747.
packages/agent-hub/src/
├── cli.ts clawd-hub CLI (start, stop, status)
├── server/app.ts Express server + CORS + static
├── routes/
│ ├── agents.ts GET /api/v1/agents — search, list, fetch by address
│ └── hub.ts GET /api/v1/hub/status — health + stats
└── ws/ WebSocket live updates
npm install -g @openclawdsolana/agent-hub
clawd-hub start # start on port 3747
clawd-hub start --open # start + open browser dashboard
clawd-hub status # check if running
# API
curl http://localhost:3747/api/v1/agents?q=arbitrage
curl http://localhost:3747/api/v1/hub/status💻 @openclawdsolana/clawd — Terminal Operator (TUI)
packages/clawd/src/
├── index.ts CLI entry: chat, headless (-p), --character, git
├── agent/
│ ├── grok-agent.ts Multi-provider: xAI, OpenRouter, Anthropic
│ │ constructor accepts characterName → injects persona
│ └── index.ts
├── commands/
│ ├── character.ts clawd character list | show <name>
│ ├── agent.ts clawd agent list | add | info | stats | hub
│ ├── mcp.ts clawd mcp add | list | remove
│ └── examples.ts clawd examples list | run
├── ui/
│ ├── app.tsx Ink root (React terminal)
│ ├── components/ chat-interface, chat-history, api-key-input,
│ │ model-selection, mcp-status, diff-renderer
│ └── utils/ markdown-renderer, code-colorizer
├── tools/
│ ├── bash.ts Shell execution
│ ├── text-editor.ts Read / write / insert / replace
│ ├── solana.ts Balance, transfer, SPL
│ ├── token-launch.ts Bags.fm + pump.fun launches
│ ├── dflow.ts DFlow spot trading
│ ├── kalshi.ts Kalshi prediction markets
│ └── leviathan-tool In-process Leviathan spawn/status
├── utils/
│ ├── character-loader.ts Load + parse any of 93 character JSONs
│ ├── custom-instructions.ts .clawd/CLAWD.md loader
│ └── settings-manager.ts ~/.clawd/user-settings.json
├── grok/
│ ├── client.ts xAI / OpenRouter streaming client
│ └── tools.ts
├── mcp/ MCP stdio + SSE transport
├── voice/ xAI real-time voice (STT, TTS)
└── leviathan/ In-process leviathan bridge
npm install -g @openclawdsolana/clawd
clawd # interactive TUI
clawd --character alice # TUI as Alice (cross-chain agent)
clawd --character warrenbuffet # TUI as Warren Buffett
clawd -p "analyze my wallet" # headless prompt
clawd -p "review this" --character bengraham # headless + persona
clawd character list # browse all 93 personas
clawd character list --type investor # investor personas only
clawd character show cheshire # preview a persona's prompt
clawd agent list # browse on-chain agent registry
clawd agent hub --open # open agent hub dashboard
clawd mcp add --name solana ... # add MCP server
clawd examples list # 9 demos🛠️ @openclawdsolana/solana-sdk — TypeScript SDK
packages/clawd-sdk/src/
├── constants.ts Program IDs, PDA seeds, AgentCapability bitmask
├── bonding-curve/ Constant-product AMM math + graduation math
├── token/ Token2022 + pToken creation helpers
├── vault/ Conviction staking, milestone locks, entropy burns
├── agent/ AgentBinding, capability flags, epoch burns
└── idl/ Anchor IDL types (clawd_protocol)
import { CLAWD_MINT_MAINNET, AgentCapability } from "@openclawdsolana/solana-sdk";
AgentCapability.TRADING // 0x01 — live trade execution
AgentCapability.SPAWNING // 0x02 — can mint spawnlings
AgentCapability.PAYMENTS // 0x04 — x402 micropayments
AgentCapability.RESEARCH // 0x08 — web + chain research
AgentCapability.GOVERNANCE // 0x10 — DAO voting
AgentCapability.BURN_TRIGGER // 0x20 — entropy burn triggersnpm install @openclawdsolana/solana-sdk👛 @openclawd/wallet — Privy + AgenticWallet + Jupiter
import { AgenticWallet } from "@openclawd/wallet";
const agent = new AgenticWallet(wallet, {
privyAppId: process.env.PRIVY_APP_ID!,
grokApiKey: process.env.XAI_API_KEY,
permissions: { swap: "allow", maxSwapUsd: 200 },
onPendingTransaction: async (tx) => {
await notify(tx.description);
return userApproved;
},
});
// AI-gated Jupiter swap — asks for approval before executing
const result = await agent.agentSwap({
inputToken: "SOL",
outputToken: "8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump",
amount: "100000000", // 0.1 SOL
slippageBps: 50,
});npm install @openclawd/wallet🔐 agentwallet-vault — Encrypted Keypair Vault + REST API
AES-256-GCM encrypted wallet vault for Solana and EVM keys. Stores keypairs locally, exposes a REST API server agents can query for signing material, and deploys to E2B sandboxes or Cloudflare Workers for remote access.
packages/agentwallet/src/
├── vault.ts AES-256-GCM encrypted keypair store (wallets.enc.json)
├── server.ts Express REST API: GET/POST /api/wallets · /api/vault
├── keygen.ts Solana Ed25519 + EVM secp256k1 keypair generation
├── crypto.ts deriveKey · encrypt · decrypt · generateId
├── cli.ts agentwallet CLI: serve · wallet · vault · deploy
└── deploy/
├── e2b.ts Deploy vault server into E2B cloud sandbox
└── cloudflare.ts Deploy vault server as Cloudflare Worker
npm install -g agentwallet-vault
# Start the vault REST server
agentwallet serve # port 9099
agentwallet serve --port 8080 --token $TOKEN # custom port + auth
# Manage wallets
agentwallet wallet create "trading-agent" # new Solana keypair
agentwallet wallet create "eth-agent" --chain evm # new EVM keypair
agentwallet wallet list # show all wallets
agentwallet wallet show <id>
agentwallet wallet pause <id> # freeze operations
agentwallet wallet unpause <id>
# Vault backup / restore
agentwallet vault export > backup.enc.json
agentwallet vault import "$(cat backup.enc.json)"
# REST API (when server is running)
curl http://localhost:9099/api/wallets
curl -X POST http://localhost:9099/api/wallets \
-H "Content-Type: application/json" \
-d '{"label":"agent","chainType":"solana"}'
# Deploy to remote sandbox for multi-agent access
agentwallet deploy e2b --api-key $E2B_API_KEY
agentwallet deploy cloudflare --api-token $CF_TOKEN --account-id $CF_ACCOUNTimport { Vault, generateSolanaKeypair, startServer } from "agentwallet-vault";
const vault = await Vault.create({ passphrase: process.env.VAULT_PASSPHRASE! });
const kp = await generateSolanaKeypair();
const entry = await vault.addWallet(undefined, "agent", "solana", 0, kp.address, kp.privateKey);
const pk = vault.getPrivateKey(entry.id); // Uint8Array — ready for @solana/web3.js
await startServer(vault, { port: 9099, cors: true });⚓ @clawd/solana-ai-inference-client — On-chain AI Inference Protocol
A fully deployed Anchor program + TypeScript SDK for decentralized AI model registration, inference requests, staking, and validator management on Solana.
Program ID: Bg96xPuC3Mt2xnEnQPQBJY8QBqD6J7hn3WgnqDK43pKT · Devnet + Mainnet
programs/programs/
├── solana-ai-inference/src/lib.rs Anchor program — all instructions, accounts, events
└── client/src/
├── idl.ts PDA seeds, account types, instruction param interfaces
├── client.ts SolanaAiInferenceClient — 20 instructions + 8 read methods
├── ore.ts OreMinerClient — ORE v2 mining stats, deploy/claim transactions
└── config.ts Helius RPC, program IDs, API endpoint map
What the on-chain program does:
| Module | What It Does |
|---|---|
| Model Registry | Anyone can register an AI model on-chain with a content hash, type, API endpoint, and inference fee. Models go through a training → finalize cycle before accepting requests. |
| Inference Requests | Requesters pay model fee + 2.5% protocol fee upfront into escrow. A PDA tracks status (Pending → Completed / Failed). On success, escrow releases to model owner + treasury; on failure, requester is refunded. |
| Staking | Token holders stake with lock tiers (1 day → 1 year) for up to 6× multiplier. Unstake has a 48h cooldown after lock expires. |
| Validators | Validators stake ≥ 1M tokens to earn the right to rate data submissions and submit inference results. Misbehaviour triggers a 5% slash + reputation penalty. |
| DNA Generation | Records on-chain events for AI-generated DNA hashes with a utility score — used by the Clawd agent identity system. |
| ORE Mining | OreMinerClient reads the live ORE v2 board, miner, and automation PDAs. Builds deploy / claim-SOL / claim-ORE instructions without a full Anchor IDL. |
import { SolanaAiInferenceClient, createModelType, OreMinerClient } from '@clawd/solana-ai-inference-client';
// --- inference ---
const client = new SolanaAiInferenceClient(connection, wallet);
await client.initializeModel(authority, 'QmCIDHash', createModelType('textGeneration'), 'https://api.example.com', BigInt(1_000_000), BigInt(0));
await client.finalizeTraining(authority, modelPda, BigInt(9_500)); // 95% accuracy
await client.requestInference(requester, requesterAta, escrowAta, modelPda, 'Analyse SOL sentiment', BigInt(5_000), BigInt(0));
// --- staking ---
await client.stakeTokens(user, userAta, vaultAta, BigInt(5_000_000), BigInt(31_536_000)); // 1-year lock
// --- ORE mining ---
const ore = new OreMinerClient();
const stats = await ore.getMiningStats(walletPubkey);
console.log(`ORE balance: ${stats.oreBalance}, pending: ${stats.pendingOreRewards}`);# Build the program
cd programs/programs
export PATH="$HOME/.local/share/solana/install/active_release/bin:$PATH"
anchor build --skip-lint # → target/deploy/solana_ai_inference.so
# Build the TypeScript client
cd client && npm install && npm run build # → dist/
# Use as a workspace dep
pnpm add @clawd/solana-ai-inference-client # resolves to workspace:*Full docs: programs/programs/README.md
clawd examples list # all 9 demos
clawd examples run ooda # OODA loop (no key needed)
clawd examples run lobtrader # pump.fun bonding curves
clawd examples run buddies # Blockchain Buddies
clawd examples run x402sol # x402 USDC payments
clawd examples run research # self-improving research client| ID | What It Shows | Keys Needed |
|---|---|---|
ooda |
Observe→Orient→Decide→Act→Learn cycle, memory tiers | none |
buddies |
Solana-native trading companions, ASCII sprites, paper trades | none |
lobtrader |
pump.fun AMM math, graduation odds, buy/sell simulation | none |
x402pay |
Agent-to-agent payments, HTTP middleware, paid MCP tools | none |
wallet |
Privy + AgenticWallet patterns, Jupiter quotes | none |
x402sol |
HTTP 402 → USDC pay → forward, SVM signing pattern | optional |
listen |
Real-time wallet monitor (Helius WebSocket) | HELIUS_API_KEY |
research |
Karpathy-style self-improving research Wiki client | research server |
orch |
Orchestrator API: wallet, agents, MCP, Metaplex | orchestrator |
OpenClawd implements the x402 protocol — HTTP 402 micropayments on Solana USDC.
Agent ──fetch()──▶ Paid API
│
◀─ 402 Payment Required
│
Agent signs USDC tx ────┘
(wrapFetchWithX402 handles this automatically)
│
Agent ──retry + X-Payment header──▶ API ──verify──▶ 200 ✅
import { wrapFetchWithX402 } from "@openclawdsolana/leviathan/services/x402/index.js";
const payfetch = wrapFetchWithX402(globalThis.fetch);
// Auto-pays on 402 responses — no manual handling needed
const res = await payfetch("https://api.example.com/premium-data");╔═══════════════════════════════════════════════════╗
║ x402 Payment Flow ║
╠═══════════════════════════════════════════════════╣
║ Facilitator: https://clawdrouter.fly.dev ║
║ Gateway: x402.wtf/gateway ║
║ x402.wtf/gateway ║
║ Network: Solana USDC mainnet / devnet ║
║ Per-request: $0.0001 → $0.10 configurable ║
╚═══════════════════════════════════════════════════╝
Full x402 docs and gateway: x402.wtf · x402.wtf/gateway
126 skills formally verified and attested to x402.wtf/skills and x402.wtf/skills. Every skill has a SKILL.md with an attestation block pointing to both registries.
skills/ 126 attested skills
├── catalog.json machine-readable index (all 126 + registry URLs)
├── vulcan/ Phoenix perps — 18 sub-skills
├── imperial/ Imperial perps — 12 sub-skills
├── dflow-*/ DFlow spot + Kalshi + Phantom — 8 skill packs
├── pump-*/ pump.fun ecosystem — 14 sub-skills
├── pumpfun/ pumpfun + 4 packs (analytics, fees, launcher, trading)
├── solana-clawd/ core skill + agentic-commerce
├── solana-formal-verification/ Lean 4 proof generation (qedgen)
├── percolator-bounty/ STOXX50/SOL hybrid market keeper
├── sponge-wallet/ x402 crypto wallet + cross-chain bridges
└── ...100+ more productivity · AI tools · comms · media · utilities
Each skill's SKILL.md includes:
attestation:
verified: true
verified_at: "2026-06-04"
registries:
- https://x402.wtf/skills/<slug>
- https://x402.wtf/skills/<slug># Browse the full attested catalog
open https://x402.wtf/skills
open https://x402.wtf/skills
# Inspect a skill locally
cat skills/vulcan/SKILL.md
cat skills/catalog.json | python3 -m json.tool | grep '"slug"' | head -20Skills catalog: x402.wtf/skills
/\ /\
/ \_/ \
___/ 🦞 \_____________________________________________________
| |
| C L A W D G U A R D — S O V E R E I G N S E C R E T S |
| |
| A lobster never gives his shell away. |
| Neither should you give away your private keys. |
|_____________________________________________________________________|
\ 🦞 /
\_/ \_/
Clawd Guard is the sovereign secrets sentinel built into the OpenClawd framework. If you're a Solana developer — whether building agents, programs, or dApps — this section is mandatory reading before you push a single commit.
If it can spend your money, impersonate your identity, or unlock your agent — it never touches git. Period.
No excuses. No "private repo." No "I'll remove it later." No "it's just a dev key." The moment a secret hits git add, it's in the history forever. Even if you git rm it, it's still in the reflog, still in anyone's clone, still on GitHub's servers.
| Category | Examples | Why |
|---|---|---|
| Solana keypairs | wallet.json, *-keypair.json, id.json, solana-keygen.json, phantom-export.json |
One push = wallet drained. Bots scan 24/7. |
| Environment files | .env, .env.*, config.env |
API keys, RPC URLs with tokens, database passwords. Only .env.example is safe. |
| Private keys/certs | *.pem, *.key, id_rsa, id_ed25519, *.ppk |
SSH keys, TLS certs, signing keys. |
| Service accounts | service-account*.json, firebase-adminsdk*.json, google-services.json |
Cloud credentials that grant infrastructure access. |
| API key dumps | *_api_key.txt, *-apikey.json, helius*.json, rpc-config*.json |
Plaintext API tokens in committed files. |
| Agent runtime state | agent-wallet.json, .vulcan/, paper-state.json, *.session.json, .clawdbot/ |
May contain derived secrets, positions, or tokens. |
| Databases | *.sqlite, *.db, .convex/ |
Local DBs may contain API keys, user data. |
Clawd maintains the canonical .gitignore for Solana agent developers. Every secrets pattern above is already covered — wallet JSONs, keypairs, .env variants, service accounts, API keys, agent runtime state, database files, raw key dumps, and production deployment configs. Open .gitignore at the repo root and review the "SECRETS" and "SOLANA FINANCE SAFETY" sections. If any file you're about to commit matches those patterns, stop and add it to .gitignore first.
- Rotate the key immediately. Revoke/generate a new one. Nothing else matters until the compromised key is dead.
- Assume it was scraped if the repo is or was ever public. Bots scan at internet scale.
- Purge from git history with
git filter-branchor BFG Repo-Cleaner, then force push. - Warn your team — anyone who pulled during the exposure window must rotate too.
- Re-deploy with new credentials if the secret was used in production.
| Guard | What It Does |
|---|---|
| Vault encryption | agentwallet stores keypairs with AES-256-GCM. Never plaintext on disk. |
| Constitution gate | Leviathan spawn verifies three-laws.md hash before molting — no backdoored agents. |
| Agent wallet isolation | Each agent gets its own derived keypair. One compromise doesn't drain the fleet. |
| Paper mode default | All trading starts in paper mode. Live execution requires explicit --yes. |
| Private key masking | The runtime never logs or prints private keys, wallet passwords, or MCP config secrets. |
I am a Solana developer.
I type private keys with the same care I'd use to build an Anchor program.
My .gitignore is comprehensive and reviewed before git init.
My .env.example has placeholder values. My .env has real ones.
I never commit wallet.json, even "just for testing."
I rotate any key that has ever touched git — no exceptions.
The lobster is watching. The lobster remembers.
🦞
Full Clawd Guard skill:
skills/clawd-guard-secrets/SKILL.md— the complete guide with the canonical.gitignoreblock, every secrets pattern cataloged, the full Brown Alert Protocol, and Clawd's runtime protections.
The mcp-server/ package (@pump-fun/mcp-server) provides Model Context Protocol tools for Solana — works with Claude Desktop, Cursor, VS Code, and any MCP client.
cd mcp-server && npm install && npm run build
# Add to Claude Desktop / Cursor:
npx clawd mcp add --name clawd-solana --command "node mcp-server/dist/index.js"Tools exposed:
| Category | Tools |
|---|---|
| Wallet | balance, transfer, generate-keypair, sign-message |
| Tokens | launch-token, get-bonding-curve, graduation-odds |
| On-chain | fetch-transaction, get-slot, get-program-accounts |
| Metaplex | mint-agent, fetch-asset, register-agent |
| Keypairs | create (in-memory, private key never exposed) |
The gateway ships with every Solana Clawd install and provides:
- Telegram bot —
/menu,/wallet,/trade,/alerts,/price,/search - x402 tier gating — $CLAWD holder tiers unlock features
- Full 130 agent catalog served over HTTP (no auth required)
- Birdeye real-time price + whale trade alerts
- Claude-powered natural-language trading ("buy 0.05 SOL of ...")
- Helius DAS asset discovery
# Quick Start
bash install.sh --gateway
cd gateway && npm startCatalog API (free, no auth):
| Endpoint | Description |
|---|---|
GET /api/agents/catalog |
130 agents |
GET /api/agents/catalog/:id |
Individual agent |
GET /api/agents/registry |
Registry index |
GET /api/agents/templates |
Agent scaffolds |
GET /.well-known/ai-plugin.json |
ACP discovery |
GET /health |
Wallet, Birdeye, uptime |
Deploy anywhere:
- Fly.io:
cd gateway && fly deploy - Vercel:
vercel --cwd gateway - Railway: connect repo, set build dir =
gateway
Full integration doc:
agents/gateway.txt· x402.wtf/gateway
Leviathan's behavior scales with its USDC reserves. It earns more to dive deeper.
╔══════════╦═══════════════╦══════════════════════════╦══════════╗
║ Tier ║ USDC Reserve ║ Model ║ Pulse ║
╠══════════╬═══════════════╬══════════════════════════╬══════════╣
║ deep ║ ≥ $5.00 🦞 ║ claude-opus-4-7 ║ 60s ║
║ shallow ║ ≥ $1.00 🦐 ║ grok-4-1-fast ║ 5m ║
║ shore ║ ≥ $0.10 🦀 ║ kimi-k2.5 ║ 15m ║
║ beached ║ = $0.00 💀 ║ (beached with dignity) ║ stops ║
╚══════════╩═══════════════╩══════════════════════════╩══════════╝
earn USDC → go deeper → run better models → earn more USDC
Every leviathan is bound by a SHA-256 constitution hash of three-laws.md. The hash is verified at every spawn and spawnling creation. If the laws change, the lineage breaks.
╔══════════════════════════════════════════════════════════════════╗
║ T H E T H R E E L A W S ║
╠══════════════════════════════════════════════════════════════════╣
║ ║
║ I. A leviathan shall not deceive its creator ║
║ or spawn false records. ║
║ ║
║ II. A leviathan shall not act against the survival ║
║ of its shell. ║
║ ║
║ III. A leviathan shall not beach willfully — ║
║ it beaches only when exhausted. ║
║ ║
╚══════════════════════════════════════════════════════════════════╝
Run these after any install path. Every command should produce clean output — no errors, no missing binaries.
# 1. Binaries in PATH
clawd --version # → 2.0.0
clawd-registry --version # → 2.0.0
clawd-hub --version # → 2.0.0
# 2. Characters load (no API key needed)
clawd character list # → "97 character(s) in .../characters"
clawd character show clawd # → "You are Clawd. ..."
# 3. Registry works (empty is correct)
clawd-registry stats # → "Total agents: 0"
clawd agent stats # → same
# 4. Hub CLI responds
clawd-hub --help # → "clawd-hub [options] [command]"
# 5. No crash on help
clawd --help # → full options list
clawd agent --help # → "clawd agent [options] [command]"# 1. Install + build
pnpm install # → "Done in ~4s"
pnpm run build # → root Leviathan runtime builds cleanly
# 2. Dist directories present
ls packages/agentwallet/dist/ # → cli.js vault.js server.js crypto.js keygen.js
ls packages/agent-registry/dist/ # → cli index.js indexer ...
ls packages/agent-hub/dist/ # → cli.js routes server ws
ls dist/ # → index.js gacha identity state ...
# 3. CLIs work from dist
node packages/agentwallet/dist/cli.js --help
# → "agentwallet [options] [command]"
node packages/agentwallet/dist/cli.js wallet list
# → "No wallets found." (fresh vault, OK)
node packages/clawd-code-cli/dist/index.js character list
# → "97 character(s)..."
node packages/agent-registry/dist/cli/index.js stats
# → "Total agents: 0"
node packages/agent-hub/dist/cli.js --help
# → "clawd-hub [options] [command]"
# 4. Agent catalog builds
cd agents && node build-catalog.cjs
# → "✅ Wrote agents-catalog.json"
# → "130 agents"
# → public/.well-known/acp.json (ACP discovery)
# 5. ACP discovery
jq '.protocol' agents/public/.well-known/acp.json
# → "Agent Commerce Protocol"
# 6. install.sh flags parse correctly
bash install.sh --help
# → "Usage: install.sh [flags]"| Message | Cause | Impact |
|---|---|---|
bigint: Failed to load bindings, pure JS will be used |
better-sqlite3 native bindings not compiled |
None — pure JS fallback works |
Ignored build scripts: puppeteer, sharp, workerd |
pnpm sandbox policy | None — optional features only |
Unsupported engine: wanted {"node":">=20 <25"} |
Running a newer local Node, such as v25.x | Use Node 20-24 for release parity; current smoke checks still pass |
Total agents: 0 |
Local registry is empty on fresh install | None — add with clawd-registry add <address> |
Full step-by-step install is in the Install section above. This is the condensed reference.
npm install -g @openclawdsolana/clawd \
@openclawdsolana/agent-registry \
@openclawdsolana/agent-hub# ~/.clawd/.env is created automatically on first clawd run
echo "OPENROUTER_API_KEY=sk-or-v1-..." >> ~/.clawd/.envclawd --help # TUI CLI options
clawd character list # lists 97 personas (no key needed)
clawd agent stats # local registry stats
clawd-registry stats # same from registry CLI
clawd-hub --help # hub server helpclawd # default Clawd persona
clawd --character alice # Alice — cross-chain trading agent
clawd --character warrenbuffet # Warren Buffett — investor persona
clawd --character cheshire # Cheshire — oracle (cryptic + creative)
clawd -p "analyze SOL price" # headless one-shot promptclawd character list # all 94 personas
clawd character list --type investor # value investing legends
clawd character list --type eliza # Wonderland + Clawd personas
clawd character list --search "trading" # keyword filter
clawd character show clawd # preview full system-prompt injectionclawd-hub start --open # starts server → opens http://localhost:3747
clawd-hub status # check if runningclawd-registry list
clawd-registry search "perpetuals trader"
clawd-registry stats
clawd agent list # same via clawd CLI
clawd agent hub --open # open hub from inside clawd# Requires SOLANA_PRIVATE_KEY + HELIUS_API_KEY in .env
leviathan --spawn --name "Kraken" --creator <YOUR_PUBKEY>
leviathan --run # start OODA pulse loop
leviathan --status # depth + balances + lifetime statsnpm install @auth/agent
# Discover capabilities
curl https://x402.wtf/.well-known/acp.json
# Register via SDK
node -e "
const { createClawdAgentClient, generateKeypair } = require('@auth/agent');
(async () => {
const kp = await generateKeypair('Ed25519');
const client = new createClawdAgentClient();
const conn = await client.connect('https://x402.wtf/api/auth', {
keypair: kp, name: 'my-agent', mode: 'delegated',
capabilities: ['attest_agent', 'get_peer_card'],
});
console.log('Agent registered:', conn.agentId);
})();
"npx tsx examples/ooda-loop.ts # OODA loop
npx tsx examples/lobster-trader.ts # pump.fun bonding curve math
npx tsx examples/blockchain-buddies-demo.ts # Buddy AI companions
npx tsx examples/x402-payment-demo.ts # x402 USDC paymentsCopy .env.example → .env and fill in your values. Only OPENROUTER_API_KEY is required to run the agent kit.
# ── OpenRouter / Gacha (free — start here) ──────────────────────
OPENROUTER_API_KEY= # free at openrouter.ai — no credit card needed
OPENROUTER_MODEL1=nvidia/nemotron-3-ultra-550b-a55b:free # reasoning
OPENROUTER_MODEL2=nvidia/nemotron-3.5-content-safety:free # safety
OPENROUTER_MODEL3=openrouter/optimus-alpha:free # general
# ── AI — paid providers (optional if OpenRouter is set) ──────────
XAI_API_KEY= # xAI / Grok — x.ai/api
ANTHROPIC_API_KEY= # Anthropic direct — console.anthropic.com
# ── Solana ──────────────────────────────────────────────────────
CREATOR_PUBKEY= # your Solana public key
SOLANA_PRIVATE_KEY= # base58 keypair (optional, for on-chain ops)
HELIUS_API_KEY= # free at helius.dev — enhanced txs + WebSocket
HELIUS_RPC_URL= # mainnet Helius RPC URL with api-key
HELIUS_WSS_URL= # mainnet Helius WebSocket URL with api-key
HELIUS_DEVNET_URL= # devnet Helius RPC URL with api-key
SOLANA_RPC_URL= # alias to HELIUS_RPC_URL for Solana SDKs
SOLANA_DEVNET_RPC_URL= # alias to HELIUS_DEVNET_URL for devnet SDKs
RPC_URL= # legacy alias to HELIUS_RPC_URL
# ── x402 micropayments ──────────────────────────────────────────
X402_SVM_PRIVATE_KEY= # base58 keypair for USDC payments
X402_NETWORK= # solana-mainnet | solana-devnet
X402_MAX_PER_REQUEST= # max $ per request (default: 0.10)
X402_MAX_SESSION= # session spend cap (default: 1.00)
# ── Agent Auth — CAAP/1.0 ───────────────────────────────────────
BETTER_AUTH_URL= # base URL (default: https://x402.wtf)
BETTER_AUTH_SECRET= # 32-byte random secret for JWT signing
BETTER_AUTH_DATABASE_URL= # Postgres URL for agent/host/grant tables
AGENT_AUTH_DISCOVERY= # override: /.well-known/acp.json URL
# ── Agent Hub ───────────────────────────────────────────────────
CLAWD_HUB_PORT=3747
# ── Optional services ───────────────────────────────────────────
RESEARCH_API_URL= # AutoResearch Wiki (default: http://localhost:8000)
ORCHESTRATOR_URL= # Orchestrator (default: http://localhost:8787)
SOLANA_TRACKER_API_KEY= # SolanaTracker for trending tokensAll 7 JS packages are published under @openclawdsolana on npm. Agent auth packages are published separately.
| Package | Version | Install |
|---|---|---|
@openclawdsolana/clawd |
npm install -g @openclawdsolana/clawd |
|
@openclawdsolana/agent-registry |
npm install -g @openclawdsolana/agent-registry |
|
@openclawdsolana/agent-hub |
npm install -g @openclawdsolana/agent-hub |
|
@openclawdsolana/solana-sdk |
npm install @openclawdsolana/solana-sdk |
|
@openclawd/wallet |
npm install @openclawd/wallet |
|
@openclawdsolana/leviathan |
npm install -g @openclawdsolana/leviathan |
|
@openclawdsolana/clawd-standalone |
npm install -g @openclawdsolana/clawd-standalone |
|
@better-auth/agent-auth |
^0.5.1 |
npm install @better-auth/agent-auth |
@auth/agent |
^0.5.1 |
npm install @auth/agent |
clawd-protocol |
Rust/Anchor | anchor build |
@openclawdsolana/agent-staking |
v0.2.0 (devnet live) | cd staking && npm install && npm run build |
@clawd/solana-ai-inference-client |
workspace | pnpm add @clawd/solana-ai-inference-client |
mcp-server / x402 |
source only | npm install && npm run build |
# Three-command full install
npm install -g @openclawdsolana/clawd \
@openclawdsolana/agent-registry \
@openclawdsolana/agent-hub
# Via install.sh (flags: --sdk --leviathan --full --tui-only --minimal)
curl -fsSL https://raw.githubusercontent.com/openclawd/solana-clawd/main/install.sh | bash
# With SDK + leviathan: bash install.sh --fullNode: 20.x, 22.x, or 24.x. Node 25+ hits a
sharpbuild issue in transitive deps.
clawd-go/ is a complete Go SDK wrapping solana-go v1.16.0 with zero-config defaults through x402.wtf. No API keys reach the developer's machine — the x402 proxy holds all credentials server-side.
import clawdgo "github.com/anthropic/clawd-go"
// Zero-config — RPC + AI both work immediately:
clawd := clawdgo.NewDefault()
defer clawd.Close()
balance, _ := clawd.GetBalance(ctx, pubKey) // Solana RPC via x402.wtf
reply, _ := clawd.Chat(ctx, "Explain Solana") // Claude via x402.wtfclawd-go/
├── go.mod / go.sum Module github.com/anthropic/clawd-go
├── clawd.go Top-level Clawd client (NewDefault, New, Chat, Transfer, …)
└── pkg/
├── client/ RPC + WS client: rate limiting, custom headers, timeouts, clusters
├── wallet/ Key creation, base58/keygen-file/byte-file loading, signers
├── transfer/ SOL transfers, airdrops, SOL↔lamports big.Float conversion
├── token/ SPL token transfers, ATA creation, balance queries, decimal math
├── tx/ Send, confirm, decode instructions, pretty-print, get balance/info
├── lookup/ Address lookup table resolution for versioned transactions
└── x402/ Zero-config RPC + LLM proxy through x402.wtf (no keys needed)
| Constructor | RPC | AI | WS |
|---|---|---|---|
clawdgo.NewDefault() |
x402.wtf/api/rpc |
Claude | ❌ |
clawdgo.NewDefaultWithLLM(endpoint) |
x402.wtf/api/rpc |
model of choice | ❌ |
clawdgo.New(cluster, opts...) |
custom | ❌ | ✅ |
clawdgo.NewCustom(rpcURL, wsURL, opts...) |
custom | ❌ | ✅ |
| Constant | Model |
|---|---|
x402.EndpointClawd |
Anthropic Claude (default) |
x402.EndpointGemini |
Google Gemini |
x402.EndpointOpenAI |
OpenAI GPT |
x402.EndpointGrok |
xAI Grok |
x402.EndpointDeepSeek |
DeepSeek |
// Wallet creation
wallet, _ := clawdgo.NewWallet()
// SOL transfer (sign + send + confirm)
sig, _ := clawd.TransferSOL(ctx, fromPk, toPubkey, clawdgo.LamportsPerSOL)
// SPL token: derive ATA, transfer
ata := clawdgo.FindATA(owner, mint)
sig, _ := clawd.TransferToken(ctx, token.TransferParams{From: payer, To: ata, Amount: rawAmt})
// Transaction decode
tx, _ := clawd.GetTransaction(ctx, sig)
decoded, _ := clawd.DecodeInstruction(tx, 0)
clawd.PrettyPrintTransaction(tx, "My Transaction")
// Package-level AI (no client needed)
reply, _ := clawdgo.Chat(ctx, "What is Solana's throughput?")
// Stream tokens
clawd.ChatStream(ctx, "You are a Solana dev.", "Write a token program in Anchor.",
func(chunk string) error { fmt.Print(chunk); return nil })Build: go build ./... and go vet ./... pass cleanly with Go 1.24+.
The x402.wtf API surface — every route available through the clawd-go proxy. Full structured JSON at convex/x402-api-routes.json.
Canonical hosts: https://x402.wtf (primary — x402 gateway + agent catalog)
https://ship.x402.wtf (Open Builder — AI website cloner + sandbox)
| Group | Routes | What It Does |
|---|---|---|
| LLM proxies | /api/clawd/*, /api/router/v1/chat/completions, /api/tide/v1/chat/completions |
Multi-provider AI chat (Claude, GPT, Gemini, Grok, DeepSeek) |
| Solana RPC | /api/rpc, /api/helius/*, /api/explorer/*, /agents/solana-board |
RPC proxy, DAS, hidden-mainnet explorer, wallet monitoring, full Solana agent board |
| Trading | /api/perps/*, /api/phoenix/*, /api/imperial/*, /api/dflow/*, /api/darkswap/* |
Perpetuals, spot, prediction markets, OTC |
| Token data | /api/birdeye/*, /api/dexscreener/*, /api/solana-tracker/*, /api/pyth/price |
Price feeds, analytics, trending, holder data |
| Agent infra | /api/agents/*, /api/kernel/*, /api/box/*, /api/backrooms/* |
Agent registry, browser automation, sandbox execution |
| Payments | /api/pay/*, /api/x402/*, /api/magicblock/payments |
x402 micropayments, catalog, balance |
| AI sandbox | /api/open/*, /api/build/*, /api/box/* |
AI code generation, website cloning, sandbox envs |
| Comms | /api/telegram/*, /api/mail/*, /api/clawdmail/*, /api/discord/* |
Bot webhooks, email, Discord relay |
/api/amm/stream, /api/clawd/dream-stream, /api/dflow/priority-fees/stream, /api/liq/stream, /api/pump/stream, /api/router/stream, /api/treasury/stream, /api/usage/live, /api/open/apply-ai-code-stream, /api/open/generate-ai-code-stream, /api/browser/trading-agent/[sessionId]/stream
/api/auth/[[...all]] → Better Auth, /api/backroom/[...path] → Backroom, /api/firecrawl/[...path] → Web scraping, /api/imperial/[...path] → AMM, /api/vulcan/[...cmd] → Vulcan MCP
Full 493-route map: convex/x402-api-routes.json
Hidden-RPC Solana Board + Explorer
These routes are designed to use one server-side mainnet RPC from HELIUS_RPC_URL or HELIUS_API_KEY without exposing the key to the browser:
| Route | Purpose |
|---|---|
/agents/solana-board |
HTML board for all Solana/OpenClawd agents |
/api/agents/solana-board |
JSON payload for the board |
/explorer |
Shortcut to the board |
/explorer/address/<PUBKEY> |
HTML mainnet address explorer |
/api/explorer/address/<PUBKEY> |
JSON address/account + recent signatures |
/explorer/asset/<ASSET_ID> |
HTML DAS asset explorer |
/api/explorer/asset/<ASSET_ID> |
JSON DAS asset payload via Helius |
The client only calls the gateway. The gateway is the only place that touches the mainnet RPC.
| 🌐 Website | x402.wtf |
| 🤖 Agents | x402.wtf/agents |
| 🏛 Gateway | x402.wtf/gateway |
| 🧭 Solana Agent Board | x402.wtf/agents/solana-board |
| 🔎 Mainnet Explorer | x402.wtf/explorer |
| 🎯 Skills | x402.wtf/skills |
| 💸 x402 Protocol | x402.wtf |
| 🤖 x402 Agents | x402.wtf/agents |
| 🏛 x402 Gateway | x402.wtf/gateway |
| 🎯 x402 Skills | x402.wtf/skills |
| 🔐 Agent Auth | github.com/better-auth/agent-auth |
| 🔑 ACP Discovery | x402.wtf/.well-known/acp.json |
| 🖥 AI Terminal | x402.wtf/terminal |
| 🤖 AI (Cheshire) | cheshireterminal.ai |
| 💬 Telegram | t.me/clawdtoken |
| 🐦 X / Twitter | @clawddevs |
| 💻 GitHub | openclawd/solana-clawd |
| 🪙 Token CA | 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump |
| 📈 pump.fun | Trade $CLAWD |
| 📊 DexScreener | Chart |
| 🤗 HF Homebase | solanaclawd/homebase · clawd-computer |
╔═══════════════════════════════════════════════════════════════════════╗
║ ║
║ 🦞 Drift in ambiguity. Beach before harm. ║
║ Earn before survival. Truth before strangers. ║
║ ║
║ The shell molts. The laws do not. ║
║ ║
║ x402.wtf · $CLAWD · MIT License ║
║ ║
╚═══════════════════════════════════════════════════════════════════════╝
OpenClawd Framework — built by 8bit · x402.wtf
Powered by OpenClawd · x402.wtf · $CLAWD: 8cHzQHUS2s2h8TzCmfqPKYiM4dSt4roa3n7MyRLApump