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

# Agent Studio

> Build generative AI experiences with real-time Algolia data and LLMs like OpenAI and Gemini.

export const SearchRequest = () => <Tooltip tip="A search request is a single HTTP call to the Algolia Search API that can run one or more search operations. It can include multiple queries, for example, when querying several indices at once.">
    search request
  </Tooltip>;

<Callout icon="flask-conical" color="#14b8a6">
  This is a **beta feature** according to [Algolia's Terms of Service ("Beta Services")](https://www.algolia.com/policies/terms/).
</Callout>

Agent Studio connects your chosen LLM to Algolia search and tools.
It manages the end-to-end workflow and grounds responses in live data from your Algolia indices.
Agent Studio lets you create:

* **Shopping assistants** that answer product questions and recommend items.
* **Content summarizers** that extract key insights from large datasets.
* **Conversational search** for natural language queries.
* **Custom workflows** that link prompts to Algolia features and external integrations.

<Card title="Create your first assistant" icon="bot" href="/doc/guides/algolia-ai/agent-studio/how-to/quickstart">
  Follow the quickstart to build and test a conversational assistant in Agent Studio.
</Card>

## How Agent Studio works

Agent Studio coordinates between user input, Algolia tools and indices,
and the selected LLM to create a generative AI workflow:

```mermaid theme={"system"}
%%{init:{
  "theme":"base",
  "securityLevel":"loose",
  "flowchart":{
    "htmlLabels": false,
    "wrappingWidth": 75,
    "useMaxWidth": false
  },
  "themeVariables":{
    "fontSize":"14px",
    "fontFamily":"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial"
  }
}}%%
flowchart LR
  A["`Define your agent (role, style, constraints)`"]
  B["`Add tools and indices (Algolia and client-side tools)`"]
  C["`Choose a model (OpenAI, Gemini, Azure, OpenAI-compatible)`"]
  D["`Publish and integrate (dashboard and API)`"]

  A --> B --> C --> D
  click D "https://dashboard.algolia.com/generativeAi/agent-studio/agents" "Open Agent Studio dashboard" _blank
```

For example, when a user asks "What are the best wireless headphones?":

```mermaid theme={"system"}
sequenceDiagram
    participant User
    participant Agent as Agent Studio
    participant LLM
    participant Algolia as Algolia Search

    User->>Agent: "What are the best wireless headphones?"
    Agent->>LLM: Analyze query with available tools
    LLM->>Agent: Call Algolia Search tool
    Agent->>Algolia: Query index
    Algolia->>Agent: Top results
    Agent->>LLM: Generate response from results
    LLM->>Agent: Conversational answer
    Agent->>User: Final response
```

The LLM is involved in two steps: first to determine which [tools](/doc/guides/algolia-ai/agent-studio/how-to/tools/overview) to use, then to generate a response grounded in the retrieved data.

<Note>
  Each <SearchRequest /> from an agent counts toward your search usage and may incur additional charges.
</Note>

**Cost optimization**

Completions are [cached](/doc/guides/algolia-ai/agent-studio/how-to/caching) by default to minimize your LLM provider token costs.

## See also

* [Agent Studio dashboard](/doc/guides/algolia-ai/agent-studio/how-to/dashboard)
* [InstantSearch.js chat widget](/doc/api-reference/widgets/chat/js)
* [React InstantSearch chat widget](/doc/api-reference/widgets/chat/react)
* [Integrate Agent Studio](/doc/guides/algolia-ai/agent-studio/how-to/integration)
* [Prompting tips](/doc/guides/algolia-ai/agent-studio/how-to/prompting)
