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

# Chat API

> The stateful, chat-native foundation for powerful conversational AI.

<Warning>
  **Deprecation Notice**: The Chat and Message API is deprecated.

  New projects should start with the [Responses API (v1)](/api-guides/responses-v1) — our recommended surface. If you need intelligent routing, values-aligned (`tradition`) responses, or grounded completions, use [Completions V2](/api-guides/completions-v2). Existing integrations should migrate as soon as possible.

  **[View Migration Guide →](/api-guides/migrating-from-chat-to-completions-v2)**
</Warning>

Modern AI doesn't stop at one-turn completions. If you're building with conversational AI, **Chat Threads** are the structure behind truly intelligent, useful, and persistent assistants. Think of it like ChatGPT's conversations—stored, contextual, and evolving.

## What is a Chat Thread?

A thread is a persistent conversation—made up of messages between a user and an assistant. It’s not just about history; it’s about **memory, intent, context, and relationship.**

> Instead of reinventing state management, you can leverage a chat-native model and API to get this behavior out of the box.

## Why Threads Are a Game-Changer

### Built-in Context History

Threads preserve the full message history by default. This means:

* No need to re-send long prompts each time.
* Context-aware responses feel more helpful and consistent.
* It supports multi-turn reasoning and corrections (e.g., "Actually, I meant...").
* You get session persistence without writing session logic.

### First-Class RAG (Retrieval-Augmented Generation)

Threads pair naturally with RAG systems by grounding responses on:

* Domain-specific docs
* Internal knowledge bases
* External APIs or tools

Chat threads can be augmented with **value-aligned sources** that ensure responses stay on-brand, accurate, and compliant.

### Immediate Access to Proprietary Features

Using the "Chat" object lets you leverage powerful, production-ready features without building your own conversation manager:

| Feature              | What It Does                                                            |
| -------------------- | ----------------------------------------------------------------------- |
| **File Attachments** | Automatically ingest and summarize user files.                          |
| **Metadata**         | Tag threads with business logic, user info, or app state.               |
| **Tool Use**         | Threads integrate seamlessly with structured function calls.            |
| **Model Routing**    | Dynamically upgrade or fallback to different models.                    |
| **Thread Memory**    | Fine-tuned recall of prior interactions (coming soon or in enterprise). |

### Aligns with Real User Mental Models

People don’t talk to AI one prompt at a time. They:

* Ask follow-ups
* Refer back to previous context
* Expect the AI to "remember"

Threads let your app feel **human, collaborative, and intelligent**—not transactional.

### Foundation for Personalization and Long-Term Memory

With chat threads, you’re creating a structured, queryable history that can be used to personalize future sessions, train fine-tuned models, or build product analytics around AI interactions. It's more than chat—it's conversational infrastructure.

***

## TL;DR: Why Use Chat Threads?

| Benefit                   | Description                               |
| ------------------------- | ----------------------------------------- |
| **Persistent Context**    | Memory-like multi-turn interaction.       |
| **RAG-Friendly**          | Built to plug in high-quality knowledge.  |
| **Feature-Rich**          | Attach files, call tools, store metadata. |
| **Personalization-Ready** | Enables adaptive, long-term assistants.   |
| **Infra-Free**            | No need to manage context state yourself. |

Start building with Chat threads today and skip the infrastructure headaches. Whether you're building support bots, copilots, or AI apps, threads are the conversational primitive you'll never want to give up.
