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

# Chat

> Test your agent in a built-in chat UI — no separate client required

The Chat tab is the fastest path from "I saved this agent" to "I'm watching it answer." It supports every feature of the runtime — multi-turn history, tool calls, structured output, attachments, voice — in a UI you can use without writing any client code.

![Conversational UI for Agents](https://mintcdn.com/hastekit/890s5wy2NHvxQLSN/images/agent-builder/chat.png?fit=max\&auto=format\&n=890s5wy2NHvxQLSN\&q=85\&s=b20a20fb78408db138080e09bfca1831)

## Layout

* **Sidebar** — past conversations grouped under "Chats." Click any one to resume; click **New Chat** to start fresh.
* **Main chat area** — message history with inline rendering of tool calls (each shows its name, arguments, and result).
* **Input bar** — the agent picker, version picker, context dialog, attachment buttons, and message input.

## Picking an agent and version

* Click the **agent name** button above the input field to switch agents.
* Click the **version** button (defaults to `Latest`) to pin the chat to a specific version. Version 0 (`$LATEST`) is always the current mutable working copy; numbered versions are immutable snapshots. See [Versioning](https://hastekit.ai/docs/gateway/agent-builder/versioning.md).
* Picking an [alias](https://hastekit.ai/docs/gateway/agent-builder/alias.md) (e.g. `production`) routes each turn to whichever version the alias currently points at.

## Adding context

Click the **@** button to open the **Add Context** dialog:

* **Context** — a JSON object passed alongside each message. Useful for templated [system prompts](https://hastekit.ai/docs/gateway/agent-builder/system-prompt.md) (`{{user_name}}`, `{{org_id}}`, …) or anything else your agent reads from the request body.
* **Headers** — a JSON object of HTTP headers added to each request — auth tokens, user IDs, anything you'd want a real client to send.

Both values persist for the rest of the conversation.

## Attachments

* **Files** — paperclip icon. Attach PDFs, images, and other files inline with a message. The agent's model needs to support the file type natively (e.g. vision for images, document inputs for PDFs).
* **Audio** — microphone icon. Record voice input directly. Useful for testing agents wired to the [Transcript Generation tool](https://hastekit.ai/docs/gateway/agent-builder/provider-tools.md).

## Tool-call visualization

Every tool call the agent makes shows up inline in the chat as a labeled block:

* Tool name and source (e.g. `Google Calendar: List Events`, `MCP: search_repo`).
* Arguments the agent sent.
* The tool's result.

Click any block to jump to its span in the full [trace](https://hastekit.ai/docs/gateway/agent-builder/traces.md).

## Sending messages

Type into **Ask anything** and press Enter (or click send). The response **streams** in token-by-token. Tool calls execute inline and stream their results as they complete.

## Useful per-message actions

Each assistant message has a footer row:

* **Copy** the response.
* **Thumbs up / thumbs down** for feedback (logged for evals).
* **Regenerate** to re-run the last turn.
* **View trace** to jump straight to the OpenTelemetry trace for the run.

## When to use Chat vs the HTTP API

| Use Chat for | Use the HTTP API for |
| - | - |
| Manual testing during iteration | Production traffic |
| Debugging tool calls visually | Integration with your app |
| Demoing the agent to others | Driving the agent from a [workflow](https://hastekit.ai/docs/gateway/agent-builder/workflows.md) or [channel](https://hastekit.ai/docs/gateway/agent-builder/channels.md) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.