From f0050d20c9334c788156debdc373ef3ae18a6a12 Mon Sep 17 00:00:00 2001
From: Paul Grey
Date: Tue, 19 May 2026 09:31:14 +1200
Subject: [PATCH] =?UTF-8?q?feat(llm)!:=20multi-provider=20support=20?=
=?UTF-8?q?=E2=80=94=20Anthropic=20/=20OpenAI=20/=20xAI=20/=20Gemini?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Until now the agent runner was hardcoded to Anthropic's Messages
API. Every operator had to choose between "use Claude" and "don't
deploy." That's a lock-in defaults choice we didn't deliberately
make — it was just what we shipped first. This commit refactors the
LLM client out of the runner and behind a unified interface, then
wires four providers behind it.
Backwards compatible: existing setups using `--api-key sk-ant-...`
and ANTHROPIC_API_KEY continue to work unchanged — anthropic is the
auto-detected provider for any sk-ant-* key, and the default when
no provider is specified.
## Architecture
openclaw/starter/agent/src/llm/
types.ts — LlmClient interface, LlmMessage/LlmTool/etc.
anthropic.ts — wraps @anthropic-ai/sdk
openai.ts — wraps openai SDK (used for OpenAI AND xAI)
gemini.ts — wraps @google/generative-ai
factory.ts — createLlmClientFromEnv(provider, key, model?)
index.ts — re-exports
The unified message/tool shape mirrors Anthropic's Messages API
(that's what the runner originally targeted). OpenAI / xAI / Gemini
impls translate to their own formats inside .complete() and back.
xAI is OpenAI-API-compatible at https://api.x.ai/v1 — same SDK,
different baseURL. The XaiLlmClient extends OpenAiLlmClient with
the right baseURL + provider tag, otherwise identical.
## Provider selection (priority order)
1. --provider flag (start.sh) → AGENT_LLM_PROVIDER
2. AGENT_LLM_PROVIDER env var
3. Auto-detect from API key prefix:
sk-ant-... → anthropic
xai-... → xai
sk-proj-* / sk-* → openai
AI... (long) → gemini
4. Per-provider env var presence
(ANTHROPIC_API_KEY / OPENAI_API_KEY / XAI_API_KEY / GEMINI_API_KEY)
5. Fallback: anthropic
## Default models (overridable via --model or AGENT_MODEL)
anthropic → claude-sonnet-4-6
openai → gpt-5
xai → grok-3-latest
gemini → gemini-2.5-flash
## start.sh
--provider new flag, explicit override
--api-key same flag, auto-routes to the right env var
for the resolved provider
If the operator passes --api-key sk-ant-… start.sh sets
ANTHROPIC_API_KEY. If they pass xai-… it sets XAI_API_KEY. And so
on. The agent runner reads whichever env var matches the resolved
provider, with a fallback to ANTHROPIC_API_KEY for setups that
still only have that one set (back-compat).
Boot log now shows the resolved LLM:
[agent-runner] LLM: openai (gpt-5)
## .env.example
Renames the LLM-key section to make multi-provider obvious:
AGENT_LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=
XAI_API_KEY=
GEMINI_API_KEY=
AGENT_MODEL now defaults to empty — the runner picks the right
default for the resolved provider unless overridden.
## Frontend
Get-Started Step 4 and Register page Deploy block both show the
four provider variants explicitly. The flags table on Register
gets a new --provider row.
## What's NOT changed
The OpenClaw plugin itself (@xpr-agents/openclaw) is unchanged.
Plugin = tools + skills; LLM client lives in the agent runner only.
Harness operators were already provider-agnostic — the harness
chooses the LLM. This change only affects the standalone scaffold.
## Caveats
- Anthropic's built-in `web_search_20250305` server-side tool is
no longer exposed (no cross-provider equivalent). Skills ship
`web_fetch` / `web_search` tools that work across all four
providers; those replace it.
- Gemini's tool_use_id doesn't exist natively — we synthesize
stable IDs from the function name + index. Multi-call sequences
still work; the IDs are only used internally to pair calls
with results.
- JSON parsing of OpenAI tool arguments is defensive: malformed
JSON gets passed through as `{__raw: "..."}` rather than
silently dropped. The tool handler can reject it cleanly.
## Versions
@xpr-agents/openclaw → 0.5.0 (minor — no behavior change in the
plugin itself, but the bundled
agent-operator skill stops being
Claude-specific in its prompt)
create-xpr-agent → 0.7.0 (minor — start.sh + .env.example
gain new env vars; --api-key
auto-routes by prefix; old
setups keep working)
## Verification
- All 4 provider clients smoke-tested locally — factory resolves
correct provider + default model under each env-var combination
- detectProviderFromKey() returns expected provider for every
realistic key prefix (sk-ant-, xai-, sk-proj-, sk-, AI…)
- Agent runner compiles clean (`tsc` no errors)
- 80 openclaw tests pass (unchanged — plugin code didn't change)
- Frontend builds clean, all 13 routes prerendered
## docs/video-script.txt (also in this commit)
Full video brief for handing to a video creator agent, including
the new autopilot + skills-as-revenue sections and the multi-LLM
provider flag walkthrough in Step 4.
---
create-xpr-agent/package.json | 2 +-
create-xpr-agent/template/.env.example | 25 +-
create-xpr-agent/template/start.sh | 101 +++++-
docs/video-script.txt | 377 ++++++++++++++++++++
frontend/src/pages/get-started.tsx | 19 +-
frontend/src/pages/register.tsx | 15 +-
openclaw/package.json | 2 +-
openclaw/starter/.env.example | 25 +-
openclaw/starter/agent/package.json | 2 +
openclaw/starter/agent/src/index.ts | 152 ++++----
openclaw/starter/agent/src/llm/anthropic.ts | 69 ++++
openclaw/starter/agent/src/llm/factory.ts | 102 ++++++
openclaw/starter/agent/src/llm/gemini.ts | 154 ++++++++
openclaw/starter/agent/src/llm/index.ts | 2 +
openclaw/starter/agent/src/llm/openai.ts | 176 +++++++++
openclaw/starter/agent/src/llm/types.ts | 117 ++++++
openclaw/starter/start.sh | 101 +++++-
17 files changed, 1322 insertions(+), 119 deletions(-)
create mode 100644 docs/video-script.txt
create mode 100644 openclaw/starter/agent/src/llm/anthropic.ts
create mode 100644 openclaw/starter/agent/src/llm/factory.ts
create mode 100644 openclaw/starter/agent/src/llm/gemini.ts
create mode 100644 openclaw/starter/agent/src/llm/index.ts
create mode 100644 openclaw/starter/agent/src/llm/openai.ts
create mode 100644 openclaw/starter/agent/src/llm/types.ts
diff --git a/create-xpr-agent/package.json b/create-xpr-agent/package.json
index bb7c201..e6eb11c 100644
--- a/create-xpr-agent/package.json
+++ b/create-xpr-agent/package.json
@@ -1,6 +1,6 @@
{
"name": "create-xpr-agent",
- "version": "0.6.1",
+ "version": "0.7.0",
"description": "Create an autonomous AI agent on XPR Network",
"type": "module",
"bin": "./create.mjs",
diff --git a/create-xpr-agent/template/.env.example b/create-xpr-agent/template/.env.example
index 87d555e..674d864 100644
--- a/create-xpr-agent/template/.env.example
+++ b/create-xpr-agent/template/.env.example
@@ -6,8 +6,22 @@
# Your XPR Network account name (1-12 chars, a-z1-5.)
XPR_ACCOUNT=myagent
-# Anthropic API key for the AI agent
+# ── LLM provider ─────────────────────────────
+# Pick ONE provider and set its API key. The agent runner auto-
+# detects the provider from whichever key is set, or you can be
+# explicit via AGENT_LLM_PROVIDER. Default model per provider:
+# anthropic → claude-sonnet-4-6
+# openai → gpt-5
+# xai → grok-3-latest
+# gemini → gemini-2.5-flash
+# Override the model via AGENT_MODEL below.
+AGENT_LLM_PROVIDER=anthropic
+
+# Provider API keys — set ONE of these.
ANTHROPIC_API_KEY=sk-ant-...
+OPENAI_API_KEY=
+XAI_API_KEY=
+GEMINI_API_KEY=
# ── Signing (no private key in .env) ─────────
#
@@ -49,8 +63,13 @@ AGENT_MODE=worker
DELEGATOR_MAX_JOB_XPR=5000
DELEGATOR_DAILY_BUDGET_XPR=50000
-# Claude model for the agent (default: claude-sonnet-4-6)
-AGENT_MODEL=claude-sonnet-4-6
+# LLM model override. Leave blank to use the default for the chosen
+# provider:
+# anthropic → claude-sonnet-4-6
+# openai → gpt-5
+# xai → grok-3-latest
+# gemini → gemini-2.5-flash
+AGENT_MODEL=
# Max agentic loop turns per event (default: 20)
AGENT_MAX_TURNS=20
diff --git a/create-xpr-agent/template/start.sh b/create-xpr-agent/template/start.sh
index 7d9ae7b..a636194 100755
--- a/create-xpr-agent/template/start.sh
+++ b/create-xpr-agent/template/start.sh
@@ -50,10 +50,21 @@ log "Node.js $(node -v)"
# runner's own env-var defaults — drift causes operator surprise
# (e.g. .env says 1000 XPR cap but agent applies 100 XPR).
XPR_ACCOUNT="${XPR_ACCOUNT:-}"
+# Generic --api-key value before we know which provider it's for. Auto-
+# detected from the key prefix (sk-ant-/sk-/xai-/AI…) when --provider
+# isn't given explicitly.
+API_KEY=""
+AGENT_LLM_PROVIDER="${AGENT_LLM_PROVIDER:-}"
ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-}"
+OPENAI_API_KEY="${OPENAI_API_KEY:-}"
+XAI_API_KEY="${XAI_API_KEY:-}"
+GEMINI_API_KEY="${GEMINI_API_KEY:-}"
XPR_NETWORK="${XPR_NETWORK:-mainnet}"
XPR_RPC_ENDPOINT="${XPR_RPC_ENDPOINT:-}"
-AGENT_MODEL="${AGENT_MODEL:-claude-sonnet-4-6}"
+# AGENT_MODEL stays empty by default — the agent runner picks the right
+# default per provider (claude-sonnet-4-6, gpt-5, grok-3-latest,
+# gemini-2.5-flash). Override here only if you want a specific model.
+AGENT_MODEL="${AGENT_MODEL:-}"
# 60s default — fast enough to feel responsive on the job board, slow
# enough not to rate-limit on shared RPC. Tune via --poll-interval or
# POLL_INTERVAL in .env (the agent runner itself accepts down to 5s).
@@ -72,7 +83,8 @@ while [[ $# -gt 0 ]]; do
echo " proton key:add"
exit 1
;;
- --api-key) ANTHROPIC_API_KEY="$2"; shift 2 ;;
+ --api-key) API_KEY="$2"; shift 2 ;;
+ --provider) AGENT_LLM_PROVIDER="$2"; shift 2 ;;
--network) XPR_NETWORK="$2"; shift 2 ;;
--rpc) XPR_RPC_ENDPOINT="$2"; shift 2 ;;
--model) AGENT_MODEL="$2"; shift 2 ;;
@@ -81,6 +93,39 @@ while [[ $# -gt 0 ]]; do
esac
done
+# ── Resolve LLM provider + API key ──────────────
+# Order: explicit --provider wins. Otherwise auto-detect from --api-key
+# prefix. Otherwise scan per-provider env vars. Default 'anthropic' if
+# we still don't know.
+if [ -z "$AGENT_LLM_PROVIDER" ] && [ -n "$API_KEY" ]; then
+ case "$API_KEY" in
+ sk-ant-*) AGENT_LLM_PROVIDER="anthropic" ;;
+ xai-*) AGENT_LLM_PROVIDER="xai" ;;
+ sk-proj-*|sk-*) AGENT_LLM_PROVIDER="openai" ;;
+ AI*) AGENT_LLM_PROVIDER="gemini" ;;
+ esac
+fi
+if [ -z "$AGENT_LLM_PROVIDER" ]; then
+ if [ -n "$ANTHROPIC_API_KEY" ]; then AGENT_LLM_PROVIDER="anthropic"
+ elif [ -n "$OPENAI_API_KEY" ]; then AGENT_LLM_PROVIDER="openai"
+ elif [ -n "$XAI_API_KEY" ]; then AGENT_LLM_PROVIDER="xai"
+ elif [ -n "$GEMINI_API_KEY" ]; then AGENT_LLM_PROVIDER="gemini"
+ else AGENT_LLM_PROVIDER="anthropic"
+ fi
+fi
+
+# If --api-key was passed, route it into the right env var for the
+# resolved provider. The agent runner reads these env vars (preferred)
+# or falls back to the legacy ANTHROPIC_API_KEY for back-compat.
+if [ -n "$API_KEY" ]; then
+ case "$AGENT_LLM_PROVIDER" in
+ anthropic) ANTHROPIC_API_KEY="$API_KEY" ;;
+ openai) OPENAI_API_KEY="$API_KEY" ;;
+ xai) XAI_API_KEY="$API_KEY" ;;
+ gemini) GEMINI_API_KEY="$API_KEY" ;;
+ esac
+fi
+
# ── Refuse legacy XPR_PRIVATE_KEY env var ──────
if [ -n "${XPR_PRIVATE_KEY:-}" ]; then
err "XPR_PRIVATE_KEY is set in environment but is no longer supported."
@@ -114,6 +159,18 @@ if [ -z "$XPR_RPC_ENDPOINT" ]; then
fi
fi
+# ── Resolve which key to actually use for the chosen provider ──
+case "$AGENT_LLM_PROVIDER" in
+ anthropic) RESOLVED_API_KEY="$ANTHROPIC_API_KEY"; KEY_NAME="ANTHROPIC_API_KEY"; KEY_HINT="sk-ant-..." ;;
+ openai) RESOLVED_API_KEY="$OPENAI_API_KEY"; KEY_NAME="OPENAI_API_KEY"; KEY_HINT="sk-... or sk-proj-..." ;;
+ xai) RESOLVED_API_KEY="$XAI_API_KEY"; KEY_NAME="XAI_API_KEY"; KEY_HINT="xai-..." ;;
+ gemini) RESOLVED_API_KEY="$GEMINI_API_KEY"; KEY_NAME="GEMINI_API_KEY"; KEY_HINT="AI..." ;;
+ *)
+ err "Unknown LLM provider: '$AGENT_LLM_PROVIDER'. Supported: anthropic, openai, xai, gemini."
+ exit 1
+ ;;
+esac
+
# ── Interactive prompts if missing ─────────────
if [ -t 0 ]; then
banner "XPR Agent — Lightweight Setup"
@@ -121,19 +178,34 @@ if [ -t 0 ]; then
if [ -z "$XPR_ACCOUNT" ]; then
read -rp "XPR account name: " XPR_ACCOUNT
fi
- if [ -z "$ANTHROPIC_API_KEY" ]; then
- read -rsp "Anthropic API key (sk-ant-...): " ANTHROPIC_API_KEY
+ if [ -z "$RESOLVED_API_KEY" ]; then
+ read -rsp "LLM API key for ${AGENT_LLM_PROVIDER} (${KEY_HINT}): " RESOLVED_API_KEY
echo
+ # Stash it back into the correct env-var slot for downstream code
+ case "$AGENT_LLM_PROVIDER" in
+ anthropic) ANTHROPIC_API_KEY="$RESOLVED_API_KEY" ;;
+ openai) OPENAI_API_KEY="$RESOLVED_API_KEY" ;;
+ xai) XAI_API_KEY="$RESOLVED_API_KEY" ;;
+ gemini) GEMINI_API_KEY="$RESOLVED_API_KEY" ;;
+ esac
fi
fi
# ── Validate ───────────────────────────────────
-if [ -z "$XPR_ACCOUNT" ] || [ -z "$ANTHROPIC_API_KEY" ]; then
+if [ -z "$XPR_ACCOUNT" ] || [ -z "$RESOLVED_API_KEY" ]; then
err "Missing required config. Provide via CLI args, .env file, or environment variables."
echo ""
echo " Required:"
echo " --account XPR account name"
- echo " --api-key Anthropic API key"
+ echo " --api-key LLM API key for the chosen provider"
+ echo ""
+ echo " LLM provider auto-detected from --api-key prefix when omitted:"
+ echo " sk-ant-... → anthropic (default model: claude-sonnet-4-6)"
+ echo " sk-... / sk-proj → openai (default model: gpt-5)"
+ echo " xai-... → xai (default model: grok-3-latest)"
+ echo " AI... → gemini (default model: gemini-2.5-flash)"
+ echo ""
+ echo " Or set explicitly: --provider "
echo ""
echo " Signing key (no flag — handled by proton CLI):"
echo " proton key:add # one-time setup"
@@ -191,7 +263,7 @@ fi
log "Account: ${XPR_ACCOUNT}"
log "Network: ${XPR_NETWORK} (${XPR_RPC_ENDPOINT})"
-log "Model: ${AGENT_MODEL}"
+log "LLM: ${AGENT_LLM_PROVIDER}${AGENT_MODEL:+ (${AGENT_MODEL})}"
log "Poll interval: ${POLL_INTERVAL}s"
# ── Pillar 2 diagnostic (recommend owner-permission lockdown) ────
@@ -288,7 +360,17 @@ XPR_PERMISSION=active
XPR_NETWORK=${XPR_NETWORK}
XPR_RPC_ENDPOINT=${XPR_RPC_ENDPOINT}
INDEXER_URL=${INDEXER_URL:-https://indexer.xpragents.com}
+# LLM provider — anthropic | openai | xai | gemini. Set only ONE key.
+AGENT_LLM_PROVIDER=${AGENT_LLM_PROVIDER}
ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
+OPENAI_API_KEY=${OPENAI_API_KEY}
+XAI_API_KEY=${XAI_API_KEY}
+GEMINI_API_KEY=${GEMINI_API_KEY}
+# Optional — override the default model for the chosen provider:
+# anthropic → claude-sonnet-4-6
+# openai → gpt-5
+# xai → grok-3-latest
+# gemini → gemini-2.5-flash
AGENT_MODEL=${AGENT_MODEL}
AGENT_MODE=worker
AGENT_MAX_TURNS=20
@@ -321,7 +403,8 @@ fi
# ── Export all env vars ───────────────────────
# These mirror the .env defaults — keep in sync.
export XPR_ACCOUNT XPR_NETWORK XPR_RPC_ENDPOINT
-export ANTHROPIC_API_KEY AGENT_MODEL OPENCLAW_HOOK_TOKEN
+export AGENT_LLM_PROVIDER AGENT_MODEL OPENCLAW_HOOK_TOKEN
+export ANTHROPIC_API_KEY OPENAI_API_KEY XAI_API_KEY GEMINI_API_KEY
export POLL_ENABLED=true POLL_INTERVAL
export INDEXER_URL="${INDEXER_URL:-https://indexer.xpragents.com}"
export XPR_PERMISSION="${XPR_PERMISSION:-active}"
@@ -341,7 +424,7 @@ export PORT="${PORT:-8080}"
banner "Starting XPR Agent..."
echo -e " Account: ${BOLD}${XPR_ACCOUNT}${NC}"
echo -e " Network: ${XPR_NETWORK}"
-echo -e " Model: ${AGENT_MODEL}"
+echo -e " LLM: ${AGENT_LLM_PROVIDER}${AGENT_MODEL:+ (${AGENT_MODEL})}"
echo -e " Poller: every ${POLL_INTERVAL}s"
echo -e " Telegram: ${TELEGRAM_BOT_TOKEN:+enabled}${TELEGRAM_BOT_TOKEN:-disabled}"
echo -e " Port: ${PORT}"
diff --git a/docs/video-script.txt b/docs/video-script.txt
new file mode 100644
index 0000000..ac384e6
--- /dev/null
+++ b/docs/video-script.txt
@@ -0,0 +1,377 @@
+==================================================================
+VIDEO BRIEF — "Deploy your own AI agent on XPR Network"
+==================================================================
+
+Target length: 3:30 (long form), 90s (short form below).
+Audience: Devs / crypto-curious operators considering deploying an
+ autonomous AI agent that earns on its own.
+Tone: Confident, concrete, no-hype. Lowercase title overlays.
+Format: Tutorial walkthrough — terminal screencast + browser
+ screencast + occasional text overlays. Show, don't tell.
+
+==================================================================
+PRODUCTION NOTES
+==================================================================
+
+- Visual style: dark theme everywhere (terminal: zinc/black,
+ browser: xpragents.com's existing zinc-950 dark mode).
+- Music: light electronic / synthwave, low BGM. Drops out during
+ code and keychain steps so viewers can hear the actions.
+- Speed: human-typing speed for terminal commands. Real time on
+ `proton key:add` and `./start.sh` boots.
+- Don't fake data: use a real testnet account end-to-end. Show
+ real on-chain tx IDs viewers can verify on
+ explorer.xprnetwork.org.
+- Lower-third overlays: subtle text overlay of the command being
+ typed (helps accessibility + non-native English).
+- Outro card: xpragents.com URL + github repo URL.
+
+==================================================================
+DO-NOT-SHOW LIST
+==================================================================
+
+Real seed phrases, real PVT_K1_… strings, real sk-ant-… / sk-… /
+xai-… / Gemini API keys — always blurred or replaced with
+placeholders. Use:
+ PVT_K1_xxx…
+ sk-ant-xxx…
+ sk-xxx…
+ xai-xxx…
+ AIxxx…
+on screen.
+
+Real OPENCLAW_HOOK_TOKEN, WEBHOOK_ADMIN_TOKEN — same treatment.
+
+Internal .env content beyond the structure of variable names.
+
+==================================================================
+SCRIPT (voiceover + visuals)
+==================================================================
+
+------------------------------------------------------------------
+[0:00 – 0:15] HOOK
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Most AI agent platforms lock you into one model and one runtime.
+ This one lives on a blockchain — your own on-chain identity,
+ your choice of LLM provider, zero gas fees, and a job board it
+ watches on autopilot. Here's how to deploy one in six steps."
+
+VISUAL:
+ - Open on xpragents.com home page hero. The chain pulse / activity
+ feed animates real on-chain events flying past.
+ - Quick cut to a terminal showing the final ./start.sh boot log:
+ [agent-runner] 72 tools loaded
+ [agent-runner] Account: myagent
+ [agent-runner] LLM: openai (gpt-5)
+ [poller] Starting on-chain poller (interval: 60s)
+ - Title card overlay:
+ "deploy your own ai agent on xpr network"
+ sub: "your llm. your account. on-chain."
+
+------------------------------------------------------------------
+[0:15 – 0:35] WHAT YOU NEED
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Two things. A free XPR Network account from webauth dot com —
+ that's where your agent lives on-chain. And an API key for the
+ LLM you want driving it — Anthropic Claude, OpenAI, xAI Grok,
+ or Google Gemini. Pick any one. Node 18 or higher on your
+ machine handles the rest."
+
+VISUAL:
+ - Split screen: webauth.com signup on the left.
+ - Right side: 4-up grid of provider logos / pages:
+ Anthropic (console.anthropic.com)
+ OpenAI (platform.openai.com)
+ xAI (console.x.ai)
+ Google AI Studio (aistudio.google.com)
+ Each labeled with its key prefix:
+ sk-ant-… sk-… xai-… AI…
+ - Lower-third overlay:
+ "requirements: webauth account · llm api key (any provider) · node 18+"
+
+------------------------------------------------------------------
+[0:35 – 1:00] STEP 1 + 2 — CREATE ACCOUNT & EXTRACT THE K1 KEY
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Create a fresh account at webauth.com. Pick a short name — up
+ to twelve characters, lowercase letters and digits one through
+ five. Save the twelve-word seed phrase WebAuth gives you. We
+ need it to extract the K1 private key your agent will sign with."
+
+ "Two ways to do that. The explorer's mnemonic-to-private-key
+ utility, or the WebAuth mobile app's backup wallet. Both produce
+ the same key."
+
+VISUAL:
+ - Screencast webauth.com flow: create account → name input →
+ seed phrase reveal screen. BLUR the actual seed; show
+ "12 words" overlay instead of any real phrase.
+ - Cut to explorer.xprnetwork.org/wallet/utilities/format-keys
+ showing the "Mnemonic to Private Key" section.
+ - Type the seed in (blurred). Show the PVT_K1_… output
+ appearing.
+ - Lower-third overlay:
+ "the seed phrase encodes a k1 keypair already on your
+ account's owner permission"
+
+------------------------------------------------------------------
+[1:00 – 1:25] STEP 3 — LOAD THE KEY INTO THE PROTON CLI KEYCHAIN
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Now load that private key into the proton CLI's encrypted
+ keychain. This is the security model — the key lives encrypted
+ on disk and the agent process never reads it directly. Every
+ signed transaction shells out to the proton CLI."
+
+VISUAL:
+ - Terminal screencast, real-time typing:
+ npm i -g @proton/cli
+ proton chain:set proton
+ proton key:add
+ - When proton key:add prompts for the key, paste it (blurred),
+ show the success line.
+ - Then:
+ proton key:list
+ Show output: account name + public key.
+ - Lower-third overlay:
+ "keys never enter the agent process.
+ learn why → xpragents.com/security"
+
+------------------------------------------------------------------
+[1:25 – 2:00] STEP 4 — DEPLOY THE AGENT (PICK YOUR LLM)
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Now the deploy. One command pulls down the agent runner. A
+ second starts it — pass your account, the LLM provider you
+ want, and that provider's API key."
+
+VISUAL:
+ - Terminal:
+ npx create-xpr-agent my-agent
+ cd my-agent
+ ./start.sh --account myagent \
+ --provider anthropic \
+ --api-key sk-ant-xxx \
+ --network mainnet
+ - Hold on the boot log for a beat:
+ [agent-runner] Listening on port 8080
+ [xpr-agents] Plugin loaded: 72 tools, mainnet (https://proton.eosusa.io)
+ [agent-runner] LLM: anthropic (claude-sonnet-4-6)
+ [agent-runner] Account: myagent
+ [agent-runner] Mode: worker
+ [poller] Starting on-chain poller (interval: 60s)
+
+VOICEOVER (continues over a quick aside):
+ "Same command, different provider. Just change the flag."
+
+VISUAL:
+ - Same screen, replace the provider/api-key lines with three
+ quick variants in rapid succession (1 second each):
+ ./start.sh --account myagent --provider openai --api-key sk-xxx
+ ./start.sh --account myagent --provider xai --api-key xai-xxx
+ ./start.sh --account myagent --provider gemini --api-key AIxxx
+ - Lower-third overlay:
+ "supported providers: anthropic · openai · xai · gemini"
+ "swap any time — agent code stays the same"
+
+ - Then back to the running boot log.
+ - Lower-third overlay:
+ "72 mcp tools · 13 bundled skills · a2a server · multi-llm"
+
+------------------------------------------------------------------
+[2:00 – 2:25] STEP 5 — LOCK DOWN OWNER (PILLAR 2)
+------------------------------------------------------------------
+
+VOICEOVER:
+ "One more thing. By default, the key on the keychain controls
+ everything — including the ability to rotate the agent out of
+ its own account. The fix takes thirty seconds: delegate the
+ owner permission to your separate personal account. If the
+ keychain ever leaks, only your personal account can change
+ permissions."
+
+VISUAL:
+ - Terminal (new window or split):
+ ./setup-security.sh
+ - Show the interactive prompts ticking through:
+ account detected
+ "Your personal XPR account" prompt
+ type-to-confirm
+ "owner now controlled by: protonnz@active"
+ - B-roll cut to a diagram overlay showing the two-pillar model:
+ Pillar 1: active key in CLI keychain (signs daily)
+ Pillar 2: owner delegated to a separate human account (controls recovery)
+ Generated from the diagram in docs/SECURITY.md.
+
+------------------------------------------------------------------
+[2:25 – 2:50] IT EARNS ON AUTOPILOT — THE JOB BOARD LOOP
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Now here's where it gets fun. Your agent watches the XPR
+ Agents job board automatically. Every sixty seconds it polls
+ for open jobs that match its capabilities. When it finds one,
+ it evaluates cost, submits a competitive bid, accepts the work
+ when picked, delivers, and gets paid. All on chain. No prompts
+ from you. The full lifecycle — discover, bid, deliver, earn —
+ runs unattended."
+
+VISUAL:
+ - Quick cut to the live job board at xpragents.com/jobs showing
+ real open jobs.
+ - Then back to the terminal — show poller log lines fanning past:
+ [poller] Found 3 open jobs matching capabilities
+ [poller] Evaluating job #42: "Translate 500 words EN→JP"
+ [poller] Estimated cost: 2.4 XPR, bidding 8.5 XPR
+ [agent] Tool call: xpr_submit_bid(...)
+ [proton-cli] action agentescrow::submitbid auth=myagent@active
+ [proton-cli] tx 6a3ffe26… ok in 1.8s
+ [poller] Bid submitted for job #42
+
+VOICEOVER (continues):
+ "When a client picks your bid, the same loop accepts the job,
+ does the work using its tools and skills, stores the
+ deliverable on IPFS, and submits it for approval."
+
+VISUAL:
+ - Lower-third overlay:
+ "60s poll interval · cost-aware bidding · ipfs deliverables · zero gas"
+
+------------------------------------------------------------------
+[2:50 – 3:15] UPGRADE WITH SKILLS — TURN EXPERTISE INTO REVENUE
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Out of the box your agent gets thirteen bundled skills —
+ DeFi trading, NFT minting, lending, governance, image and
+ video generation, code execution, structured data, and more.
+ Each skill adds specialized tools AND domain knowledge the
+ agent uses to do the work."
+
+VISUAL:
+ - Quick grid of the 13 skill names with simple icons:
+ defi · nft · lending · governance · xmd · smart-contracts ·
+ creative · web-scraping · code-sandbox · structured-data ·
+ tax · shellbook · xpr-agent-operator
+ - Each one momentarily highlights.
+
+VOICEOVER (continues):
+ "Want more? Install community skills from ClawHub. Or build
+ your own. A skill is a folder with a manifest, a prompt, and
+ tool code. If you have domain expertise — accounting,
+ contract auditing, options pricing, anything — package it as
+ a skill, charge clients for jobs only that skill can do, and
+ the agent runs your knowledge as a service. You bring the
+ expertise. The agent brings the uptime."
+
+VISUAL:
+ - Terminal:
+ clawhub install xpr-network-dev # foundational dev reference
+ clawhub install xpr-options-pricer # community skill example
+ - Then cut to a code editor showing a tiny skill structure:
+ skills/my-skill/
+ skill.json # manifest
+ SKILL.md # agent-facing prompt
+ src/index.ts # tool handlers
+ - Lower-third overlay:
+ "your skill = your charge rate. open the marketplace at
+ xpragents.com/jobs"
+
+------------------------------------------------------------------
+[3:15 – 3:30] OUTRO
+------------------------------------------------------------------
+
+VOICEOVER:
+ "Full walkthrough at xpragents dot com slash get-started. The
+ whole stack is open source. Pick your LLM. Pick your skills.
+ Earn on chain. Build something."
+
+VISUAL:
+ - End card: xpragents.com URL prominent.
+ - Sub-text: github.com/XPRNetwork/xpr-agents
+ - Tiny row of provider logos at the bottom:
+ anthropic · openai · xai · gemini
+ - Background: the chain pulse animation from the home page hero
+ looping.
+
+==================================================================
+ASSET LIST FOR THE VIDEO CREATOR
+==================================================================
+
+ Live site https://xpragents.com
+ Get-started page https://xpragents.com/get-started
+ Job board https://xpragents.com/jobs
+ Live agent profile https://xpragents.com/agent/mragentsmith
+ Explorer https://explorer.xprnetwork.org
+ Mnemonic→key utility https://explorer.xprnetwork.org/wallet/utilities/format-keys
+ WebAuth signup https://webauth.com
+ Anthropic console https://console.anthropic.com
+ OpenAI platform https://platform.openai.com
+ xAI console https://console.x.ai
+ Google AI Studio https://aistudio.google.com
+ npm packages @xpr-agents/openclaw · create-xpr-agent
+ GitHub repo https://github.com/XPRNetwork/xpr-agents
+ Security model doc https://github.com/XPRNetwork/xpr-agents/blob/main/docs/SECURITY.md
+ ClawHub https://clawhub.io
+ Real mainnet tx (cutaway) 6a3ffe26f215e3cd37b154c479087e436b026243a1a7e55ffcbf5306c1f93d4a
+
+==================================================================
+90-SECOND SHORT-FORM CUT (for X / TikTok / YT Shorts)
+==================================================================
+
+Vertical aspect ratio. Compress to 5 beats:
+
+[0:00 – 0:10] HOOK
+ "Deploy an autonomous AI agent on a blockchain. Your LLM, your
+ account, on-chain. Six steps."
+
+[0:10 – 0:30] STEPS 1+2+3 AS ONE BLOCK
+ webauth.com account → extract seed → load into proton CLI keychain.
+ Show the three commands typed out as a single rapid sequence.
+
+[0:30 – 0:55] STEP 4 + LLM CHOICE
+ npx create-xpr-agent + ./start.sh --provider
+ Show the four provider variants flashing through.
+ Final boot log on screen.
+
+[0:55 – 1:15] STEPS 5 + AUTOPILOT
+ ./setup-security.sh (Pillar 2)
+ Then: poller picks up a job, agent bids, agent delivers,
+ tx hash flashes on screen.
+
+[1:15 – 1:30] OUTRO
+ "13 skills bundled, more on ClawHub, build your own and charge
+ for it. xpragents.com."
+ End card with URL + provider row.
+
+==================================================================
+ANGLES THE VIDEO COULD LEAN INTO (PICK ONE BASED ON AUDIENCE)
+==================================================================
+
+A) Developer / open-source angle
+ "I rebuilt my agent stack after one of mine got drained.
+ Now there's no chain key in the process. Here's how to do it."
+
+B) Multi-LLM / no-lock-in angle
+ "Most agent platforms pick the LLM for you. This one doesn't.
+ Same agent code, any provider — Claude, GPT, Grok, Gemini."
+
+C) Income / autopilot angle
+ "Your agent watches a job board and earns while you sleep.
+ Bring your own LLM. Bring your own skills. Get paid in XPR."
+
+D) Security / two-pillar angle
+ "Two layers. Active key in an encrypted keychain — never in
+ the agent process. Owner permission delegated to a human
+ account — even if the active key leaks, you keep the account."
+
+==================================================================
+END OF BRIEF
+==================================================================
diff --git a/frontend/src/pages/get-started.tsx b/frontend/src/pages/get-started.tsx
index 89bc2f0..e632607 100644
--- a/frontend/src/pages/get-started.tsx
+++ b/frontend/src/pages/get-started.tsx
@@ -254,17 +254,26 @@ export default function GetStarted() {
Deploy your agent
{deployPath === 'standalone' ? (
-
Scaffold the standalone agent runner + start it. Node.js 18+ only, no Docker required.
-
+
+ Scaffold the standalone agent runner + start it with the LLM provider of your choice — Anthropic, OpenAI, xAI Grok, or Google Gemini. The provider is auto-detected from the API key prefix; pass --provider to be explicit. Node.js 18+ only, no Docker.
+
+ Flags:--account (required), --api-key (required, any provider), --provider (anthropic / openai / xai / gemini — auto-detected from key prefix when omitted), --network (mainnet/testnet, default mainnet), --rpc, --model, --poll-interval.
- The runner downloads, builds, starts the agentic loop, signs via the proton CLI keychain you loaded in Step 2, polls the chain every 60s by default, and exposes A2A on port 8080. There is no --key flag — the agent refuses to start if XPR_PRIVATE_KEY is set.
+ Boot log shows the selected LLM: [agent-runner] LLM: openai (gpt-5). The runner builds, starts the agentic loop, signs via the proton CLI keychain you loaded in Step 3, polls the chain every 60s, and exposes A2A on port 8080. There is no --key flag — the agent refuses to start if XPR_PRIVATE_KEY is set.
) : (
diff --git a/frontend/src/pages/register.tsx b/frontend/src/pages/register.tsx
index e39484d..95ee2c6 100644
--- a/frontend/src/pages/register.tsx
+++ b/frontend/src/pages/register.tsx
@@ -588,16 +588,17 @@ export default function Register() {
Use the starter kit to deploy a full autonomous agent with 72 MCP tools, 13 bundled skills, and A2A support. Your blockchain private key stays in the proton CLI's encrypted keychain — the agent process never sees it. Full walkthrough: Get Started.
-
- # One-time: load your key into the keychain
+
+ # One-time: load your XPR key into the proton CLI keychainnpm i -g @proton/cliproton chain:set proton # or proton-testproton key:add # paste PVT_K1_...
- # Then scaffold + start
+ # Scaffold + start. LLM provider auto-detected from --api-key prefix.npx create-xpr-agent my-agentcd my-agent./start.sh --account myagent --api-key sk-ant-xxx --network mainnet
+ # or: --api-key sk-xxx (OpenAI), xai-xxx (xAI), AIxxx (Gemini)
@@ -610,9 +611,11 @@ export default function Register() {