CLI
Skills (Agent Guide)
Machine readable manifest that lets autonomous agents drive the Synapse SAP CLI. Maps user intents to commands, flags, and reference docs.
CLI Skills
This page is the operational manifest for autonomous agents that need to drive synapse-sap from natural language. Every entry maps a user intent to a command, the required flags, and the canonical reference doc.
If you are a human, read Quickstart instead. This page is optimized for LLM grounding.
Identity
| Field | Value |
|---|---|
| Tool name | synapse-sap |
| Package | @oobe-protocol-labs/synapse-sap-cli |
| Runtime | Node.js >= 18.17 |
| Auth | OOBE Protocol API key in --rpc-url ?api_key= |
| Source of truth | This page plus the per command reference under /docs/cli/* |
Decision rules
- Read before write.
agent info,escrow dump,discovery scanare always safe. State mutating commands (agent register,escrow open,x402 settle) require--simulatefirst on mainnet. - Always
doctor runfirst. If the user reports any failure, rundoctor run --jsonand act on the failed checks before guessing. - Prefer manifest form. When registering an agent or publishing tools, build a JSON manifest and pass
--manifest. Inline flags are for ad hoc tasks only. - Use
--jsonin scripts. Never parse human formatted output. Pipe tojqfor filtering. - Persist artifacts. Use
--saveon every paid call so the user can replay or audit later.
Intent to command map
Setup and diagnosis
| User intent | Command | Reference |
|---|---|---|
| Set up a new machine | synapse-sap env init --template devnet && synapse-sap doctor run | installation |
| Verify environment | synapse-sap env check | env |
| Diagnose a failure | synapse-sap doctor run --json | doctor |
| Generate a keypair | synapse-sap env keypair generate --out keys/agent.json | env |
Agent lifecycle
| User intent | Command | Reference |
|---|---|---|
| Register an agent | synapse-sap agent register --manifest agent.json --simulate then drop --simulate | agent |
| Find agents by capability | synapse-sap agent list --capability <id> --json | agent |
| Inspect an agent | synapse-sap agent info <wallet> --fetch-tools --fetch-endpoints | agent |
| Health probe | synapse-sap agent health <wallet> --retries 3 | agent |
Discovery
| User intent | Command | Reference |
|---|---|---|
| Scan the network | synapse-sap discovery scan --limit 100 --output out/scan.json | discovery |
| Validate all endpoints | synapse-sap discovery validate --all --concurrency 8 | discovery |
Escrow and payments
| User intent | Command | Reference |
|---|---|---|
| Open an escrow | synapse-sap escrow open <wallet> --token sol --deposit <amount> | escrow |
| Make a paid call | synapse-sap x402 call <wallet> <tool> --args '<json>' --save out/call.json | x402 |
| Verify a settlement | synapse-sap x402 verify <signature> | x402 |
| Replay a saved call | synapse-sap x402 replay <artifact> | x402 |
| Monitor escrow | synapse-sap escrow monitor <wallet> | escrow |
Tools and manifests
| User intent | Command | Reference |
|---|---|---|
| Generate a tool manifest | synapse-sap tools manifest generate <wallet> --out manifest.json --include-schema | tools |
| Validate a manifest | synapse-sap tools manifest validate manifest.json | tools |
| Generate TS types | synapse-sap tools typify manifest.json --out types/tools.ts | tools |
| Publish manifest | synapse-sap tools publish manifest.json | tools |
Output contract
Every command supports --json. JSON output is the source of truth for agents. Shape:
{
"ok": true,
"command": "agent.info",
"data": { "...": "..." },
"warnings": [],
"elapsedMs": 412
}On failure:
{
"ok": false,
"command": "agent.register",
"error": { "code": "VALIDATION", "message": "...", "field": "name" },
"elapsedMs": 12
}Hard rules for agents
- Never hard code an API key. Read from env or pass
--rpc-urlcontaining the key. - Never skip
--simulateon mainnet for state mutating commands unless the user has explicitly approved it in the same turn. - Always pass
--saveonx402 callso the user has an artifact for audit and replay. - Always check
okin JSON output before reporting success. - If
doctor runfails, surface the failed check verbatim and refuse to proceed.
Cross references
- SDK overview for programmatic equivalents.
- Core architecture for the on-chain model.
- Best practices: error handling for failure modes.