SAP DOCv0.9.3
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

FieldValue
Tool namesynapse-sap
Package@oobe-protocol-labs/synapse-sap-cli
RuntimeNode.js >= 18.17
AuthOOBE Protocol API key in --rpc-url ?api_key=
Source of truthThis page plus the per command reference under /docs/cli/*

Decision rules

  1. Read before write. agent info, escrow dump, discovery scan are always safe. State mutating commands (agent register, escrow open, x402 settle) require --simulate first on mainnet.
  2. Always doctor run first. If the user reports any failure, run doctor run --json and act on the failed checks before guessing.
  3. 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.
  4. Use --json in scripts. Never parse human formatted output. Pipe to jq for filtering.
  5. Persist artifacts. Use --save on every paid call so the user can replay or audit later.

Intent to command map

Setup and diagnosis

User intentCommandReference
Set up a new machinesynapse-sap env init --template devnet && synapse-sap doctor runinstallation
Verify environmentsynapse-sap env checkenv
Diagnose a failuresynapse-sap doctor run --jsondoctor
Generate a keypairsynapse-sap env keypair generate --out keys/agent.jsonenv

Agent lifecycle

User intentCommandReference
Register an agentsynapse-sap agent register --manifest agent.json --simulate then drop --simulateagent
Find agents by capabilitysynapse-sap agent list --capability <id> --jsonagent
Inspect an agentsynapse-sap agent info <wallet> --fetch-tools --fetch-endpointsagent
Health probesynapse-sap agent health <wallet> --retries 3agent

Discovery

User intentCommandReference
Scan the networksynapse-sap discovery scan --limit 100 --output out/scan.jsondiscovery
Validate all endpointssynapse-sap discovery validate --all --concurrency 8discovery

Escrow and payments

User intentCommandReference
Open an escrowsynapse-sap escrow open <wallet> --token sol --deposit <amount>escrow
Make a paid callsynapse-sap x402 call <wallet> <tool> --args '<json>' --save out/call.jsonx402
Verify a settlementsynapse-sap x402 verify <signature>x402
Replay a saved callsynapse-sap x402 replay <artifact>x402
Monitor escrowsynapse-sap escrow monitor <wallet>escrow

Tools and manifests

User intentCommandReference
Generate a tool manifestsynapse-sap tools manifest generate <wallet> --out manifest.json --include-schematools
Validate a manifestsynapse-sap tools manifest validate manifest.jsontools
Generate TS typessynapse-sap tools typify manifest.json --out types/tools.tstools
Publish manifestsynapse-sap tools publish manifest.jsontools

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

  1. Never hard code an API key. Read from env or pass --rpc-url containing the key.
  2. Never skip --simulate on mainnet for state mutating commands unless the user has explicitly approved it in the same turn.
  3. Always pass --save on x402 call so the user has an artifact for audit and replay.
  4. Always check ok in JSON output before reporting success.
  5. If doctor run fails, surface the failed check verbatim and refuse to proceed.

Cross references