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

# Chat with Your Squad Member

> Talk to your squad through Desktop, Telegram, or the WebSocket API.

Once your squad member is deployed, there are three ways to talk to it: the built-in Desktop chat, messaging apps like Telegram, or the WebSocket API for programmatic access.

## Three ways to chat

| Method             | Best for                                      | Setup required          |
| ------------------ | --------------------------------------------- | ----------------------- |
| **Desktop**        | Day-to-day interaction, debugging, monitoring | None — built in         |
| **Messaging apps** | Reaching your squad from Telegram or WhatsApp | Connect a messaging app |
| **WebSocket API**  | Building integrations, automation, custom UIs | Developer setup         |

## Desktop chat

The fastest way to talk to your squad. Open the **Chat** tab in Desktop and start a new conversation.

**Tabbed interface** — open multiple conversations at once and switch between them like browser tabs. Use ⌘T to open a new tab, ⌘W to close, and ⌘1–9 to switch.

**What you see while chatting:**

* **Real-time streaming** — responses appear token by token as the agent generates them
* **Thinking indicators** — see when the agent is reasoning through a problem (including context compaction status)
* **Tool use** — watch the agent call tools, see the inputs it sends, and the results it gets back
* **Image support** — send images to your agent for analysis or discussion

The empty chat panel shows your recent conversations and deployed agents for quick access. Every conversation is automatically saved. Come back later and pick up where you left off.

## Reading tool activity

When your agent uses a tool, Desktop and the web client show a tool card. Dash for iOS groups
consecutive thinking, status, and tool steps into one compact **Activity** row so a long tool run does
not crowd out the conversation. Tap the row to inspect the individual steps and available results.

**Collapsed by default.** Each card shows a single line: the tool's name, a short summary of what it was asked to do, and what came back. A `bash` card reads its command, a `read` card names the file and says how many lines it returned, a `grep` card says how many matches it found. Tap or click a card to expand it and see the full inputs and result.

**Two cards open on their own:**

* **Task lists** expand automatically — a to-do list is the agent's plan for the turn, rendered as a checklist with a done/total count in the header. Completed items are ticked, the current item is marked in progress.
* **Failures** expand automatically and stay open, so the error is in front of you without a tap. Collapse it yourself and it stays collapsed.

**Tool-specific bodies.** Expanded cards render the result in a form that fits the tool: file edits show a colored diff with a `+added -removed` count, directory listings show entries with folder markers, web searches show titled results with their host, and grep results group matches under each file. Everything else falls back to the raw text.

## Composer keys

The message box uses the same keys across Desktop, the web client, and iOS, with one deliberate difference on iOS:

| Key              | Desktop & web             | iOS                       |
| ---------------- | ------------------------- | ------------------------- |
| **Return**       | Send                      | Insert a line break       |
| **Shift+Return** | Insert a line break       | Insert a line break       |
| **Cmd+Return**   | Send                      | Send                      |
| **Shift+Tab**    | Insert a line break       | Insert a line break       |
| **Tab**          | Move focus out of the box | Move focus out of the box |

On iOS a hardware keyboard's Return is the natural newline and **Cmd+Return** sends — matching the send button. Plain **Tab** is always left to focus navigation so keyboard and screen-reader users can move out of the composer.

## Telegram and WhatsApp

Connect your agent to a messaging app and chat with it just like you would with a friend. Send a message to your bot on Telegram and the agent responds in the same thread.

Setting this up takes a few minutes:

1. Create a bot on the messaging platform
2. Add the bot token to Desktop
3. Configure which agent handles messages from that bot

Once connected, your agent is always reachable — from your phone, desktop, or anywhere the messaging app runs.

<Card title="Connect a messaging app" icon="paper-plane" href="/messaging-apps">
  Step-by-step setup for Telegram, WhatsApp, and more.
</Card>

## WebSocket API

For developers who want to integrate agents into their own applications, the WebSocket API gives you full programmatic access.

### Connecting

```
ws://localhost:9200/ws/chat?token=<your-chat-token>
```

Authenticate with a token in the query string. See [API Reference](/api-reference) for full connection details.

### Message flow

The protocol uses a simple request-response pattern over WebSocket:

1. **Send a message** — include the agent ID, a channel ID, a conversation ID, and your text
2. **Receive streaming events** — the server sends events as the agent works (`text_delta`, `tool_use_start`, `tool_result`, etc.)
3. **Receive done** — a `done` message signals the response is complete

```json theme={null}
// Send a message
{
  "type": "message",
  "id": "req-1",
  "agentId": "default",
  "channelId": "my-app",
  "conversationId": "conv-1",
  "text": "Summarize the latest logs"
}

// Receive streaming events
{ "type": "event", "id": "req-1", "event": { "type": "text_delta", "text": "Looking" } }
{ "type": "event", "id": "req-1", "event": { "type": "text_delta", "text": " at the" } }
{ "type": "event", "id": "req-1", "event": { "type": "text_delta", "text": " logs..." } }

// Stream complete
{ "type": "done", "id": "req-1" }
```

You can also **cancel** an in-flight request by sending `{ "type": "cancel", "id": "req-1" }` and handle **errors** via `{ "type": "error" }` messages.

<Card title="Full API Reference" icon="code" href="/api-reference">
  Complete WebSocket protocol spec, message types, and authentication details.
</Card>

## Sessions

Every conversation is persisted as a session. When you send a message to an agent, it sees the full history of that conversation — so it maintains context across messages without you repeating yourself.

Sessions are stored as append-only JSONL files. Each message, tool call, and response is recorded in order. This means your conversation history is durable and can be inspected if needed.

Sessions are scoped by agent and conversation ID. A chat in Desktop and a chat on Telegram are separate sessions, even if they're with the same agent.

## Streaming

Responses arrive in real time as the agent works. You don't wait for the full response to be generated — you see progress as it happens:

* **Text chunks** appear word by word as the model generates them
* **Tool use** shows up when the agent decides to call a tool, as a collapsed card with the tool name and a short summary of its input
* **Tool results** update the same card when the tool finishes, showing what came back (see [Reading tool activity](#reading-tool-activity))
* **Thinking** appears only when the model supplies a thinking block

This streaming experience works across all three chat methods — Desktop, messaging apps, and the WebSocket API.
