Skip to content

CLI JSON API ​

Use --json when integrating Respire with scripts, agents or applications. Parse the JSON envelope rather than matching human-readable messages.

json
{
  "command": "recall",
  "status": "ok",
  "summary": {},
  "items": [],
  "actions": [],
  "errors": [],
  "details": null,
  "related": []
}
FieldPurpose
commandExecuted command
statusok, warn, fail, skip or pending
summaryCounts, identifiers and command-level outcome
itemsCompact result rows
actionsFollow-up actions
errorsReported failures
detailsCommand-specific permitted data
relatedBounded recall associations: ID, title, source ID and relation; empty for other commands
Exit codeMeaning
0Completed, including an ordinary empty result
2Warning or pending decision
1Argument, session, storage, transport or execution failure

Read the result envelope for nonzero exits too: a pending candidate decision differs from a failed write. Keep standard error separate from standard output.

For direct HTTP access to the running service, see Runtime RPC. RPC wraps this command envelope in an outer response with its own request ID, version and outcome.

Result shapes ​

Command familyTypical data
status, doctor, auditSummary and diagnostic rows
recallIdentifiers, titles and final result scores; permitted record details
list, show, chain, treeRecord or relationship data
remember, attachAction and identifier; no secret payload
sync, sync-*Counts, conflicts and retained versions
config, agent-configNonsecret configuration
import, export, backupPaths and counts

The canonical machine contracts live in the repository's contracts/ directory. See contracts for ownership and compatibility rules.

Recall retains its primary hit order and scores in details. Its separate related array contains title-only associations; summary.related counts them. Recall detail rows indicate a live replacement with superseded_by. Clients should accept a missing related field from older runtimes as an empty array. See memory associations for write and upgrade rules.

Data boundaries ​

flowchart LR
  Caller["Caller"] --> Envelope["Stable JSON envelope"]
  Envelope --> Public["Permitted records and final outcomes"]
  Core["Core"] --> Public
  Sensitive["Account keys and local feature artifacts"] -.-> Hidden["Excluded from ordinary output"]

Ordinary output excludes ciphertext, nonces, wrapped keys, authentication tokens and local feature artifacts. Commands explicitly designed to reveal or export secrets require their own options; handle their output as sensitive data.

The SDK's internal business requests are separate from this CLI API. Applications should consume command results rather than construct internal vectors or ranking requests.