Commands¶
The slash-command catalog that powers the composer's / menu. A native client fetches this to populate command autocomplete. Verified against api/routes.py, api/commands.py.
GET /api/commands¶
Response
{
"commands": [
{
"name": "reasoning",
"description": "…",
"category": "…",
"aliases": ["…"],
"args_hint": "<level>",
"subcommands": ["…"],
"cli_only": false,
"gateway_only": false
}
]
}
Built from the agent's command registry. Gateway-only and never-expose commands are filtered out; plugin-provided slash-commands are appended with category "Plugin". If the agent CLI package is unavailable, commands is an empty list.
Fields a client uses:
name— the command (render as/name).aliases— alternate triggers to match in autocomplete.args_hint— placeholder text for the argument (e.g.<level>).subcommands— nested options to offer after the command.description/category— for the menu label and grouping.
Related command endpoints¶
For a client that executes commands rather than just listing them:
GET /api/commands/bundles→{ "bundles": [ … ] }— grouped command bundles.POST /api/commands/bundles/resolve—{ "command" }→ the resolved command.POST /api/commands/exec—{ "command" }→{ "output" }. Runs the command server-side (agent command, then plugin command).400/404/500on failure.
Most clients only need GET /api/commands — many slash commands (model, reasoning, personality, compress, …) have dedicated typed endpoints elsewhere in this reference that are cleaner to call directly than via exec.