# REPL

Interactive chat with your agent — slash commands, tab completion, streaming output.

The REPL is your primary interface for talking to agents. Streaming responses, Markdown rendering, tool call visualization, and slash commands for loading skills.

## Starting

```
crabtalk                    # connect to default agent
crabtalk --agent researcher # connect to a specific agent
```

## Slash commands

| Command            | What it does                                         |
|--------------------|-----------------------------------------------------|
| `/help`            | Show available commands                              |
| `/clear`          | Start a new conversation (clears chat buffer)       |
| `/resume`         | Browse and resume a previous conversation            |
| `/exit`           | Exit the REPL                                       |
| `/<skill-name>`   | Load a skill into the current session                |

Skill names support tab completion — start typing and press Tab.

## Input

Type a message and press Enter to send. For multi-line input, end a line with `\` to continue on the next line:

```
> Write a haiku about \
  Rust programming \
  and memory safety
```

Press **Ctrl+C** to cancel a streaming response. Press it again to exit.

## Output

Responses stream in real time with Markdown syntax highlighting. When an agent calls a tool, you'll see the tool name and status as it executes.

If the agent has `thinking = true`, reasoning blocks are displayed separately from the response text.

## Sessions

Each conversation is saved as a JSONL file in `~/.crabtalk/sessions/`. Sessions auto-resume — when you attach, the daemon picks up the most recent conversation for that agent.

Use `/clear` to start a fresh conversation, or `/resume` to open the session browser and pick a previous one. The session browser shows conversations grouped by identity, with titles, message counts, and last-active dates.

Session titles are auto-generated after the first exchange.

## History

Command history is saved to `~/.crabtalk/history` and persists across sessions. Use up/down arrows to navigate previous messages.

## What's next

- [Skills](/content/docs/crabtalk/skills/index.html) — how slash commands load skills
- [Agents](/content/docs/crabtalk/agents/index.html) — configure the agents you attach to
