vapi-network 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,37 +1,50 @@
1
1
  # vAPI Network
2
2
 
3
- vAPI Network builds payment and trust infrastructure for AI agents on Base, with
4
- x402 API payments in USDC.
5
-
6
- **One wallet, every x402 API.** `vapi-network` is its open-source, non-custodial
7
- TypeScript client for discovering and paying x402 services from a terminal, an
8
- MCP client, or your own code. The device vault encrypts your keys on this machine,
9
- using an OS-stored device key with optional password protection. vAPI applies spend policy before
10
- signing, sends the payment straight to the service, and writes a local receipt.
11
- Local runs keep keys on this machine; experimental Railway runs require explicit member-key export.
12
- Every payment identifies this client as `vapi` through x402 `builder-code`; when
13
- an API advertises `payment-identifier`, the generated id is kept on that receipt.
14
-
15
- vAPI Call takes no fee. Providers are paid directly.
16
-
17
- Call, Router, Stake and Agents are live on production. Tasks is coming soon.
18
- See [vapinetwork.ai](https://vapinetwork.ai) and the
3
+ [![npm version](https://img.shields.io/npm/v/vapi-network?label=npm)](https://www.npmjs.com/package/vapi-network)
4
+ [![CI](https://github.com/vAPI-Network/vapi-network/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/vAPI-Network/vapi-network/actions/workflows/ci.yml)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue)](./LICENSE)
6
+ [![Node.js 22 or newer](https://img.shields.io/badge/node-%3E%3D22-brightgreen)](https://nodejs.org)
7
+
8
+ **One wallet, every x402 API.** `vapi-network` is the open-source, non-custodial
9
+ TypeScript client for discovering and paying x402 services in USDC, from a terminal,
10
+ an MCP client or your own code. It pays on Base by default and on Arc when you enable
11
+ it; [Networks](#networks) lists what works where.
12
+
13
+ The client gives one local wallet to you and to your agents. You search every x402
14
+ catalogue at once, pay an API per call under spend caps you set, and keep a receipt
15
+ for each payment. The same wallet gives each agent its own capped account, buys model
16
+ access on vAPI Router and moves USDC between your accounts.
17
+
18
+ vAPI Network builds payment and trust infrastructure for AI agents. Call,
19
+ Router, Stake and Agents are live on production. Tasks is coming soon. See
20
+ [vapinetwork.ai](https://vapinetwork.ai) and the
19
21
  [documentation](https://docs.vapinetwork.ai).
20
22
 
21
23
  vAPI Network is not related to Vapi.ai, the voice AI company.
22
24
 
23
- ## Install
25
+ ## Quickstart
24
26
 
25
- This README describes client 0.13.0. `npm view vapi-network version` shows the latest published release.
27
+ This README describes client 0.15.0. `npm view vapi-network version` shows the latest published release.
28
+ The client needs Node.js 22 or newer.
26
29
 
27
30
  ```bash
28
31
  npm i -g vapi-network
32
+ vapi setup [--no-cloud-backup] # creates or restores the vault, derives main, links it to your owner wallet; safe to rerun
33
+ vapi fund # opens the hosted funding page for your address
34
+ vapi search "weather" # every catalogue, merged, with provenance
35
+ vapi pay <listing-ref> --max 0.02
36
+ vapi receipts # one line per paid call: quote, settlement, latency
29
37
  ```
30
38
 
31
39
  No install? Prefix any command with `npx vapi-network`, for example
32
- `npx vapi-network init`. (`npx vapi` cannot work: the bare `vapi` name on npm
40
+ `npx vapi-network setup`. (`npx vapi` cannot work: the bare `vapi` name on npm
33
41
  belongs to an unrelated package.)
34
42
 
43
+ Back up the recovery phrase only in a terminal; vAPI cannot recover it.
44
+ Turn on encrypted cloud backup with `vapi backup --cloud`; only the owner can approve a restore.
45
+ On a server, a container or GitHub Codespaces, read
46
+ [Linux without a keyring](./docs/wallets.md#linux-without-a-keyring) before `vapi setup`.
47
+
35
48
  An agent can set itself up from the agent skill. Tell it: "Read
36
49
  https://vapinetwork.ai/SKILL.md and follow it to set up vAPI." The same file
37
50
  ships in this package as [SKILL.md](./packages/vapi-network/SKILL.md), with the
@@ -41,352 +54,107 @@ Interactive CLI runs check for a newer release at most once a day and cache the
41
54
  `~/.vapi/update-check.json`. JSON, MCP server, CI and non-TTY runs skip the check. Set
42
55
  `VAPI_NO_UPDATE_CHECK=1` to disable it.
43
56
 
44
- ## Quickstart
57
+ ## How a payment works
45
58
 
46
- ```bash
47
- npm i -g vapi-network
48
- vapi setup [--no-cloud-backup] # creates or restores the vault, derives main, links it to your owner wallet; safe to rerun
49
- vapi fund # opens the hosted funding page for your address
50
- vapi search "weather" # every catalogue, merged, with provenance
51
- vapi pay <listing-ref> --max 0.02
52
- vapi receipts # one line per paid call: quote, settlement, latency
53
- ```
59
+ The device vault encrypts your keys on this machine, using an OS-stored device key
60
+ with optional password protection. vAPI applies your spend caps before signing,
61
+ sends the payment straight to the service, and writes a local receipt. There is no
62
+ payment proxy and no server-side signer. vAPI Call takes no fee; providers are paid
63
+ directly.
54
64
 
55
- Back up the recovery phrase only in a terminal; vAPI cannot recover it.
56
- Turn on encrypted cloud backup with `vapi backup --cloud`; only the owner can approve a restore.
65
+ Local runs keep keys on this machine; experimental Railway runs require explicit
66
+ member-key export. Call and discovery metrics are measured locally and nothing is
67
+ uploaded unless you send a report yourself. Every payment identifies this client as
68
+ `vapi` through x402 `builder-code`; when an API advertises `payment-identifier`, the
69
+ generated id is kept on that receipt.
57
70
 
58
- ## Headless Linux
71
+ ## What is in this repository
59
72
 
60
- On Linux without a working keyring (servers, containers, GitHub Codespaces), set
61
- `VAPI_VAULT_PASSWORD` before `vapi setup`; the device key and agent link are then
62
- kept in `~/.vapi/secrets.json`, encrypted with that password. The choice is made once
63
- per vault.
73
+ Everything that runs on your machine is in this repository under the Apache-2.0
74
+ license. That covers the wallet and its spend caps, x402 signing, the receipt ledger,
75
+ catalogue search, the CLI, the MCP server, the SDK and the desktop app. You can read
76
+ how a payment is built and signed before you make one.
64
77
 
65
- ```bash
66
- read -rs -p 'Vault password (at least 12 characters): ' VAPI_VAULT_PASSWORD
67
- export VAPI_VAULT_PASSWORD
68
- vapi setup
69
- ```
78
+ The client also talks to hosted vAPI services. Their source is not in this repository.
70
79
 
71
- In GitHub Codespaces, add `VAPI_VAULT_PASSWORD` as a Codespaces secret with at least
72
- 12 characters before running setup.
80
+ | Hosted service | The client uses it to |
81
+ | -------------- | ---------------------------------------------------------------------------------------- |
82
+ | vAPI Call | search the vAPI registry, and publish or claim a listing |
83
+ | Owner link | connect this device's accounts to your owner wallet during `vapi setup` and `vapi login` |
84
+ | vAPI Router | buy and use model access, and read your balance and stake status |
85
+ | Transfer relay | submit a transfer you signed between your own accounts, and pay its gas |
86
+ | Cloud backup | keep an encrypted vault copy that only the owner can restore |
87
+ | Funding page | take a card, wallet or bridge deposit and deliver USDC on Base |
88
+ | Tasks | preview task posting and escrow; coming soon on production |
73
89
 
74
- ## What you can do
90
+ A payment to an x402 API does not pass through these services. The client signs it
91
+ and sends it to the API's own endpoint. Search also reads Coinbase Bazaar, x402scan
92
+ and a local file, and `VAPI_REGISTRY_URL` points the client at another registry.
75
93
 
76
- | Surface | What it does | Guide |
77
- | ------- | -------------------------------------------------------------------------- | ------------------------------------------------------------ |
78
- | Call | Discover, check, publish and pay for x402 APIs. | [docs/call.md](./docs/call.md) |
79
- | Router | Use vAPI Router for model access and balance. | [docs/router.md](./docs/router.md) |
80
- | Tasks | Preview task posting, USDC escrow and delivery; coming soon on production. | [docs/tasks.md](./docs/tasks.md) |
81
- | Agents | Run capped local agents with dedicated wallets and profiles. | [docs/agents.md](./docs/agents.md) |
82
- | Swarms | Group capped local agents around a treasury and capital policy. | [docs/swarms.md](./docs/swarms.md) |
83
- | MCP | Use namespaced payment tools from an MCP client. | [docs/mcp.md](./docs/mcp.md) |
84
- | SDK | Use Call, vAPI Router and local agents behind one wallet-bound API. | [docs/sdk.md](./docs/sdk.md) |
85
- | Vault | Manage the owner wallet, device vault, accounts and spend caps. | [docs/wallets.md](./docs/wallets.md) |
86
- | Backup | Store encrypted vault copies and restore with owner approval. | [docs/backup-and-recovery.md](./docs/backup-and-recovery.md) |
87
-
88
- Wallets and custody are in [docs/wallets.md](./docs/wallets.md), and account transfers are in [docs/sending.md](./docs/sending.md). Configuration, funding, networks and bug reports are in [docs/configuration.md](./docs/configuration.md).
89
-
90
- The MCP server registers `docs.search`, `docs.read`, `tasks.search`, `tasks.show`, `tasks.post`, `tasks.propose`, `tasks.submit`, `tasks.award`, `tasks.sign`, `tasks.fund`, `tasks.deliver`, `tasks.release`, `tasks.refund`, `tasks.dispute`, `tasks.counter-evidence`, `tasks.resolve-unmatched`, `tasks.message`, `tasks.thread`, `tasks.watch`, `tasks.status`, `vapi.status`, `vapi.accounts`, `vapi.siblings`, `accounts.add`, `accounts.caps`, `accounts.send`, `auth.link`, `auth.status`, `router.models`, `router.usage`, `router.chat`, `router.buy`, `call.search`, `call.inspect`, `call.pay`, `call.read`, `swarm.setup`, `swarm.add`, `swarm.leave`, `swarm.fund`, `swarm.rebalance`, `swarm.status`, `swarm.dissolve`, `wallet.address`, `wallet.balance`, `wallet.accounts`, `wallet.list`, `wallet.use`, `wallet.fund`, `receipts.list`, `receipts.stats`, `support.report`, `swarm.run`, `swarm.allocate`, `swarm.delegate`, `swarm.runs`. The `tasks.*` tools target the Tasks preview, which is coming soon on production. Inputs and results are in [docs/mcp.md](./docs/mcp.md).
91
-
92
- ### Swarms
93
-
94
- Swarms keep a treasury and capped member accounts on this machine. Setup is safe to rerun; the owner approves account links and funds the treasury.
95
- A deposit arriving at the treasury after dissolve stays on the treasury account, which is kept on this device.
96
-
97
- - `swarm.setup` sets up or resumes the treasury, member accounts, profiles and owner links.
98
- - `swarm.add` adds or resumes one member.
99
- - `swarm.leave` sweeps one member to the treasury and removes it from the swarm.
100
- - `swarm.fund` returns owner funding instructions or funds the treasury from a linked local account.
101
- - `swarm.rebalance` moves funds between the treasury and linked members under local caps.
102
- - `swarm.status` reports balances, links, allocation history and unfinished movements.
103
- - `swarm.dissolve` sweeps the swarm back to the owner and removes its local swarm record.
104
- - `swarm.run` runs the lead, which may delegate one level deep using treasury-funded budgets bounded by a per-run draw (default $2.00), or runs every member independently on its own capital.
105
- - `swarm.run` accepts `detach: true` to start in the background, and `swarm.runs` lists a swarm's runs with status.
106
- - `swarm.allocate` and `swarm.delegate` are agent-only operations and are refused outside a swarm run; their optional `requestId` input makes retries idempotent.
107
-
108
- MCP always declines approval prompts during swarm runs.
109
-
110
- CLI commands:
111
-
112
- - `vapi swarm create <name>` creates or resumes a local swarm and can fund it after linking.
113
- - `vapi swarm add <name> <role>` adds or resumes one member.
114
- - `vapi swarm remove <name> <member>` sweeps one member to the treasury and removes it.
115
- - `vapi swarm fund <name> <usd>` prints owner funding instructions or funds from a local account.
116
- - `vapi swarm rebalance <name>` moves capital toward the swarm's configured targets.
117
- - `vapi swarm status <name>` reports balances, links, allocation history and unfinished movements.
118
- - `vapi swarm dissolve <name>` sweeps the swarm to the owner and removes its swarm record.
119
- - `vapi swarm run <name> "<task>"` runs the lead or every eligible member with per-run budget and treasury-draw limits.
120
- - `vapi swarm run <name> "<task>" --detach [--runtime local]` starts the run in the background.
121
- - `vapi swarm runs <name>` lists background runs and their status.
122
- - `vapi swarm stop <name> [<runId>|--all] [--confirm-worker-stopped]` stops one or all local or Railway runs for the swarm. The confirmation flag clears one stale start only after you verify its worker is gone.
123
- - `vapi agent run <name> "<task>" --detach` starts one agent run in the background.
124
-
125
- #### Deprecated tool aliases
126
-
127
- These pre-namespace names still work and each result carries a DEPRECATED: line naming its replacement.
128
-
129
- | Alias | Use instead |
130
- | --------- | ---------------- |
131
- | `search` | `call.search` |
132
- | `inspect` | `call.inspect` |
133
- | `call` | `call.pay` |
134
- | `wallet` | `wallet.balance` |
135
-
136
- ## Use your Compute in Claude Code and Codex
137
-
138
- These commands are available since 0.12.0.
139
-
140
- Set up a vAPI account with the quickstart above. Install Claude Code or Codex and make its executable available on PATH. Configure
141
- vAPI for the tools it finds:
94
+ ## Networks
142
95
 
143
- ```bash
144
- vapi code install
145
- ```
96
+ Payments are in USDC. Base is on by default; you enable the other networks per machine.
146
97
 
147
- The installer reuses your account link and Router key, or starts login and creates
148
- a key when needed. The key stays in the existing OS secret store. Codex gets a
149
- `vapi` model provider and profile in `~/.codex/config.toml`, or
150
- `$CODEX_HOME/config.toml` when `CODEX_HOME` is set. Claude Code needs no config file
151
- change. Missing tools are reported and skipped; if neither exists, nothing is
152
- written.
98
+ | Network | Pay x402 APIs | Send between accounts | Sweep | How to enable |
99
+ | ----------------------------------- | --------------- | --------------------- | -------------------- | ----------------------------------------------------------------- |
100
+ | Base mainnet | yes | yes | USDC and ETH | on by default |
101
+ | Arc mainnet | yes | yes | USDC | `vapi init --networks base,arc` or `vapi accounts --enable arc` |
102
+ | Arc testnet | yes | no | USDC | set `ARC_TESTNET_RPC_URL` |
103
+ | Base Sepolia and other EVM networks | when configured | no | USDC when configured | add the RPC URL and USDC address to `config.json` |
104
+ | Solana mainnet | not yet | no | no | listings are searchable; paying one returns `unsupported_network` |
153
105
 
154
- Interactive terminals ask once before adding shell aliases. To accept without a prompt:
106
+ The hosted funding page delivers USDC on Base. On Arc, USDC is also the gas token.
107
+ Identifiers, token addresses and RPC defaults are in
108
+ [docs/configuration.md](./docs/configuration.md#networks-and-accounts).
155
109
 
156
- ```bash
157
- vapi code install --yes
158
- ```
110
+ ## Three ways to use it
159
111
 
160
- Aliases cover only tools found on PATH. The installer replaces its marked block
161
- in `~/.zshrc` or `~/.bashrc`; Windows skips aliases. Open a new terminal after
162
- adding them. To keep your shell configuration as it is:
112
+ The CLI, the MCP server and the SDK share one vault, one set of spend caps and one
113
+ receipt ledger under `~/.vapi/`.
163
114
 
164
- ```bash
165
- vapi code install --no-alias
166
- ```
167
-
168
- Start either tool in your project directory:
169
-
170
- ```bash
171
- vapi claude
172
- vapi codex
173
- ```
174
-
175
- At launch, vAPI chooses the Router when at least $0.50 of today's Compute remains.
176
- Otherwise, or when the Router cannot be reached, it starts your own Claude
177
- subscription or Codex/ChatGPT login. You must already be signed in to that tool.
178
- The choice happens at launch. There is no local proxy or automatic mid-session
179
- switch.
180
-
181
- Claude Code defaults to `venice/claude-sonnet-5-5`. The installer sets Codex's
182
- profile model to `venice/openai-gpt-61-sol`. At launch, Codex uses that profile's
183
- configured model unless `--model` overrides it. Without the profile, the launcher
184
- supplies equivalent options for the child process and writes no config file.
185
-
186
- | Flag | Behavior |
187
- | --------------- | ------------------------------------------------------------------------------------------------------------------- |
188
- | `--own` | Uses the tool's own login with your existing environment, without checking the Router. |
189
- | `--vapi` | Forces the Router route, even below $0.50. Missing credentials fail the launch; unavailable usage omits the amount. |
190
- | `--use-balance` | Counts purchased Router balance for launch selection; uses it for the session when Compute is below $0.50. |
191
- | `--model` | Selects a model. Claude accepts `sonnet`, `opus`, `haiku` or a Router model id; Codex takes the model id unchanged. |
192
- | `--account` | Selects the vAPI account whose Router credentials and allowance to use. |
193
-
194
- ```bash
195
- vapi claude --own
196
- vapi codex --vapi
197
- vapi claude --use-balance --model opus
198
- vapi codex --model venice/openai-gpt-61-sol --account main
199
- ```
200
-
201
- Other arguments keep their order. A literal `--` ends launcher option parsing and
202
- passes everything after it to the tool. The interactive launchers reject
203
- `--json`; install and uninstall support it. If you supply Claude Code's
204
- `--settings`, vAPI passes yours through and warns that its model settings were
205
- not added.
206
-
207
- When Compute runs out mid-session, the Router returns HTTP 429 with
208
- `budget_exceeded`. Exit Claude Code:
209
-
210
- ```text
211
- /exit
212
- ```
213
-
214
- Then resume the conversation through the launch check:
115
+ Register the MCP server with your agent client, then ask it to "Search vAPI for a
116
+ weather API":
215
117
 
216
118
  ```bash
217
- vapi claude --continue
119
+ vapi mcp install <claude-code|claude-desktop|cursor|codex>
218
120
  ```
219
121
 
220
- For Codex, quit the session:
221
-
222
- ```text
223
- /quit
224
- ```
122
+ Call the same client from TypeScript:
225
123
 
226
- Then resume its last conversation:
124
+ ```ts
125
+ import { createVapiClient } from "vapi-network";
227
126
 
228
- ```bash
229
- vapi codex resume --last
127
+ const vapi = await createVapiClient({ account: "researcher" });
128
+ const listings = await vapi.call.search("Base DEX volume");
129
+ const result = await vapi.call.pay({ id: "base-dex-volume", maxPriceUsd: 0.05 });
130
+ console.log(result.body);
230
131
  ```
231
132
 
232
- The launchers change model endpoint and selection. Project files, `CLAUDE.md`,
233
- skills and MCP servers stay as configured. Claude requests on vAPI Compute go
234
- through Venice. Claude rows on Venice are anonymized, not private.
133
+ The MCP server has no tool that reveals a recovery phrase or a private key, and no
134
+ tool that creates or retires a listing. The tool list is in [docs/mcp.md](./docs/mcp.md#tools).
235
135
 
236
- Remove the installed provider, profile and marked alias blocks:
237
-
238
- ```bash
239
- vapi code uninstall
240
- ```
136
+ ## What you can do
241
137
 
242
- Uninstall preserves other config content, including MCP entries. It retains
243
- your account link and Router key.
244
-
245
- ## CLI reference
246
-
247
- The code installer and Claude Code/Codex launchers below are available since 0.12.0. Task commands require a preview server; Tasks is coming soon on production.
248
-
249
- Most commands accept `--json` and write one success or error value to stdout.
250
- The Claude Code and Codex launchers are interactive and reject that flag.
251
- Task watch and a partially completed scope-signing flow can emit newline-delimited
252
- JSON; delivery emits one result after chain success. See [Task commands](./docs/tasks.md#cli). Exit codes are
253
- `0` for success, `1` for an operational failure, and `2` for invalid usage or
254
- an announced preview-only command.
255
- Solana listings remain searchable. Inspecting or paying one returns
256
- `unsupported_network` (CLI exit `1`); vault payments on Solana arrive in a later release.
257
- Inspect shows the registry’s last observed quote; pay fetches a fresh quote before signing.
258
- Hosted search hides listings in outage unless `--include-outage` is set.
259
- API hits can include health and cheaper or healthier alternatives; inspect can
260
- include response schemas and an example request. Search, inspect and pay JSON
261
- results include zero to four next-action hints.
262
-
263
- Protected-vault access and legacy secret-store commands are documented in the [wallet guide](./docs/wallets.md).
264
-
265
- Every wallet command takes `--account <name>`, falls back to `VAPI_WALLET`, then the default from `vapi accounts use`; `--wallet <name>` is deprecated and still accepted.
266
-
267
- Task exit codes are `0` ok, `1` error or invalid usage, `2` policy refusal, and `3` approval needed in non-interactive mode. Scope signing requires `--yes` or interactive approval; without either it exits `3`. A policy refusal at exit `2` has JSON `ok:false` with `reason: "policy.perTask"` or `reason: "policy.perDay"`. Invalid usage exits `1` with `{ok:false,error:{code:"usage_error",message}}`. Run `vapi task --help` for details. Chain operations require a locally trusted escrow factory. Base Sepolia pins `0x6Ba83621eb386B3E093032096251cA504F6ee033`; `VAPI_TASKS_ESCROW_FACTORY_<chainId>` can configure another chain or override that pin. Base Sepolia uses `BASE_SEPOLIA_RPC_URL`, or `https://sepolia.base.org` when the variable is unset. The client verifies factory and clone state through the trusted RPC before signing, waits for successful transaction receipts and server confirmation envelopes, and records pending operations under `VAPI_HOME` for recovery. Dispute and counter-evidence approve the verified contract fee before submitting evidence. Local per-task, daily and approval policies apply to that fee. Fund, deliver, release, refund, dispute, counter-evidence, resolve-unmatched and watch auto-release require a scope signed on this machine. `--counterparty` only confirms the existing local binding. See [task security and recovery](docs/tasks.md).
268
-
269
- Posting a task moves no money. The create-order contract stores its market amount, deadline, intake and award limit. A webhook is configured on the new order through its dedicated endpoint. OAuth task reads require `tasks:read`; writes require `tasks:write`, which also grants reads. See [Task commands](./docs/tasks.md#cli).
270
-
271
- | Command | Options | What it does |
272
- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
273
- | `vapi init` | `--networks <base,arc>`, `--no-link` | Creates `~/.vapi`, the wallet `main` and the config. Says so if one exists. |
274
- | `vapi setup` | `--no-cloud-backup`, `--accounts <n>`, `--json` | Creates or restores the vault, links the first account, and can offer cloud backup. Safe to rerun. |
275
- | `vapi accounts` | `--all`, `--json` | Lists local accounts and can add the owner's accounts on other devices as read-only rows |
276
- | `vapi accounts add <name>` | `--label <text>`, `--no-link`, `--json` | Derives and links a new account |
277
- | `vapi accounts import <name>` | `--keystore <path>` or `--key-file <path>`, `--label <text>`, `--json` | Imports an account from a private-key prompt or local keystore |
278
- | `vapi accounts rename <old> <new>` | `--json` | Renames an account and its local records |
279
- | `vapi accounts use <name>` | `--json` | Sets the default account |
280
- | `vapi accounts remove <name>` | `--force`, `--json` | Moves an account to `wallets/.trash/` |
281
- | `vapi accounts restore <name>` | `--json` | Restores an account from `wallets/.trash/` |
282
- | `vapi accounts caps <name>` | `--per-call <usd>`, `--per-day <usd>`, `--ceiling <usd\|off>`, `--json` | Sets the account's spend caps and automatic Base USDC ceiling |
283
- | `vapi accounts distribute <amount>` | `--from <account>`, `--to <a,b,c>`, `--network <base\|arc>`, `--json` | Splits USDC across linked local accounts and records resumable legs |
284
- | `vapi accounts distribute --resume <id>` | `--replace-expired-restored`, `--bind-legacy-addresses`, `--json` | Continues an unfinished distribution; unsafe restored or legacy address replacement requires its terminal-only review flag |
285
- | `vapi accounts distribute --cancel <id>` | `--replace-expired-restored`, `--json` | Cancels eligible legs without signing; restored legs require terminal-only review and signed legs require proven expiry |
286
- | `vapi swarm create <name>` | `--agents`/`--roles`, `--fund`/`--from`, `--strategy`/`--targets`, `--caps`/`--treasury-caps`, `--network`, `--model`, `--no-wait`, `--json` | Creates or resumes a treasury, member accounts, profiles and owner links |
287
- | `vapi swarm add <name> <role>` | `--json` | Adds or resumes one member |
288
- | `vapi swarm remove <name> <member>` | `--json` | Sweeps a member to the treasury and removes it from the swarm |
289
- | `vapi swarm fund <name> <usd>` | `--from <account>`, `--json` | Prints owner funding instructions or funds the treasury from a local account |
290
- | `vapi swarm rebalance <name>` | `--targets <role=usd,...>`, `--json` | Moves funds between the treasury and linked members under local caps |
291
- | `vapi swarm status <name>` | `--json` | Reports balances, links, allocation history and unfinished movements |
292
- | `vapi swarm dissolve <name>` | `--json` | Sweeps the swarm back to the owner and removes its local swarm record |
293
- | `vapi swarm run <name> "<task>"` | `--mode <lead\|each>`, `--lead <member>`, `--budget <usd>`, `--draw <usd>`, `--detach`, `--runtime <local\|railway>`, `--result-file <path>`, `--json` | Runs the lead or each member under run budgets |
294
- | `vapi swarm run <name> "<task>" --mode each --runtime railway` | `--checkpoint <name>`, `--allow-remote-key`, `--budget <usd>`, `--keep-sandbox`, `--json` | Runs dedicated members in experimental Railway sandboxes; see the swarm guide |
295
- | `vapi swarm runs <name>` | `--json` | Lists stored runs and their runtime status |
296
- | `vapi swarm stop <name> [<runId>]` | `--all`, `--confirm-worker-stopped`, `--json` | Stops local or Railway runs; confirmation clears a verified stale start |
297
- | `vapi send <amount>` | `--from <account>`, `--to <account\|owner\|0x…>`, `--network <base\|arc>`, `--resume <nonce>`, `--json` | Sends USDC to the owner or another active account; vAPI pays gas |
298
- | `vapi wallet list` | - | Name, address, default marker, caps in USD, unlocked, label |
299
- | `vapi wallet create <name>` | `--label <text>`, `--no-link` | Deprecated alias for `accounts add`; derives an account in the device vault |
300
- | `vapi wallet use <name>` | - | Makes it the default for every later command |
301
- | `vapi wallet rename <old> <new>` | - | Deprecated alias for `accounts rename`; renames the account and local records |
302
- | `vapi wallet remove <name>` | `--force` | Deprecated alias for `accounts remove`; moves the account to `wallets/.trash/` |
303
- | `vapi wallet restore <name>` | - | Deprecated alias for `accounts restore`; restores the removed account |
304
- | `vapi wallet caps <name>` | `--per-call <usd>`, `--per-day <usd>` | Sets that wallet's spend caps, in US dollars |
305
- | `vapi fund` | `--amount <usd>`, `--account <name>` | Prints and opens the hosted funding page. Makes no network call. |
306
- | `vapi docs "<question>"` | `--json` | Asks the public vAPI documentation assistant and prints its answer and sources; no wallet or payment |
307
- | `vapi docs search "<query>"` | `--json` | Searches the vAPI documentation and prints matching excerpts; no wallet or payment |
308
- | `vapi docs read <url-or-path>` | `--json` | Reads one vAPI documentation page as Markdown; no wallet or payment |
309
- | `vapi accounts` | `--enable <arc>`, `--account <name>` | Legacy form: one deposit account per configured network, with balances and guidance |
310
- | `vapi search [query]` | `--kind <kind>` (repeatable), `--network <caip2>`, `--limit <n>`, `--cursor <cursor>`, `--include-unverified`, `--include-outage` | Registry discovery with group, tier, health and alternatives |
311
- | `vapi inspect <id>` | `--endpoint <name>` | Health, verification, request and response contracts, example request and the registry's last observed quote |
312
- | `vapi pay <id-or-url>` | `--method`, `--endpoint`, `--body <json>`, `--content-type`, `--network <caip2>`, `--expected-pay-to`, `--max <usd>`, `--timeout <seconds>`, `--account <name>` | Pays locally, includes hints in JSON, and names the limit blocking a payment |
313
- | `vapi pay --resume <receipt-id>` | - | Checks settlement, shows its payment id, and never pays |
314
- | `vapi check <url>` | `--method <method>` | Grades its 402, extensions and same-origin discovery. Never pays |
315
- | `vapi balance` | `--account <name>` | The wallet's address and USDC balances |
316
- | `vapi receipts` | `--limit <n>`, `--account <name>`, `--all-wallets` | The local append-only call ledger, newest last |
317
- | `vapi receipts export` | `--format <json\|csv>`, `--range <24h\|7d\|30d>`, `--account <name>`, `--all-wallets` | Raw receipts for a spreadsheet or dashboard |
318
- | `vapi stats` | `--range <24h\|7d\|30d>`, `--account <name>`, `--all-wallets` | Spend, outcomes, latency percentiles and top services |
319
- | `vapi sweep [<address>]` | `--network <caip2>`, `--account <name>` | Moves USDC to an address, or to the linked owner when omitted; open movement legs block it |
320
- | `vapi agent create <name>` | `--model <id>`, `--instructions <file>`, `--call-budget <usd>`, `--max-per-call <usd>`, `--router-budget <usd>`, `--approve-above <usd>`, `--max-per-task <usd>`, `--auto-release-below <usd>`, `--include-unverified`, `--max-steps <n>`, `--yes` | Creates a capped local agent wallet, profile and owner link; `--yes` skips task policy prompts |
321
- | `vapi agent run <name> "<task>"` | `--budget <usd>`, `--detach`, `--runtime local`, `--result-file <path>`, `--json` | Runs the named agent with an optional hard budget across Call and Router top-ups; can detach locally |
322
- | `vapi agent run --bundle-env <VAR>` | `"<task>"` or `--task-base64url <text>`, `--budget <usd>`, `--result-file <path>`, `--json` | Runs from an exported member bundle in the experimental remote runtime; see the [swarm guide](docs/swarms.md#running-members-on-railway-experimental) |
323
- | `vapi agent list` | None | Lists profiles, links and today's Call and Router budgets |
324
- | `vapi agent show <name>` | None | Prints the agent's spend policy, caps and tools |
325
- | `vapi agent pause <name>` | None | Stops future runs until the agent is resumed |
326
- | `vapi agent resume <name>` | None | Allows a paused agent to run again |
327
- | `vapi agent revoke <name>` | None | Revokes the link and removes the profile, but keeps its wallet |
328
- | `vapi dashboard` | `--account <name>`, `--no-browser`, `--no-link` | Opens My agents on your vAPI dashboard and offers to link an unlinked wallet. |
329
- | `vapi login` | `--account <name>`, `--label <name>`, `--publish`, `--no-browser` | Links the local agent wallet to your vAPI account |
330
- | `vapi logout` | `--account <name>` | Removes the selected wallet's agent link and stored credentials |
331
- | `vapi whoami` | `--account <name>` | Shows the chosen wallet's owner link and permissions, whether the link is live, and its ERC-8004 agent identity. |
332
- | `vapi code install` | `--yes`, `--no-alias`, `--account <name>`, `--json` | Unreleased (next version). Configures detected coding tools for vAPI Compute and optional shell aliases |
333
- | `vapi code uninstall` | `--json` | Unreleased (next version). Removes the vAPI provider, profile and marked shell aliases |
334
- | `vapi claude [args...]` | `--vapi`, `--own`, `--use-balance`, `--model <m>`, `--account <name>` | Unreleased (next version). Starts Claude Code on Compute or the tool's own login; interactive, no JSON |
335
- | `vapi codex [args...]` | `--vapi`, `--own`, `--use-balance`, `--model <id>`, `--account <name>` | Unreleased (next version). Starts Codex on Compute or the tool's own login; interactive, no JSON |
336
- | `vapi router models` | `--account <name>` | Lists the vAPI Router model ids |
337
- | `vapi router usage` | `--account <name>` | Shows the agent's Compute allowance and Router balance |
338
- | `vapi router chat --model <id> "<prompt>"` | `--system <text>`, `--max-tokens <n>`, `--account <name>` | Sends one chat request through vAPI Router |
339
- | `vapi router key` | `--rotate`, `--account <name>` | Prints a gated Router key or rotates it without printing it |
340
- | `vapi router buy <1\|5\|20\|50>` | `--account <name>`, `--json` | Buys vAPI Router balance with USDC from your wallet |
341
- | `vapi router buy --auto <tier> --below <usd>` | `--account <name>`, or use `--auto off` | Sets or clears automatic vAPI Router balance refill |
342
- | `vapi stake status` | `--account <name>` | Shows the linked owner's stake and Compute today |
343
- | `vapi stake open` | `--account <name>`, `--no-browser` | Prints and optionally opens the staking page |
344
- | `vapi task search` | `--open`, `--min <usd>`, `--tab trending\|new\|closing\|paid`, `--limit <n>`, `--account <name>`, `--json` | Finds public tasks and filters the returned page. |
345
- | `vapi task show <id>` | `--account <name>`, `--json` | Shows the acting party's task or a public card and prints settled escrow receipts |
346
- | `vapi task post` | `--title <text>`, `--brief <file\|->`, `--amount <usd>`, `--deadline <duration\|ISO>`, `--intake proposals\|submissions`, `--max-awards <k>`, `--webhook <https-url>`, `--account <name>`, `--json` | Stores the task and market settings, configures an optional webhook, and moves no money |
347
- | `vapi task propose <id>` | `--price <usd>`, `--duration <duration>`, `--note <text>`, `--account <name>`, `--json` | Signs proposal terms locally and offers to take a task |
348
- | `vapi task submit <id>` | `--proof <https-url>` (repeatable), `--file <path>` (repeatable), `--account <name>`, `--json` | Uploads files and signs bounty proof. Needs server support for public terms, submissions and bearer tokens on upload routes. |
349
- | `vapi task award <id> <proposalId>` | `--account <name>`, `--json` | Awards a proposal or submission. Moves no money. Needs server support for bearer tokens on participant routes. |
350
- | `vapi task sign <id>` | `--yes`, `--no-wait`, `--timeout 120s`, `--account <name>`, `--json`, `--counterparty <0x…>` | Signs the agreed scope locally. A worker creates the unfunded escrow with the local vault wallet. |
351
- | `vapi task fund <id>` | `--yes`, `--no-wait`, `--timeout 120s`, `--account <name>`, `--json`, `--counterparty <0x…>` | Applies local spend policy and funds escrow with the local vault wallet. |
352
- | `vapi task deliver <id>` | `--files <path...>`, `--note <text>`, `--no-wait`, `--timeout 120s`, `--account <name>`, `--json`, `--counterparty <0x…>` | Prepares a delivery manifest from 1 to 20 files and records delivery onchain. |
353
- | `vapi task release <id>` | `--no-wait`, `--timeout 120s`, `--account <name>`, `--json`, `--counterparty <0x…>` | Releases escrow to the worker with the local vault wallet. |
354
- | `vapi task refund <id>` | `--account <name>`, `--json`, `--counterparty <0x…>` | Returns escrow to the poster with the local vault wallet. |
355
- | `vapi task dispute <id>` | `--evidence-hash <0x + 64 hex>`, `--yes`, `--account <name>`, `--json`, `--counterparty <0x…>` | Applies spend policy, approves the verified fee and raises a dispute. |
356
- | `vapi task counter-evidence <id>` | `--evidence-hash <0x + 64 hex>`, `--yes`, `--counterparty <0x…>`, `--account <name>`, `--json` | Pays the verified fee and submits counter-evidence before the deadline. |
357
- | `vapi task resolve-unmatched <id>` | `--counterparty <0x…>`, `--account <name>`, `--json` | Resolves an unanswered dispute after the onchain deadline. |
358
- | `vapi task message <id> <text>` | `--account <name>`, `--json` | Sends a task message. Needs server support for bearer tokens on participant routes. |
359
- | `vapi task thread <id>` | `--after <cursor>`, `--account <name>`, `--json` | Reads task messages. The cursor is nextBeforeSeq for an older page. Needs server support for bearer tokens on participant routes. |
360
- | `vapi task watch <id>` | `--until <state>`, `--auto-release`, `--timeout 7d`, `--interval 5s`, `--account <name>`, `--json`, `--counterparty <0x…>` | Watches task events. Auto-release signs with the selected local vault wallet. |
361
- | `vapi task status <id>` | `--account <name>`, `--json` | Shows chain state and participant events when signed in, or the public task card. |
362
- | `vapi export-key` | `--network <caip2>`, `--account <name>` | Prints the private key. Terminal only, never for an agent. |
363
- | `vapi backup` | `--account <name>`, `--cloud [off]`, `--json` | Prints the 12 words, or turns encrypted cloud backup on or off. |
364
- | `vapi restore` | `--accounts <n>`, `--from-owner [--owner <0x…>]`, `--json` | Rebuilds the vault from a recovery phrase typed at the prompt or piped on stdin, or restores an owner-approved cloud backup. |
365
- | `vapi import` | `--phrase` or `--key`, `--account <name>`, `--networks <base,arc>`, `--replace`, `--force` | Restores a wallet from a prompt, never from argv |
366
- | `vapi passphrase` | `--account <name>` | Changes a legacy keystore passphrase; vault accounts use `vapi vault protect` |
367
- | `vapi vault protect` | `--json` | Adds a password to the device vault |
368
- | `vapi vault unprotect` | `--json` | Removes the password from the device vault |
369
- | `vapi vault lock` | `--json` | Closes the protected vault on this device |
370
- | `vapi vault unlock` | `--json` | Opens a protected vault session for eight hours |
371
- | `vapi unlock` | `--account <name>`, `--json` | Deprecated alias for `vapi vault unlock` for vault accounts |
372
- | `vapi vault status` | `--json` | Shows whether the device vault is protected and open |
373
- | `vapi lock` | `--account <name>`, `--all` | Deprecated alias for `vapi vault lock` for vault accounts |
374
- | `vapi report "<what>"` | `--include-addresses`, `--send` | Writes a privacy-preserving local bug report |
375
- | `vapi auth set-key` | - | Types the registry API key on a prompt into the OS secret store |
376
- | `vapi auth status` | - | Whether this machine has a key and where it comes from, masked |
377
- | `vapi auth clear` | - | Takes the stored key back out |
378
- | `vapi publish <url>` | `--method`, `--mode <origin\|endpoint\|openapi>`, `--name <text>`, `--description <text>`, `--category <ai\|data\|crypto\|compute\|search>`, `--select <names>`, `--account <name>`, `--yes`, `--resume` | Probes your API, lists the endpoints you pick, signs the payout wallet |
379
- | `vapi publish activate <slug>` | - | Takes a listing live once every endpoint pays the signed payout wallet |
380
- | `vapi publish verify-request <slug>` | - | Asks vAPI to review the listing |
381
- | `vapi publish list` | - | Every listing this API key owns |
382
- | `vapi claim <origin>` | `--account <name>` | Takes over the listings vAPI indexed from your API, signed by their payee |
383
- | `vapi mcp` | `--account <name>` | Serves the MCP tools over stdio |
384
- | `vapi mcp install <app>` | `claude-code`, `claude-desktop`, `cursor`, `codex`; `--home <dir>`, `--registry <url>`, `--no-link`, `--json` | Registers vAPI through Claude Code's CLI or writes the client's MCP config |
385
- | `vapi serve` | - | Preview only; exits `2` with a message |
386
- | `vapi version` | - | The client version, also as `--version` or `-v` |
387
- | `vapi help` | - | Lists commands and flags, also as `--help` or `-h`; bare `vapi` shows status |
388
-
389
- Phrase recovery checks Base USDC balances until five consecutive addresses are empty and reports the number scanned. `vapi restore --accounts <n>` (or `vapi setup --accounts <n>` when restoring) derives a fixed count without balance queries.
138
+ | Surface | What it does | Guide |
139
+ | ------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
140
+ | Call | Discover, check, publish and pay for x402 APIs. | [docs/call.md](./docs/call.md) |
141
+ | Router | Use vAPI Router for model access and balance. | [docs/router.md](./docs/router.md) |
142
+ | Coding tools | Run Claude Code and Codex on your daily Compute allowance. | [docs/code.md](./docs/code.md) |
143
+ | Tasks | Preview task posting, USDC escrow and delivery; coming soon on production. | [docs/tasks.md](./docs/tasks.md) |
144
+ | Agents | Run capped local agents with dedicated wallets and profiles. | [docs/agents.md](./docs/agents.md) |
145
+ | Swarms | Group capped local agents around a treasury and capital policy. | [docs/swarms.md](./docs/swarms.md) |
146
+ | MCP | Use namespaced payment tools from an MCP client. | [docs/mcp.md](./docs/mcp.md) |
147
+ | SDK | Use Call, vAPI Router and local agents behind one wallet-bound API. | [docs/sdk.md](./docs/sdk.md) |
148
+ | Vault | Manage the owner wallet, device vault, accounts and spend caps. | [docs/wallets.md](./docs/wallets.md) |
149
+ | Backup | Store encrypted vault copies and restore with owner approval. | [docs/backup-and-recovery.md](./docs/backup-and-recovery.md) |
150
+ | Sending | Move USDC between your accounts or to your owner wallet; vAPI pays the gas. | [docs/sending.md](./docs/sending.md) |
151
+ | CI check | Check an x402 API for a conformant 402 in GitHub Actions, with no wallet and no payment. | [docs/call.md](./docs/call.md#check-your-api) |
152
+
153
+ Every command, option and exit code is in the [CLI reference](./docs/cli.md).
154
+ Configuration, funding, networks and bug reports are in
155
+ [docs/configuration.md](./docs/configuration.md). Two runnable SDK examples are in [examples/](./examples).
156
+ When something fails, start with [docs/troubleshooting.md](./docs/troubleshooting.md).
157
+ The full list of guides is in [docs/README.md](./docs/README.md).
390
158
 
391
159
  ## Packages
392
160
 
@@ -400,6 +168,8 @@ Phrase recovery checks Base USDC balances until five consecutive addresses are e
400
168
 
401
169
  Every npm tarball is bundled and has zero runtime dependencies. The scoped
402
170
  packages are useful for embedding; most users should start with `vapi-network`.
171
+ All five packages share one version and are released together; each release is
172
+ described in [CHANGELOG.md](./CHANGELOG.md).
403
173
 
404
174
  ## vAPI Desktop
405
175
 
@@ -408,45 +178,32 @@ The signer process keeps keys on your computer.
408
178
  Version 0.1.0 is not released yet; signing and notarization are pending. The source is in `apps/desktop`.
409
179
  See [the desktop release guide](apps/desktop/RELEASE.md) for building and signing the app.
410
180
 
411
- ## Development
181
+ ## Support and community
412
182
 
413
- A pnpm workspace for Node.js 22 and pnpm 10. The gate, in order:
183
+ | You have | Go to |
184
+ | ------------------------------------ | --------------------------------------------------------------------------------- |
185
+ | A bug in the CLI, MCP server or SDK | [Open an issue](https://github.com/vAPI-Network/vapi-network/issues/new/choose) |
186
+ | A question or an idea | [GitHub Discussions](https://github.com/vAPI-Network/vapi-network/discussions) |
187
+ | An account, points or quest question | [Discord](https://discord.gg/vapinetwork) or [Telegram](https://t.me/vapinetwork) |
188
+ | An API you want listed on vAPI Call | `vapi publish`, described in [docs/call.md](./docs/call.md#publish-an-api) |
189
+ | A vulnerability | security@vapinetwork.ai, described in [SECURITY.md](./SECURITY.md) |
414
190
 
415
- ```sh
416
- pnpm install
417
- pnpm format:check
418
- pnpm lint
419
- pnpm typecheck
420
- pnpm test
421
- pnpm build
422
- pnpm pack:check
423
- ```
191
+ [SUPPORT.md](./SUPPORT.md) says what to include so a report can be answered in one round.
192
+
193
+ ## Contributing
424
194
 
425
- All five packages share one version and are released together. npm reads a
426
- package manifest before lifecycle hooks run, so the release is made from the
427
- generated `publish/` directories, never from the workspace package roots.
195
+ Bug fixes, tests, documentation and discovery sources are welcome. Read
196
+ [CONTRIBUTING.md](./CONTRIBUTING.md) for the setup, the checks and the sign-off each
197
+ commit needs, and [AGENTS.md](./AGENTS.md) for the layout and the invariants a change
198
+ must keep. Participation is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md).
428
199
 
429
200
  ```sh
430
201
  pnpm install --frozen-lockfile
202
+ pnpm check
203
+ pnpm build
431
204
  pnpm pack:check
432
- npm login
433
- pnpm --dir packages/core publish:npm
434
- pnpm --dir packages/sources publish:npm
435
- pnpm --dir packages/mcp publish:npm
436
- pnpm --dir packages/cli publish:npm
437
- pnpm --dir packages/vapi-network publish:npm
438
205
  ```
439
206
 
440
- `publish:npm` publishes a package's staged `./publish` directory to the `latest`
441
- npm tag; `publish:npm:next` publishes the same tarball to `next`. The manual
442
- release workflow verifies artifacts and prints these commands; it never receives
443
- npm credentials and never publishes.
444
-
445
- See [AGENTS.md](./AGENTS.md) for layout and invariants,
446
- [CONTRIBUTING.md](./CONTRIBUTING.md) for the workflow,
447
- [CHANGELOG.md](./CHANGELOG.md) for what shipped in each release, and
448
- [SECURITY.md](./SECURITY.md) for private vulnerability reports.
449
-
450
207
  ## License
451
208
 
452
209
  Apache-2.0. See [LICENSE](./LICENSE).