Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/website/docs/docsearch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ docsearch({

### Using Agent Studio with DocSearch

To use [Algolia Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio) as the chat backend, set `agentStudio: true` inside the `askAi` object.
To use [Algolia Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio) as the chat backend, set `agentStudio: true` inside the `askAi` object and pass your Agent Studio **agent ID** as `assistantId`. Full migration steps (v4, v5, and custom Ask AI API) are in [Migrate Ask AI to Agent Studio](/docs/v4/migrating-askai-to-agent-studio).

```js
docsearch({
Expand Down
32 changes: 18 additions & 14 deletions packages/website/docs/v4/askai-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,33 @@
title: Ask AI API Reference
---

import AskAIDeprecationNotice from '../../src/components/mdx/ask-ai-deprecation-notice.jsx'
import AskAIDeprecationNotice from '../../src/components/mdx/ask-ai-deprecation-notice.jsx';

<AskAIDeprecationNotice />

The Ask AI API enables developers to build custom chat interfaces powered by Algolia's AI assistant. Use these endpoints to create tailored conversational experiences that search your Algolia index and generate contextual responses using your own LLM provider.
The Ask AI API enabled custom chat interfaces powered by Algolia's AI assistant. **New and migrating integrations should use [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio) instead.**

:::warning
If you currently call the Ask AI API directly, migrate to the Agent Studio APIs. DocSearch users should follow the [migration guide](/docs/v4/migrating-askai-to-agent-studio) and enable `agentStudio: true` (v4) or pass the agent ID (v5).
:::

:::info
This API documentation is primarily for developers building custom Ask AI integrations. If you're using the DocSearch package, you typically won't need this information since DocSearch handles the Ask AI API integration automatically. For standard DocSearch usage, see the [DocSearch documentation](/docs/docsearch) instead.
This page is mainly for developers who built custom Ask AI HTTP clients. If you use the DocSearch package, configure Agent Studio through DocSearch — see [Migrate Ask AI to Agent Studio](/docs/v4/migrating-askai-to-agent-studio).
:::

## API Documentation
## Where to go now

For complete API documentation including endpoints, authentication, request/response formats, and implementation examples, please visit the official Algolia Ask AI API Reference:
Use Agent Studio for agents, completions, and related APIs:

**[Algolia Ask AI API Reference](https://www.algolia.com/doc/guides/algolia-ai/askai/reference/api)**
- **[Agent Studio documentation](https://www.algolia.com/doc/guides/algolia-ai/agent-studio)** — create and manage agents
- **Completions host pattern:** `https://{APPLICATION_ID}.algolia.net/agent-studio/1/agents/{AGENT_ID}/completions`

The official documentation includes:
## Legacy Ask AI API (deprecated)

Legacy Ask AI HTTP docs remain available for reference while you migrate:

**[Algolia Ask AI API Reference](https://www.algolia.com/doc/guides/algolia-ai/askai/reference/api)**

- Authentication and token management
- Chat endpoint with streaming responses
- Search parameters and facet filtering
- Feedback submission
- Integration examples with Next.js and Vercel AI SDK
- Error handling and best practices
That reference covers the older Ask AI token, chat, and feedback endpoints. Prefer Agent Studio for all new work.

For more information about Ask AI in general, see the [Ask AI documentation](/docs/v4/askai).
For DocSearch SDK setup (including `agentStudio: true`), see [Migrate Ask AI to Agent Studio](/docs/v4/migrating-askai-to-agent-studio) and [Get started with Ask AI](/docs/v4/askai).
71 changes: 71 additions & 0 deletions packages/website/docs/v4/migrating-askai-to-agent-studio.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Migrate Ask AI to Agent Studio
---

Ask AI is moving into [Algolia Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio), the place to build and manage AI agents. You can migrate your existing Ask AI assistant to Agent Studio, then update your DocSearch (or custom API) integration to use the new agent.

## Migrate your assistant

1. Open [Agent Studio](https://www.algolia.com/doc/guides/algolia-ai/agent-studio) in the Algolia dashboard.
2. Migrate or recreate your Ask AI assistant as an Agent Studio agent.
3. Copy the **agent ID** — you will use it in DocSearch (and custom API clients) below.

## Update DocSearch

### DocSearch v4

Turn on the `agentStudio` flag and pass your Agent Studio **agent ID** as `assistantId`:

```js
docsearch({
appId: 'YOUR_APP_ID',
indexName: 'YOUR_INDEX_NAME',
apiKey: 'YOUR_SEARCH_API_KEY',
askAi: {
assistantId: 'YOUR_AGENT_ID',
agentStudio: true,
},
});
```

```jsx
<DocSearch
appId="YOUR_APP_ID"
indexName="YOUR_INDEX_NAME"
apiKey="YOUR_SEARCH_API_KEY"
askAi={{
assistantId: 'YOUR_AGENT_ID',
agentStudio: true,
}}
/>
```

Notes for v4:

- `agentStudio` lives inside the `askAi` object (not as a top-level prop on the modal).
- When `agentStudio: true`, `searchParameters` must be keyed by index name. See [Using Agent Studio with DocSearch](/docs/docsearch#using-agent-studio-with-docsearch) and [`askAi.agentStudio`](/docs/api#askaiagentstudio).

For the Sidepanel, set `agentStudio={true}` and pass the agent ID as `assistantId`. See the [Sidepanel API reference](/docs/sidepanel/api-reference#agentstudio).

### DocSearch v5

In DocSearch v5, Agent Studio is the default chat backend. Pass your Agent Studio **agent ID** directly (no `agentStudio` flag required). Exact prop names will be documented with the v5 release.

## Custom Ask AI API integrations

If you call the Ask AI HTTP API yourself (instead of using DocSearch), point your client at **Agent Studio** instead of the Ask AI chat API.

Do not continue building new integrations against the Ask AI API endpoints. Use the Agent Studio APIs and guides:

- [Agent Studio documentation](https://www.algolia.com/doc/guides/algolia-ai/agent-studio)
- Completions are available under your application host, for example:
`https://{APPLICATION_ID}.algolia.net/agent-studio/1/agents/{AGENT_ID}/completions`

For DocSearch users, prefer the SDK configuration above — DocSearch wires the Agent Studio transport for you when `agentStudio: true`.

## Related docs

- [Get started with Ask AI](/docs/v4/askai) (legacy Ask AI setup)
- [Ask AI API](/docs/v4/askai-api) (legacy; migrate to Agent Studio)
- [DocSearch API — askAi.agentStudio](/docs/api#askaiagentstudio)
- [Agent Studio on algolia.com](https://www.algolia.com/doc/guides/algolia-ai/agent-studio)
4 changes: 2 additions & 2 deletions packages/website/docusaurus.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ export default {
],
},
announcementBar: {
id: 'announcement-bar',
id: 'askai-agent-studio-migration',
content:
'Ask AI is now part of <strong>Agent Studio</strong> - We\'re integrating Ask AI into Agent Studio, our centralized space to build and manage AI agents.<a target="_blank" rel="noopener noreferrer" href="https://www.algolia.com/doc/guides/algolia-ai/agent-studio">Explore Agent Studio</a>',
'You can migrate your Ask AI assistant to <strong>Agent Studio</strong>. <a href="/docs/v4/migrating-askai-to-agent-studio">See how to update DocSearch</a> · <a target="_blank" rel="noopener noreferrer" href="https://www.algolia.com/doc/guides/algolia-ai/agent-studio">Open Agent Studio docs</a>',
},
colorMode: {
defaultMode: 'light',
Expand Down
6 changes: 6 additions & 0 deletions packages/website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ export default {
label: 'Algolia Ask AI',
items: [
'v4/askai',
'v4/migrating-askai-to-agent-studio',
'v4/askai-api',
'v4/askai-prompts',
'v4/askai-whitelisted-domains',
'v4/askai-models',
'v4/askai-markdown-indexing',
'v4/askai-errors',
{
type: 'link',
label: 'Agent Studio',
href: 'https://www.algolia.com/doc/guides/algolia-ai/agent-studio',
},
{
type: 'link',
label: 'Full Documentation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import React from 'react';
export default function AskAIDeprecationNotice() {
return (
<Admonition type="warning">
Ask AI is being migrated from a standalone DocSearch feature into Algolia's{' '}
Ask AI is being migrated into Algolia&apos;s{' '}
<a href="https://www.algolia.com/doc/guides/algolia-ai/agent-studio" target="_blank" rel="noreferrer">
Agent Studio
</a>
. DocSearch v5 will fully support Agent Studio and transition to using it. A more detailed migration guide will be
published before the DocSearch v5 release.
. You can migrate your assistant now and update DocSearch to use your Agent Studio agent ID. See the{' '}
<a href="/docs/v4/migrating-askai-to-agent-studio">Ask AI → Agent Studio migration guide</a>.
</Admonition>
);
}