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

# AI Assistant

> Ask questions about your GPU infrastructure, workloads, and capacity directly from the terminal

# AI Assistant

**Get answers without leaving your terminal.** The `chamber chat` command connects you to Chamber's AI assistant — ask about workload status, GPU utilization, capacity planning, and more in natural language.

```bash theme={null}
chamber chat "how many GPUs are running right now?"
```

<Info>
  AI Chat requires browser-based authentication. Run `chamber login` (without `--token`) to authenticate. API tokens are not supported for chat.
</Info>

## Modes

### Quick Question

Pass your question as an argument for a single response:

```bash theme={null}
chamber chat "what's the status of my latest training job?"
```

```bash theme={null}
chamber chat "which teams have the highest GPU utilization this week?"
```

### Interactive Conversation

Run `chamber chat` without arguments to start a multi-turn conversation:

```bash theme={null}
$ chamber chat

Chamber AI Assistant
Type /help for commands, /quit to exit

> what jobs are currently running?

You have 3 jobs running:
  • gpt-finetune-v2 — 8x H100, running for 2h 15m
  • embedding-train — 4x A100, running for 45m
  • llm-eval — 2x H100, running for 12m

> how much capacity is left in the H100 pool?

The us-west-h100 pool has 16 of 64 GPUs available (75% utilized).
Your team has 12 GPU-hours remaining in this billing period.

> /quit
```

Interactive commands:

| Command            | Action                      |
| ------------------ | --------------------------- |
| `/quit` or `/exit` | End the session             |
| `/new`             | Start a new conversation    |
| `/help`            | Show available commands     |
| `Esc` or `Ctrl+C`  | Cancel the current response |

### Named Conversations

Use `-c` to name a conversation and resume it later:

```bash theme={null}
# Start a named conversation
chamber chat -c debug-job "my training job failed, can you help?"

# Come back later and continue where you left off
chamber chat -c debug-job "I tried your suggestion, still seeing OOM errors"
```

### Pipe Input

Pipe logs, config files, or other data into chat for analysis:

```bash theme={null}
# Analyze logs
kubectl logs my-training-pod | chamber chat "what errors are in these logs?"

# Review a config
cat .chamber.yaml | chamber chat "is this config optimized for distributed training?"
```

<Tip>
  When stdout is piped (e.g., `chamber chat "question" | pbcopy`), streaming is automatically disabled and the full response is buffered before output.
</Tip>

### Image Attachments

Attach an image for visual analysis:

```bash theme={null}
chamber chat -i screenshot.png "what does this GPU utilization graph tell me?"
```

Supported formats: PNG, JPG, GIF, WebP.

### List Conversations

View your recent chat history:

```bash theme={null}
chamber chat --list
```

## What You Can Ask

The AI assistant has access to your organization's live infrastructure data. Example questions:

<CardGroup cols={2}>
  <Card title="Workloads" icon="microchip">
    * "What jobs are running right now?"
    * "Why did my training job fail?"
    * "Show me jobs submitted by my team this week"
    * "What's the average queue wait time?"
  </Card>

  <Card title="Capacity" icon="server">
    * "How much GPU capacity is available?"
    * "When does our H100 reservation expire?"
    * "Which pools have spare capacity?"
    * "Are we at risk of hitting our budget?"
  </Card>

  <Card title="Utilization" icon="chart-bar">
    * "What's our GPU utilization this week?"
    * "Which teams are underutilizing their allocations?"
    * "Show me utilization trends for the last 30 days"
    * "Are there any idle GPUs I can use?"
  </Card>

  <Card title="Optimization" icon="lightbulb">
    * "How can I improve my training job's GPU efficiency?"
    * "Should I use reserved or elastic for this workload?"
    * "What's the best GPU type for my use case?"
    * "Help me right-size my resource requests"
  </Card>
</CardGroup>

The assistant also understands Chamber CLI commands and can suggest the right command for what you're trying to do — and execute it for you with a single confirmation.

## Command Execution

When the AI assistant determines that a CLI command can fulfill your request, it will suggest the command and ask for confirmation before running it locally:

```bash theme={null}
$ chamber chat "run my training script in ./demo on 4 H100s"

Chambie AI Assistant
Thinking... ✓

I'll set that up for you.

  ┌ Suggested command:
  │  chamber run ./demo --gpus 4 --gpu-type H100 --team abc123
  │
  │  Run training in ./demo on 4x H100 GPUs
  └ Execute this command? [Y/n]:
```

Press **Enter** or type **y** to execute the command. Type **n** to skip it.

This works in all modes — quick questions, interactive conversations, and piped input. A few things to know:

* **Confirmation required** — The assistant always asks before executing. You stay in control.
* **Local execution** — Commands run on your machine using the same `chamber` binary you're already using.
* **Non-TTY mode** — When input is piped (non-interactive), suggested commands are displayed but not executed, so scripts remain safe.
* **Ctrl+C** — You can cancel a running command at any time.

<Tip>
  Try asking the assistant to perform actions: "cancel workload abc123", "submit a job with 8 H100s", or "list my team's running jobs". It will translate your request into the right CLI command.
</Tip>

## Command Reference

```bash theme={null}
chamber chat [message] [flags]
```

| Flag                 | Description                                                 |
| -------------------- | ----------------------------------------------------------- |
| `-c, --conversation` | Named conversation thread (resume later with the same name) |
| `-m, --model`        | AI model selection                                          |
| `-i, --image`        | Attach an image file (PNG, JPG, GIF, WebP)                  |
| `--no-stream`        | Disable streaming (buffer full response before output)      |
| `--raw`              | Disable markdown rendering in terminal                      |
| `-l, --list`         | List recent conversations                                   |

## Output

When running in a terminal, responses are rendered with formatted markdown including syntax highlighting, bold/italic text, and clickable links. Use `--raw` to disable formatting if needed.

When piped to another command, streaming is disabled automatically and raw text is output:

```bash theme={null}
# Copy response to clipboard
chamber chat "list my running jobs" | pbcopy

# Save to file
chamber chat "summarize this week's utilization" > report.txt
```
