Commands
AI command execution and prompt gating
Overview
The Commands resource provides two capabilities:
- Execute — Run AI-powered commands with context (current screen, organization, locale, attachments).
- Gate Prompt — Evaluate a conversation to determine if it should be allowed or blocked.
All command methods are available on r.commands.
Methods
Execute a command
Send a natural language prompt to the AI with optional context about the current screen, organization, locale, and file attachments.
Input fields:
Attachment format:
Returns: SingleResponse<ExecutePromptResult>
Example with attachments
Example with context
Gate a prompt
The prompt gating endpoint evaluates a conversation to determine whether it should proceed. This is useful for implementing content moderation, access control, or guardrails for AI-powered features.
Input fields:
Message format:
Returns: SingleResponse<GatePromptResult>