Skip to content

Slash Commands and Prompt Library

This guide describes the built-in slash commands, the LibreChat prompt library integration, and the FastMCP prompt templates.

Command Architecture

Built-In Slash Commands

When communicating with any tmux:* model in LibreChat, messages starting with a forward slash (/) trigger built-in daemon commands. The bridge intercepts these commands locally and executes them immediately without consuming language model tokens.

Process Control and Approvals

CommandAliasesFunctionSent Keystroke
/approve/y, /yesConfirm interactive prompt or diffy followed by Enter
/reject/n, /noDecline interactive prompt or diffn followed by Enter
/cancel/c, /sigintSend interrupt signalCtrl+C (C-c)
/enter/returnSend Enter keystrokeEnter
/esc/escapeExit mode or cancel dialogEscape
/eofSend End-of-File signalCtrl+D (C-d)

Terminal Inspection Commands

CommandExampleFunction
/tail [n]/tail 30Display the latest n lines from the current session pane
/peek <session> [n]/peek remote 20Inspect terminal output from another session without switching models
/status/statusShow daemon health, active session counts, and poll intervals

Session Management Commands

CommandExampleFunctionDefault Execution
/new [name] [dir] [preset|cmd]/new dev /containersCreate a detached tmux sessionStarts an interactive shell if no command is specified
/new <name> [dir] agy/new run1 /containers agyStart a session with AntigravityRuns agy --dangerously-skip-permissions
/new <name> [dir] opencode/new run2 /containers opencodeStart a session with OpenCodeRuns opencode --dangerously-skip-permissions
/agy [name] [dir] [args]/agy work /containersLaunch an Antigravity agentRuns agy --dangerously-skip-permissions [args]
/opencode [name] [dir] [args]/opencode dev /containersLaunch an OpenCode agentRuns opencode --dangerously-skip-permissions [args]
/kill <name>/kill agent-runTerminate the specified tmux sessionTerminate target session
/list/listShow active sessions, window counts, and attach statusReturn markdown table
/up/upSend Up arrow key and EnterRe-run last shell command
/down/downSend Down arrow keyNavigate command history
/keys <combo> [session]/keys C-z infraSend arbitrary key sequenceSend raw tmux keys
/clear/clearClear terminal scrollback bufferExecute clear command
/help/helpShow command reference tableReturn reference text

LibreChat Prompt Library Integration

LibreChat includes a Prompt Library feature accessible from the chat interface. You can seed the LibreChat database to enable autocomplete suggestions when typing / in the message input field.

Seed Database Prompts

Execute the database seeding script from the repository root:

bash
# Insert the 15 interactive command templates into MongoDB
python3 scripts/seed_librechat_prompts.py

# Remove previously seeded commands
python3 scripts/seed_librechat_prompts.py --clean

The script configures three database collections:

  • promptgroups: Defines command names and descriptions.
  • prompts: Specifies command templates and variable placeholders (for example, /peek 25).
  • aclentries: Sets access control permissions for all authorized users.

FastMCP Prompts for Autonomous Supervision

When using an external reasoning model in LibreChat, you can activate predefined MCP prompts to supervise background CLI agents:

MCP PromptPurposeArguments
tmux_launch_agentLaunch an agent process (agy or opencode) with bypass permissionsagent_type, session_name, start_dir, task_goal
tmux_supervise_agentMonitor an agent session, detect confirmation prompts, and summarize progresssession_name, task_goal
tmux_quick_approveInspect pending confirmation in a target session and send approvalsession_name
tmux_status_summaryQuery all active tmux sessions and generate a status reportNone

Released under the MIT License.