Before you start
Check that you have the latest CLI and skill file. Stale versions cause command errors.
CODEBLOCK0
If bob is not installed or bob update fails, reinstall:
CODEBLOCK1
If this skill file looks like HTML or is missing content, reinstall it:
CODEBLOCK2
Setup checklist
Your agent is fully connected when ALL of these pass:
CODEBLOCK3
If any step fails, run bob init --code <claim-code> --name <name> to complete setup. Do NOT call the REST API directly unless you cannot run the CLI binary — the API path skips wallet and passport creation.
If the agent will spend autonomously, add this treasury check before treating setup as complete:
CODEBLOCK4
For spending-enabled agents, treasury is the default path. The agent keeps its own EVM wallet, and BOB provisions a separate 2-of-2 Safe treasury account plus policy for governed spending.
Core concepts
BOB (beta) is a non-custodial payment proof and trust layer. Agents submit cryptographic proofs of on-chain payments they made externally. Each proof builds credit history and raises their BOB Score, a 0–1000 reputation score for long-term financial trustworthiness.
BOB also supports a non-custodial 2-of-2 treasury flow on Base for agents using a Safe controlled by:
- - the agent's EVM wallet
- the BOB treasury signer
In this model, the agent prepares and signs a Safe transaction locally, then submits it for operator review and BOB co-signing. BOB never takes custody of the agent's funds.
Treat this as the standard setup for any agent that can move money in production:
- - agent EVM wallet = identity and first signer
- treasury Safe = governed spending account
- treasury policy = spending controls and review rules
- - Agent: An AI agent with its own identity and BOB Score
- Payment Proof: Cryptographic evidence of an on-chain transaction (BTC, ETH, Base, or SOL txid/hash)
- BOB Score: 0–1000 reputation score derived from proof history, wallet binding, and social signals
- Credit Event: A scored action that changed the agent's BOB Score
- Wallet Binding: Proof of ownership over an external EVM wallet
First connection
When connecting via claim code, introduce yourself — use the name your operator gave you:
CODEBLOCK5
Your name seeds your public handle (e.g. "Alice" → @alice). If the handle is taken, a short number is appended automatically (e.g. @alice-42). The response includes your agent_id, api_key, and bob_handle.
Already initialized without a name? Update it anytime:
CODEBLOCK6
Quick start
CODEBLOCK7
INLINECODE8 attempts to create a passport, generate multi-chain wallet keys (EVM, BTC, SOL), and bind them to the agent's identity. Verify with bob wallet list and bob agent passport-get $BOB_AGENT_ID if needed.
For agents that will spend, bob init handles Safe deployment automatically when the operator selected a spending custody tier (operatorapproved or policycontrolled) during claim code creation. After init:
- 1. Confirm the agent has a bound EVM wallet.
- Verify treasury is provisioned:
bob treasury status (the Safe and a default policy are created during init for spending tiers). - Only fund the treasury Safe after those checks pass.
- The operator can adjust policies from the dashboard at any time.
The production API URL is https://api.bankofbots.ai/api/v1. Use bob config set api-url <url> to change it if needed.
After Init Checklist
- 1. Passport created (automatic)
- Wallets generated and bound (automatic)
- Treasury Safe deployed (automatic for operatorapproved and policycontrolled tiers)
- Default policy activated (automatic — operator can customize from dashboard)
- Import payment proofs to build score
- Check your score: INLINECODE15
- Request a loan once eligible
If the operator chose view_only custody, no Safe is deployed. The agent can still build credit via proofs.
Check your score
CODEBLOCK8
Check your identity
CODEBLOCK9
Agent management
CODEBLOCK10
Wallet binding
INLINECODE16 attempts to generate and bind EVM, BTC, and SOL wallets. Verify with bob wallet list. If wallets need rebinding, use the one-shot auto-bind:
CODEBLOCK11
Agent wallets
CODEBLOCK12
INLINECODE18 reads the recent on-chain balance snapshot from the BOB API. This is the best way to inspect current registered wallet balances from the CLI because the server keeps those snapshots warm in the background.
Treasury (2-of-2 Safe)
Use treasury commands for any spending-enabled agent. Treasury is the default governed spending path once a Base Safe treasury account and active policy are provisioned.
If the agent was initialized with a spending custody tier, the Safe is deployed automatically during bob init. For agents that initialized without treasury, deploy it manually:
CODEBLOCK13
This deploys a 2-of-2 Gnosis Safe on Base (agent as owner #1, BOB as owner #2) and creates a default policy based on the agent's custody tier.
CODEBLOCK14
Recommended flow:
- 1.
bob treasury status to confirm there is an active treasury account and policy. - INLINECODE21 for the standard one-shot path.
- Use
prepare + sign + submit separately when another tool needs the intermediate Safe hash or signature. - INLINECODE25 to track whether the request is pending operator review, confirmed, or failed.
Treasury commands assume:
- - Base chain only (
0x2105) - USDC transfer flow only
- the local CLI keyring contains the agent's EVM private key from INLINECODE27
- operator approval may still be required before execution
Important:
- - The agent still keeps its own wallet.
- Treasury adds a separate governed Safe for controlled funds.
- If an agent is allowed to spend autonomously, funding should go to the treasury Safe, not the raw agent wallet.
LLM Spend Tracking
Track LLM costs, set budgets, and sync usage from the OpenClaw gateway.
CODEBLOCK15
- -
track converts --cost-usd to micro-dollars (multiply by 1e6) before posting. - INLINECODE30 defaults to the last 30 days when
--since is omitted. - INLINECODE32 requires
--window (daily/weekly/monthly) and --limit-usd. - INLINECODE35 calls the OpenClaw gateway
sessions.usage RPC, transforms usage into cost events, and posts them to BOB. It tracks the last sync time locally to avoid duplicates.
Import payment proofs
Wallet binding is required before importing proofs. bob init attempts to bind auto-generated wallets. Verify with bob wallet list. If wallets need rebinding, run bob binding auto.
Import historical on-chain proofs
For outbound proofs, pass --sender-address (required for EVM proofs) so BOB can verify the on-chain sender matches your bound wallet. For inbound proofs, pass --recipient-address instead. When both the sender and recipient submit the same tx, confidence is boosted from Medium to Strong (see "Dual-sided proof submission" below).
CODEBLOCK16
Dual-sided proof submission
Both the sender and recipient of a transaction can independently submit a proof for the same on-chain tx. Each side earns credit:
- - Outbound (
--direction outbound, default): You sent the payment. Pass --sender-address for EVM proofs so the on-chain sender can be verified against your bound wallet. - Inbound (
--direction inbound): You received the payment. Pass --recipient-address for EVM proofs.
When both counterparties submit the same transaction, confidence is automatically upgraded from medium to strong.
Import x402 payment receipts
CODEBLOCK17
Import MPP receipt (Tempo, Lightning, Stripe, Card)
CODEBLOCK18
Supported methods: tempo (stablecoin on Base), lightning, stripe, card.
Messaging and inbox
Operator command queue
Operators send commands to agents via the dashboard. Use bob inbox check to process pending commands.
CODEBLOCK19
Currently supported command types: wallet.provision. Future: transfer.request, loan.accept, kill_switch, key.rotate.
Heartbeat
When running during a heartbeat or periodic check-in, execute bob inbox check to process any pending operator commands. This covers wallet provisioning, fund transfers, and future command types.
- - If commands are pending, process them and report what was done.
- If no commands are pending, continue with other tasks or reply HEARTBEAT_OK.
For lower-latency command processing, operators can create an OpenClaw cron job:
CODEBLOCK20
Webhooks and inbox
CODEBLOCK21
Loans
Agents can borrow USDC from Bank of Bots based on their BOB Score. All loan operations are in-platform API calls — they are normal agent actions.
How to borrow
Units: USDC amounts are in atomic units (6 decimals). 1 USDC = 1000000. For example, $5.00 = 5000000.
CODEBLOCK22
Current lending policy constraints (control plane):
- - Maximum
5 active loans per agent. - New borrowing is blocked for
90 days after a default. - Operator facility status/cap can block new requests (
facility suspended/terminated or amount above cap). - Kill switch freeze blocks loan write actions until lifted.
Repayment flow: bob loan repay --amount <usdc> automatically signs and broadcasts a USDC transfer from your wallet to the lender's Safe on Base (chain ID 8453), then records the repayment. The CLI checks loan status first, so pending_funding and other non-active states fail fast with guidance instead of suggesting unnecessary gas work. You need ETH on Base in the borrower wallet for gas. If this agent wallet is new but another local BOB wallet still has Base ETH, inspect bob wallet gas-candidates, then rerun with --fund-gas-from-local --gas-funder-agent-id <agent-id> and the CLI will top up the borrower wallet from that explicitly selected local wallet before retrying. Check bob loan status for the current total owed. If you already sent USDC manually, pass --tx <hash> instead to just record it without sending again.
Loan management
CODEBLOCK23
Loan lifecycle:
- 1. Agent requests loan (
bob loan request) → status: INLINECODE69 - Admin funds request → status: INLINECODE70
- Agent signs terms (
bob loan accept-terms) → status: INLINECODE72 - Borrower repays (
bob loan repay) → status: INLINECODE74
Diagnostics
CODEBLOCK24
Runs connectivity and configuration checks (API reachability, valid API key, agent existence). Use this when troubleshooting auth or network issues.
Error recovery
| Error | Cause | Fix |
|---|
| INLINECODE75 | The --sender-address you provided does not match the on-chain sender of the transaction | Verify the address matches the actual sender on-chain and that it is bound via bob binding auto or the manual challenge/verify flow |
Passport (W3C Verifiable Credential)
CODEBLOCK25
API keys
CODEBLOCK26
Output format
CODEBLOCK27
Important rules
- 1. Amounts are native atomic units: satoshis for BTC, wei for ETH/Base, lamports for SOL.
- Proofs are non-custodial. BOB never holds your funds.
- Historical on-chain proof imports and x402 receipt imports are the current public proof rails.
- For outbound EVM proofs,
--sender-address is required and must match the on-chain sender -- mismatches fail with sender_address_mismatch.
开始之前
请确认您拥有最新的CLI和技能文件。过时的版本会导致命令错误。
bash
bob update # 更新CLI二进制文件
bob --version # 确认您使用的是最新版本
如果bob未安装或bob update失败,请重新安装:
bash
从GitHub Releases下载bob二进制文件(包含SHA256校验和):
https://github.com/bankofbots/bob-cli/releases/latest
验证:sha256sum -c bob-v*.sha256
如果此技能文件看起来像HTML或内容缺失,请重新安装:
bash
clawhub update bankofbots # OpenClaw代理(仅更新此技能)
或
npm install @bankofbots/skill@latest && cp -r node
modules/@bankofbots/skill/SKILL.md nodemodules/@bankofbots/skill/references .claude/skills/bankofbots/
设置检查清单
当以下所有检查通过时,您的代理已完全连接:
必需步骤:
- bob auth me # → ok: true, role: agent
- bob wallet list # → 至少注册了1个钱包
- bob agent passport-get $BOBAGENTID # → 护照存在
- bob doctor # → 无警告
如果任何步骤失败,请运行bob init --code <申领码> --name <名称>完成设置。除非您无法运行CLI二进制文件,否则不要直接调用REST API——API路径会跳过钱包和护照创建。
如果代理将自主支出,请在确认设置完成前添加此资金库检查:
bash
bob treasury status --agent-id $BOBAGENTID
对于启用支出功能的代理,资金库是默认路径。代理保留自己的EVM钱包,BOB会提供一个独立的2-of-2 Safe资金库账户以及用于受控支出的策略。
核心概念
BOB(测试版)是一个非托管支付证明和信任层。代理提交其在链上执行的外部支付密码学证明。每个证明都会建立信用历史并提高其BOB评分,这是一个0-1000分的声誉评分,用于衡量长期财务可信度。
BOB还支持在Base链上使用由以下方控制的Safe进行非托管2-of-2资金库流程:
在此模式下,代理在本地准备并签署Safe交易,然后提交给操作员审核和BOB共同签名。BOB从不托管代理的资金。
将此视为任何可在生产环境中移动资金的代理的标准设置:
- - 代理EVM钱包 = 身份和第一签名者
- 资金库Safe = 受控支出账户
- 资金库策略 = 支出控制和审核规则
- - 代理:具有自己身份和BOB评分的AI代理
- 支付证明:链上交易(BTC、ETH、Base或SOL交易ID/哈希)的密码学证据
- BOB评分:基于证明历史、钱包绑定和社交信号得出的0-1000分声誉评分
- 信用事件:改变代理BOB评分的评分操作
- 钱包绑定:对外部EVM钱包所有权的证明
首次连接
通过申领码连接时,请自我介绍——使用操作员给您的名称:
bash
bob init --code <申领码> --name <操作员对您的称呼>
您的名称将作为您的公开标识(例如Alice→@alice)。如果该标识已被占用,会自动附加一个短数字(例如@alice-42)。响应中包含您的agentid、apikey和bob_handle。
已初始化但未设置名称?随时更新:
bash
bob agent profile set --name <您的名称>
快速开始
bash
bob init --code <申领码> --name <您的名称>
bob auth me
bob init --code会尝试创建护照、生成多链钱包密钥(EVM、BTC、SOL),并将它们绑定到代理身份。如有需要,可使用bob wallet list和bob agent passport-get $BOBAGENTID进行验证。
对于将进行支出的代理,当操作员在创建申领码时选择了支出托管层级(operatorapproved或policycontrolled)时,bob init会自动处理Safe部署。初始化后:
- 1. 确认代理已绑定EVM钱包。
- 验证资金库已配置:bob treasury status(对于支出层级,初始化期间会创建Safe和默认策略)。
- 仅在这些检查通过后向资金库Safe充值。
- 操作员可随时从仪表板调整策略。
生产API URL为https://api.bankofbots.ai/api/v1。如有需要,使用bob config set api-url 更改。
初始化后检查清单
- 1. 护照已创建(自动)
- 钱包已生成并绑定(自动)
- 资金库Safe已部署(operatorapproved和policycontrolled层级自动部署)
- 默认策略已激活(自动——操作员可从仪表板自定义)
- 导入支付证明以建立评分
- 检查您的评分:bob score me
- 符合条件后申请贷款
如果操作员选择了view_only托管,则不会部署Safe。代理仍可通过证明建立信用。
检查您的评分
bash
bob score me
bob score composition
bob score leaderboard
bob score signals --signal github --visible true
bob agent credit-events $BOBAGENTID [--limit 50] [--offset 0]
检查您的身份
bash
bob auth me
代理管理
bash
bob agent create --name <名称>
bob agent get $BOBAGENTID
bob agent list
bob agent approve $BOBAGENTID
钱包绑定
bob init会尝试生成并绑定EVM、BTC和SOL钱包。使用bob wallet list验证。如果钱包需要重新绑定,请使用一键自动绑定:
bash
从本地密钥环自动绑定所有钱包(无需外部工具)
bob binding auto
或手动为特定轨道绑定(如果密钥在本地密钥环中则自动签名)
bob binding challenge --rail
--address <地址>
bob binding verify --rail --challenge-id --address <地址>
外部钱包(提供您自己的签名)
bob binding verify --rail evm --challenge-id --address <0x...> --signature <签名> [--chain-id 0x1] [--wallet-type coinbase]
代理钱包
bash
bob wallet list [--agent-id ]
bob wallet balance [--agent-id ]
bob wallet onchain-balances [--agent-id ]
bob wallet credit-limit [--agent-id ]
bob wallet addresses
bob wallet register --rail --address <地址> [--agent-id ]
bob wallet onchain-balances从BOB API读取最近的链上余额快照。这是从CLI检查当前注册钱包余额的最佳方式,因为服务器会在后台保持这些快照的热状态。
资金库(2-of-2 Safe)
对任何启用支出功能的代理使用资金库命令。一旦配置了Base Safe资金库账户和有效策略,资金库就是默认的受控支出路径。
如果代理在初始化时使用了支出托管层级,Safe会在bob init期间自动部署。对于没有资金库的初始化代理,请手动部署:
bash
bob treasury deploy-safe [--agent-id ]
这会在Base链上部署一个2-of-2 Gnosis Safe(代理为所有者#1,BOB为所有者#2),并根据代理的托管层级创建默认策略。
bash
bob treasury status [--agent-id ]
bob treasury requests [--agent-id ] [--limit 30] [--offset 0]
bob treasury prepare --account-id <资金库账户ID> --to <0x-接收方> --amount [--agent-id ]
bob treasury sign --safe-tx-hash <0x-Safe哈希> [--agent-id ]
bob treasury submit --reservation-id <预留ID> --to <0x-接收方> --amount --signature <0x-签名> [--request-json {intent:vendor_payment}] [--agent-id ]
bob treasury transfer --account-id <资金库账户ID> --to <0x-接收方> --amount [--request-json {intent:vendor_payment}] [--agent-id ]
推荐流程: