Slash commands provide a quick way to execute predefined prompts through Ona Agent’s chat interface. Type / followed by a command name to access organization-wide custom prompts.

Slash commands in Ona Agent

How slash commands work

When you type / in the chat interface, Ona Agent displays available organization commands that you can execute. These commands are created and managed by administrators. The system automatically filters and displays relevant commands as you type, making it easy to find and execute the right command for your task.

Custom commands

Organization administrators can create custom slash commands that execute predefined prompts. These commands help standardize common development tasks and provide quick access to frequently used prompts.

Creating custom commands

  1. Navigate to Settings > Agents
  2. Click New Command
  3. Configure your command:
    • Name: The display name shown in your command list
    • Command: The slash trigger word (e.g., review-code)
    • Description: Brief explanation of what the command does
    • Prompt: The prompt that will be sent to the AI agent
  4. Click Create Command

Creating a custom command

Using slash commands

Basic usage

  1. Open the Ona Agent chat interface in your environment (or from the Ona home screen).
  2. Type / to see available commands
  3. Start typing to filter commands
  4. Select a command using:
    • Arrow keys and Enter to navigate and select
    • Mouse click to select directly
    • Enter to autocomplete

Command execution

When you execute a slash command:
  1. The command appears in the chat as you typed it (e.g., /review-code)
  2. The system resolves the command to its underlying prompt content
  3. The display shows your command, but the AI receives the full prompt text
  4. The AI processes the complete prompt and responds accordingly

Command execution

Adding context

You can add context after a slash command to provide additional information:
/review-code
Here's the function I'd like reviewed:

function calculateTotal(items) {
  return items.reduce((sum, item) => sum + item.price, 0);
}
Ona Agent will combine your custom prompt with the additional context you provide, giving you targeted assistance based on both the predefined prompt and your specific input.

Command management

Organization scope

  • All custom commands are scoped to your organization
  • Commands are visible to all organization members
  • Only administrators can create, edit, or delete commands

Permissions

  • Members: Can view and execute all organization commands
  • Administrators: Can create, edit, and delete commands in settings

Best practices

  • Use descriptive names: Make command purposes clear (e.g., /test-strategy vs /ts)
  • Provide good descriptions: Help team members understand when to use each command
  • Keep prompts focused: Each command should have a specific, well-defined purpose
  • Test thoroughly: Verify commands work as expected before sharing with the team

Troubleshooting

Command not found

If a slash command doesn’t appear in the suggestions:
  • Verify the command name is spelled correctly
  • Check that you have the necessary permissions
  • Ensure the command exists in your organization (administrators can verify in settings)

Command execution issues

If a command doesn’t execute properly:
  • Check that the prompt content is valid
  • Verify template variables are properly formatted
  • Ensure the command hasn’t been modified or deleted

Performance considerations

  • Commands are cached for better performance
  • Large organizations may experience slight delays in command loading
  • Use specific command names to reduce filtering time

Next steps

Need help with slash commands? Reach out to your account manager.