# Tempest AI Assistant

The **Tempest AI Assistant** is an in-app chat panel that knows what's happening in your SSH session. Ask it to explain a stack trace, generate a one-liner, debug a failing systemd unit, or draft a migration script — and pipe the answer straight into the terminal. Think of it as Claude / GPT / Gemini sitting next to your shell, with full context.

## What it can see

The AI sees only what you give it — by default that's:

* The current command output you highlight
* Files you explicitly attach (drag-and-drop into the chat)
* Your typed question

It does **not** silently scrape your terminal history, your hosts list, or your keys. You stay in control of what reaches the model.

## What it can do

* **Explain**: paste an error → get a plain-English diagnosis
* **Generate**: "give me a one-liner to find files modified in the last hour" → get the command, optionally one-click "run in terminal"
* **Investigate**: "the disk is full, show me the biggest directories" → get a `du` invocation, run it, AI sees the output and follows up
* **Refactor**: paste a Bash script → get an idiomatic rewrite, side-by-side diff
* **Bridge to coding agents**: combine with the **Use AI Agents** preset on a connection to drop straight into Claude Code, Gemini CLI, Codex CLI, or OpenCode on the remote host

## Choose your model

Tempest doesn't lock you into one provider. Configure any of:

* **Anthropic Claude** (Sonnet, Opus, Haiku) — recommended default
* **OpenAI** GPT-4 / GPT-5 family
* **Google Gemini**
* **Self-hosted** — point at any OpenAI-compatible endpoint (Ollama, vLLM, llama.cpp, your enterprise gateway)

Configure your API key once in **Settings → AI** and the assistant is available in every connection tab.

## Privacy

* Tempest never proxies AI requests through our servers — they go directly from your device to the provider you configured.
* When you use a self-hosted model, prompts stay entirely inside your network.
* See [How Tempest Protects Your Privacy](/account-and-privacy/how-tempest-protect-your-privacy.md) for the full data-handling story.

## Configurable temperature

Set the model temperature in Settings — lower for deterministic command generation, higher for creative refactoring suggestions.

## Coding agents preset

The connection edit form has a **Use AI Agents** quick-config: pick **Claude Code**, **Gemini CLI**, **Codex CLI**, or **OpenCode**, give a working directory, and Tempest will `cd <dir> && <agent>` on connect — perfect for jumping straight into a coding session on a remote dev box.

See the dropdown next to the **Startup Command** field in any SSH host's edit form.

## See also

* [Kubernetes Profiles](/productivity/kubernetes-profiles.md) — pair the AI with `kubectl` for cluster troubleshooting
* [Tempest Monitoring](/productivity/tempest-monitoring.md) — when a gauge spikes, ask the AI what to do
* [SSH Snippets](/productivity/tempest-monitoring.md) — save AI-generated commands as reusable snippets


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gotempest.app/productivity/tempest-ai-assistant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
