Skip to content
中文

For agents

An agent does not need pretty output. It needs parseable results, confirmations that cannot hang, and a next step it can find by itself when something fails. This page covers all three.

Output format

--format picks the shape of the output; --json is shorthand for --format json:

  • human: tables and colours for people, the default on an interactive terminal.
  • agent: compact text for agents, with the command to run next.
  • json: structured output whose fields match the operation’s response.

When the output is a pipe the default is not human: json without an agent environment detected, agent with one. In a script, pass --json explicitly.

终端窗口
praxis api model list --limit 3 --json

Never wait for input

Operations that change state (delete, overwrite) ask once by default. An agent does one of two things:

  • --yes: confirm this operation.
  • --no-input: never prompt; fail immediately with an error when a confirmation would be needed. Agent mode turns this on by default, so a command cannot hang.

For destructive operations, keep --no-input and let the agent decide to add --yes after reading a clear error.

Read the error

On failure (with --json) the CLI prints an error object whose three fields are enough for an agent to recover:

FieldContent
codeA stable code, such as a usage error, not signed in, or a rejected credential
messageOne sentence on what happened
hintThe command to run next or the parameter to fix; a generic hint when nothing specific applies

The same object carries env and command, and operation failures add status and request_id. An agent can branch on code and pass hint to the next step or the next person.

Install the CLI guide into a workspace

终端窗口
praxis skill --install .

Writes the CLI guide to praxis-cli/SKILL.md under the given directory, so an agent reading that workspace knows the commands and options. Without --install the guide goes to standard output, ready to paste into a prompt.

A complete call

终端窗口
praxis api sandbox list --json --no-input

The agent gets a JSON list and no prompt can block it; on failure it reads code and hint. To create or delete, add --yes for that call rather than dropping --no-input.

Next