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

# Huddle

> Interactive AI conversations with single-model and multi-model deliberation.

## Overview

Huddle is a21e's conversational interface. It supports two modes:

* **Single mode** — fast, one-model execution through the intent pipeline
* **Multi mode** — multi-model deliberation where models plan, critique each other, and reach consensus

## Creating a session

### Via the web interface

1. Navigate to [a21e.com/huddle](https://a21e.com/huddle)
2. Type your request in the composer
3. Select **Single** or **Multi** mode (or leave on **Auto** to let a21e decide)
4. Submit

### Via the API

```bash theme={null}
curl -X POST https://api.a21e.com/v1/huddle \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "What caching strategy should we use for our API?",
    "mode": "multi",
    "model_tier": "premium"
  }'
```

## Single vs. Multi mode

|              | Single                        | Multi                                      |
| ------------ | ----------------------------- | ------------------------------------------ |
| **Speed**    | Fast (seconds)                | Slower (30s-2min)                          |
| **Models**   | One model selected by tier    | 2-4 models deliberate                      |
| **Best for** | Direct tasks, code generation | Architecture decisions, trade-off analysis |
| **Output**   | Direct response               | Consensus report with dissenting views     |

## Follow-up messages

Send follow-up messages to continue the conversation:

```bash theme={null}
curl -X POST https://api.a21e.com/v1/huddle/sessions/{session_id}/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "What about Redis vs Memcached specifically?",
    "mode": "single"
  }'
```

You can switch modes between messages — ask a quick follow-up in single mode after a multi-model deliberation.

## Repository context

When your workspace has a connected GitHub repository, Huddle automatically:

1. **Scans your codebase** — identifies relevant files based on your question
2. **Inspects files** — reads configuration, source code, and tests
3. **Grounds responses** — references your actual code with linkified file paths

For codebase-specific questions ("audit my auth implementation", "do I have test coverage for the API?"), a21e escalates to deeper inspection with more files analyzed.

## Streaming

Pass `?stream=true` for server-sent events:

```bash theme={null}
curl -N "https://api.a21e.com/v1/huddle?stream=true" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input": "Review my error handling patterns", "mode": "single"}'
```

Events include `stage` (pipeline progress), `token` (response chunks), `metadata`, and `done`.
