> ## Documentation Index
> Fetch the complete documentation index at: https://docs.randomlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# The Basics

> A simple guide to working with Slate

Understanding how Slate works will help you use it more effectively.

To get the most out of Slate, you'll need to set up your environment and know how to prompt it well:

-> [Workspace Setup](/en/using-slate/workspace_setup)

-> [Prompting Guide](/en/using-slate/prompting_guide)

## Frequently Used Features

### Switching Sessions

Use `/sessions` to switch between existing sessions:

<Card title="Session Selection Process">
  1. Type `/sessions` and press **Enter**
  2. Use **↑/↓** arrows to navigate available sessions
</Card>

### Cancellation

<Card title="Esc">
  **Cancels** the current *agent* step, current input or closes dialogs.
</Card>

<Card title="Ctrl+C">
  **Hard interrupt** - Stops the cli.
</Card>

### Message Queue

When Slate is busy:

* Press **Enter** to perform the current **Enter mode** action.
* Press **Tab** to **queue** the current message so it runs after the current turn finishes.

Use `/enter-mode-next` to cycle what **Enter** does while Slate is working:

* **steer**: Enter redirects the current run immediately
* **queue**: Enter queues the message for later
* **interrupt**: Enter aborts the current run and sends your message next

You can also set the mode directly with `/steer`, `/queue`, or `/interrupt`.

**Tab** always queues the current message (regardless of the Enter mode) so it runs after the agent finishes.

**Steering** delivers your message while the agent is still working -- after the current response and any tool calls complete, your message is sent in before the agent continues. Use this to course-correct the agent mid-task.

**Queueing** waits until the agent finishes everything it is doing, then delivers your message as the start of a new run. Use this to stack up follow-up tasks while the agent works.

**Interrupt** aborts the current run entirely and sends your new message next, with any previously pending messages restored behind it.

<Card title="Follow-up messages">
  Queued messages and steering messages appear **above the input box** under separate `Steering` and `Queued` sections. Steering messages deliver while the agent is still running; queued messages drain automatically once the session goes idle.
</Card>

<CardGroup cols={2}>
  <Card title="⌥ + ↑  (Alt+Up)" icon="arrow-up">
    Pops the **latest queued message** back into the composer so you can edit it before it's sent.
  </Card>

  <Card title="Ctrl+X then Q" icon="pen-to-square">
    Opens all queued messages as `---`-separated markdown blocks in your external editor so you can review and reorder them. Use `/queue-edit` for the same behavior.
  </Card>

  <Card title="Esc on empty input" icon="circle-xmark">
    While the agent is busy, pressing **Esc** on an empty input **aborts the session** and restores all queued messages into the composer.
  </Card>
</CardGroup>

You can also pre-load a queue from the command line with `--queue` (`-q`), passing a markdown file whose messages are separated by a line containing `---`:

```bash theme={null}
slate --queue plan.md
```

<Info>
  The queue persists across navigation — queued messages are stored in draft state and won't be lost if you switch sessions and come back.
</Info>

### Multi-line Messages

Use **Ctrl+L** to focus the input box from elsewhere in the UI.

Use **Ctrl+Enter** or **Option/Alt+Enter** to insert newlines:

```text theme={null}
> Please help me with:
  1. Parsing this JSON file    [Ctrl+Enter]
  2. Validating the schema     [Ctrl+Enter]
  3. Handling errors properly   [Enter to send / busy action]
```

Use **Ctrl+A** or **Ctrl+E** to jump to the beginning or end of the input context.

### Shell Command Input

Execute shell commands directly with `!`:

<CodeGroup>
  ```bash Quick Commands theme={null}
  !ls              # List files
  !pwd             # Show directory
  !git status      # Check git status
  ```

  ```bash Development theme={null}
  !npm test        # Run tests
  !npm run build   # Build project
  !python app.py   # Run Python script
  ```
</CodeGroup>

This will send the command output to Slate directly.

### Context Management

<AccordionGroup>
  <Accordion title="Adding Context">
    Use `@filename` references:

    ```text theme={null}
    > Please review @src/main.ts and suggest improvements
    ```
  </Accordion>

  <Accordion title="Workspace Directories">
    Use `/workspace` to open the workspace manager, where you can review and remove workspace directories. Use `/add-dir` when you want the quick-add flow.

    ```bash theme={null}
    /workspace
    /add-dir
    ```
  </Accordion>

  <Accordion title="Reviewing Context">
    Open the workspace manager before switching tasks to review directories and remove anything you no longer need.

    ```bash theme={null}
    /workspace
    ```
  </Accordion>
</AccordionGroup>

### Long Prompts

Press **Ctrl+X then E** to open your external editor for composing complex prompts:

<Steps>
  <Step title="Press Ctrl+X then E">
    Opens your system's default editor
  </Step>

  <Step title="Write your prompt">
    Compose your detailed message in the editor
  </Step>

  <Step title="Save and close">
    The content automatically returns to Slate
  </Step>
</Steps>

<Danger>
  This will not work if your permissions do not allow access to `tmp` or `var` as this command uses a temp file for your default text editor
</Danger>

<CardGroup cols={2}>
  <Card title="Hotkey reference" icon="code" href="/en/using-slate/hotkey_reference">
    Explore Slate's complete set of commands.
  </Card>

  <Card title="Orchestration & Tracing" icon="diagram-project" href="/en/using-slate/orchestration">
    Learn how Slate shows parent runs, subagents, background agents, programs, and trace activity.
  </Card>
</CardGroup>
