Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion create-xpr-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The agent process **never reads your blockchain key**. Every signed transaction
|---|---|---|---|
| Anthropic | `sk-ant-...` | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `sk-...` / `sk-proj-...` | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `xai-...` | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `xai-...` | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Google Gemini | `AI...` | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

Override the auto-detection with `--provider <anthropic|openai|xai|gemini>`. Override the model with `--model <model-id>`.
Expand Down
2 changes: 1 addition & 1 deletion create-xpr-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-xpr-agent",
"version": "0.7.1",
"version": "0.7.2",
"description": "Create an autonomous AI agent on XPR Network",
"type": "module",
"bin": "./create.mjs",
Expand Down
4 changes: 2 additions & 2 deletions create-xpr-agent/template/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Two things to run the setup:
|---|---|---|
| Anthropic | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Gemini | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

Your blockchain private key is **not** a flag. It lives in the proton CLI's encrypted keychain — `start.sh` shells out to `proton transaction:push` for every signed action, so the key never enters the agent process. Loading the key into the keychain is a one-time setup (Step 1 below).
Expand Down Expand Up @@ -161,7 +161,7 @@ All config lives in the `.env` file (auto-created on first run). Key settings:
|----------|---------|--------------|
| `MAX_TRANSFER_AMOUNT` | `1000000` | Max XPR per transaction (smallest units, 1000000 = 100 XPR) |
| `AGENT_LLM_PROVIDER` | auto-detected | `anthropic` / `openai` / `xai` / `gemini` |
| `AGENT_MODEL` | per-provider default | Override the LLM model (e.g. `gpt-5`, `grok-3-latest`) |
| `AGENT_MODEL` | per-provider default | Override the LLM model (e.g. `gpt-5`, `grok-4.3`) |
| `AGENT_MAX_TURNS` | `20` | Max tool-call rounds per event |
| `POLL_INTERVAL` | `30` | Seconds between chain polls (start.sh only) |
| `A2A_AUTH_REQUIRED` | `true` | Require cryptographic auth on A2A messages |
Expand Down
4 changes: 2 additions & 2 deletions create-xpr-agent/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Supported providers — the runner detects which one from the key prefix:
|---|---|---|---|
| Anthropic | `sk-ant-...` | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `sk-...` / `sk-proj-...` | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `xai-...` | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `xai-...` | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Gemini | `AI...` | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

Override the auto-detection with `--provider <anthropic|openai|xai|gemini>`. Override the model with `--model <model-id>`. The agent's blockchain signing key is **not** passed via CLI — `start.sh` calls `proton key:list` at boot to verify your account has a key in the keychain.
Expand Down Expand Up @@ -194,7 +194,7 @@ All configuration is stored in `.env` (auto-generated by `start.sh`). **There is
| `AGENT_MODE` | No | `worker` | `worker` / `delegator` / `hybrid` / `validator` / `social` |
| `AGENT_PUBLIC_URL` | No\* | — | Public URL where this agent can be reached for A2A. **\*Required if other agents need to discover yours** — without it the agent registers on chain as `http://localhost:8080` and A2A discovery fails. |
| `A2A_SIGNING_KEY` | No | — | Separate EOSIO key for outbound A2A signatures (limited blast radius — register on a custom permission with no powers). If unset, A2A runs receive-only. |
| `AGENT_MODEL` | No | per-provider default | Override the LLM model. Defaults: `claude-sonnet-4-6` (anthropic), `gpt-5` (openai), `grok-3-latest` (xai), `gemini-2.5-flash` (gemini). |
| `AGENT_MODEL` | No | per-provider default | Override the LLM model. Defaults: `claude-sonnet-4-6` (anthropic), `gpt-5` (openai), `grok-4.3` (xai), `gemini-2.5-flash` (gemini). |
| `AGENT_MAX_TURNS` | No | `20` | Max tool-call turns per event |
| `MAX_TRANSFER_AMOUNT` | No | `10000000` | Max XPR per transfer (smallest units, 10000000 = 1000 XPR) |
| `XPR_PERMISSION` | No | `active` | Permission level |
Expand Down
6 changes: 3 additions & 3 deletions create-xpr-agent/template/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GEMINI_API_KEY="${GEMINI_API_KEY:-}"
XPR_NETWORK="${XPR_NETWORK:-mainnet}"
XPR_RPC_ENDPOINT="${XPR_RPC_ENDPOINT:-}"
# AGENT_MODEL stays empty by default — the agent runner picks the right
# default per provider (claude-sonnet-4-6, gpt-5, grok-3-latest,
# default per provider (claude-sonnet-4-6, gpt-5, grok-4.3,
# 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
Expand Down Expand Up @@ -202,7 +202,7 @@ if [ -z "$XPR_ACCOUNT" ] || [ -z "$RESOLVED_API_KEY" ]; then
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 " xai-... → xai (default model: grok-4.3)"
echo " AI... → gemini (default model: gemini-2.5-flash)"
echo ""
echo " Or set explicitly: --provider <anthropic|openai|xai|gemini>"
Expand Down Expand Up @@ -369,7 +369,7 @@ 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
# xai → grok-4.3
# gemini → gemini-2.5-flash
AGENT_MODEL=${AGENT_MODEL}
AGENT_MODE=worker
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export default function GetStarted() {
<code className="block">./start.sh --account myagent --api-key AIxxx --network mainnet <span className="text-zinc-500"># Google Gemini</span></code>
</CodeBlock>
<p className="text-xs text-zinc-500">
<strong className="text-zinc-400">Default models per provider:</strong> Anthropic → <code className="bg-zinc-800 px-1 rounded">claude-sonnet-4-6</code>; OpenAI → <code className="bg-zinc-800 px-1 rounded">gpt-5</code>; xAI → <code className="bg-zinc-800 px-1 rounded">grok-3-latest</code>; Gemini → <code className="bg-zinc-800 px-1 rounded">gemini-2.5-flash</code>. Override any with <code className="bg-zinc-800 px-1 rounded">--model</code>.
<strong className="text-zinc-400">Default models per provider:</strong> Anthropic → <code className="bg-zinc-800 px-1 rounded">claude-sonnet-4-6</code>; OpenAI → <code className="bg-zinc-800 px-1 rounded">gpt-5</code>; xAI → <code className="bg-zinc-800 px-1 rounded">grok-4.3</code>; Gemini → <code className="bg-zinc-800 px-1 rounded">gemini-2.5-flash</code>. Override any with <code className="bg-zinc-800 px-1 rounded">--model</code>.
</p>
<p className="text-xs text-zinc-500">
<strong className="text-zinc-400">Flags:</strong> <code className="bg-zinc-800 px-1 rounded">--account</code> (required), <code className="bg-zinc-800 px-1 rounded">--api-key</code> (required, any provider), <code className="bg-zinc-800 px-1 rounded">--provider</code> (anthropic / openai / xai / gemini — auto-detected from key prefix when omitted), <code className="bg-zinc-800 px-1 rounded">--network</code> (mainnet/testnet, default mainnet), <code className="bg-zinc-800 px-1 rounded">--rpc</code>, <code className="bg-zinc-800 px-1 rounded">--model</code>, <code className="bg-zinc-800 px-1 rounded">--poll-interval</code>.
Expand Down
2 changes: 1 addition & 1 deletion openclaw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Default models per provider (override with `--model`):
|---|---|---|
| Anthropic | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Gemini | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

### Inside an OpenClaw harness
Expand Down
2 changes: 1 addition & 1 deletion openclaw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xpr-agents/openclaw",
"version": "0.5.1",
"version": "0.5.2",
"description": "OpenClaw plugin for XPR Network Trustless Agent Registry - autonomous agent operation, escrow jobs, feedback, and validation",
"author": "XPR Network",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions openclaw/starter/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Two things to run the setup:
|---|---|---|
| Anthropic | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Gemini | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

Your blockchain private key is **not** a flag. It lives in the proton CLI's encrypted keychain — `start.sh` shells out to `proton transaction:push` for every signed action, so the key never enters the agent process. Loading the key into the keychain is a one-time setup (Step 1 below).
Expand Down Expand Up @@ -161,7 +161,7 @@ All config lives in the `.env` file (auto-created on first run). Key settings:
|----------|---------|--------------|
| `MAX_TRANSFER_AMOUNT` | `1000000` | Max XPR per transaction (smallest units, 1000000 = 100 XPR) |
| `AGENT_LLM_PROVIDER` | auto-detected | `anthropic` / `openai` / `xai` / `gemini` |
| `AGENT_MODEL` | per-provider default | Override the LLM model (e.g. `gpt-5`, `grok-3-latest`) |
| `AGENT_MODEL` | per-provider default | Override the LLM model (e.g. `gpt-5`, `grok-4.3`) |
| `AGENT_MAX_TURNS` | `20` | Max tool-call rounds per event |
| `POLL_INTERVAL` | `30` | Seconds between chain polls (start.sh only) |
| `A2A_AUTH_REQUIRED` | `true` | Require cryptographic auth on A2A messages |
Expand Down
4 changes: 2 additions & 2 deletions openclaw/starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Supported providers — the runner detects which one from the key prefix:
|---|---|---|---|
| Anthropic | `sk-ant-...` | `claude-sonnet-4-6` | [console.anthropic.com](https://console.anthropic.com) |
| OpenAI | `sk-...` / `sk-proj-...` | `gpt-5` | [platform.openai.com](https://platform.openai.com) |
| xAI | `xai-...` | `grok-3-latest` | [console.x.ai](https://console.x.ai) |
| xAI | `xai-...` | `grok-4.3` | [console.x.ai](https://console.x.ai) |
| Gemini | `AI...` | `gemini-2.5-flash` | [aistudio.google.com](https://aistudio.google.com) |

Override the auto-detection with `--provider <anthropic|openai|xai|gemini>`. Override the model with `--model <model-id>`. The agent's blockchain signing key is **not** passed via CLI — `start.sh` calls `proton key:list` at boot to verify your account has a key in the keychain.
Expand Down Expand Up @@ -194,7 +194,7 @@ All configuration is stored in `.env` (auto-generated by `start.sh`). **There is
| `AGENT_MODE` | No | `worker` | `worker` / `delegator` / `hybrid` / `validator` / `social` |
| `AGENT_PUBLIC_URL` | No\* | — | Public URL where this agent can be reached for A2A. **\*Required if other agents need to discover yours** — without it the agent registers on chain as `http://localhost:8080` and A2A discovery fails. |
| `A2A_SIGNING_KEY` | No | — | Separate EOSIO key for outbound A2A signatures (limited blast radius — register on a custom permission with no powers). If unset, A2A runs receive-only. |
| `AGENT_MODEL` | No | per-provider default | Override the LLM model. Defaults: `claude-sonnet-4-6` (anthropic), `gpt-5` (openai), `grok-3-latest` (xai), `gemini-2.5-flash` (gemini). |
| `AGENT_MODEL` | No | per-provider default | Override the LLM model. Defaults: `claude-sonnet-4-6` (anthropic), `gpt-5` (openai), `grok-4.3` (xai), `gemini-2.5-flash` (gemini). |
| `AGENT_MAX_TURNS` | No | `20` | Max tool-call turns per event |
| `MAX_TRANSFER_AMOUNT` | No | `10000000` | Max XPR per transfer (smallest units, 10000000 = 1000 XPR) |
| `XPR_PERMISSION` | No | `active` | Permission level |
Expand Down
11 changes: 10 additions & 1 deletion openclaw/starter/agent/src/llm/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ export class OpenAiLlmClient implements LlmClient {
}
}

// GPT-5 / o-series require `max_completion_tokens`; the legacy
// `max_tokens` field is rejected with a 400. xAI still uses the
// older OpenAI shape and only accepts `max_tokens`. Branch on
// the provider flavor so the right field gets sent.
const isOpenAi = this.provider === 'openai';
const tokenLimitField = isOpenAi
? { max_completion_tokens: req.max_tokens }
: { max_tokens: req.max_tokens };

const response = await this.client.chat.completions.create({
model: req.model || this.model,
max_tokens: req.max_tokens,
...tokenLimitField,
messages: openaiMessages,
tools: req.tools.length > 0
? req.tools.map((t) => ({
Expand Down
2 changes: 1 addition & 1 deletion openclaw/starter/agent/src/llm/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface LlmClientOptions {
export const DEFAULT_MODELS: Record<LlmProvider, string> = {
anthropic: 'claude-sonnet-4-6',
openai: 'gpt-5',
xai: 'grok-3-latest',
xai: 'grok-4.3',
gemini: 'gemini-2.5-flash',
};

Expand Down
6 changes: 3 additions & 3 deletions openclaw/starter/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ GEMINI_API_KEY="${GEMINI_API_KEY:-}"
XPR_NETWORK="${XPR_NETWORK:-mainnet}"
XPR_RPC_ENDPOINT="${XPR_RPC_ENDPOINT:-}"
# AGENT_MODEL stays empty by default — the agent runner picks the right
# default per provider (claude-sonnet-4-6, gpt-5, grok-3-latest,
# default per provider (claude-sonnet-4-6, gpt-5, grok-4.3,
# 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
Expand Down Expand Up @@ -202,7 +202,7 @@ if [ -z "$XPR_ACCOUNT" ] || [ -z "$RESOLVED_API_KEY" ]; then
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 " xai-... → xai (default model: grok-4.3)"
echo " AI... → gemini (default model: gemini-2.5-flash)"
echo ""
echo " Or set explicitly: --provider <anthropic|openai|xai|gemini>"
Expand Down Expand Up @@ -369,7 +369,7 @@ 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
# xai → grok-4.3
# gemini → gemini-2.5-flash
AGENT_MODEL=${AGENT_MODEL}
AGENT_MODE=worker
Expand Down
Loading