/. The agent parses the message, maps arguments to the handler’s parameters, runs the runnable immediately, and skips the LLM call for that turn.
This is useful for deterministic shortcuts in chat UIs, Slack bots, or internal tools where you already know which action to run.
Basic usage
Setcommand on any Tool, Agent, or Workflow in the agent’s tools list:
/greet and registering command="greet" work. Unknown commands fall through to the LLM as a normal message.
Argument parsing
Arguments after the command name are split withshlex (shell-style quoting) and mapped positionally to the handler’s parameters in signature order:
- Extra arguments are ignored
- Missing required arguments surface as normal validation errors on the tool
- Only messages with a single text block starting with
/are treated as commands
Agents and workflows as commands
Any runnable intools can expose a command — including nested agents and workflows:
Behavior
When to use commands
- Chat shortcuts —
/help,/status,/resetthat should always hit the same handler - Power users — skip LLM routing for actions they already know by name
- Nested specialists —
/search,/billingto invoke sub-agents without the parent model choosing tools