This is a beta feature according to Algolia’s Terms of Service (“Beta Services”).
- Go to the Algolia dashboard and select your Algolia application.
- On the left sidebar, select Generative AI.
- Go to Agent Studio > Agents and click Create agent.

Agent templates
You can start from scratch or use template designed for common use cases like:- Shopping assistant
- Product questions and answers (Coming soon)
- Content summarizer (Coming soon)
Write a prompt
Prompts define how your agent behaves. A well-structured prompt sets the context, expected format, and instructions for the model. To write a prompt in your agent editor, add instructions such as:Best practices
- Be explicit about the agent’s role and data sources.
- Specify output format (for example markdown, JSON).
- Add instructions for handling edge cases.
Add tools
Tools extend your agent’s capabilities. You can add different tools provided by Algolia, including:- Algolia Search: Search across Algolia indices.
- Algolia Browse: Fetch records in bulk. (Coming soon)
- Algolia Recommend: Get recommendations based on content and user behavior. (Coming soon)

Add client-side tools
You can give the agent access to your own custom code through client-side tools. Based on its reasoning, the agent can invoke these tools to perform actions in your application. They can be useful for these purposes:- Fetching data: Retrieve information to incorporate into the response. Useful for passing user state or fetching additional data not available in Algolia indices.
-
Taking action:
Perform actions like submitting a form, making API requests, or modifying application state.
Examples include:
- Adding items to a shopping cart
- Displaying product details
- Applying search filters

Test your agent
Use the built-in playground to test your agent before publishing it. Inspect agent reasoning, tool invocations, and model outputs. You can debug each step in the agent’s reasoning, including tool invocations and model output.Add a provider
You can test your agent with the built-in model, but to deploy it in production, connect it to a language model provider. To add a provider:- Go to the Providers page in the Agent Studio’s dashboard, and click Add provider.
- Select your provider and enter your API key.

Publish your agent
When you’re satisfied with testing:- Click Publish in the agent editor.
- Confirm the configuration, any unsaved changes will be applied.
- The agent is now live and available for API integration or frontend SDK.
- You can unpublish an agent at any time to restrict access.
Best practices
- Start simple: Begin with a basic prompt and a simple tool, then iterate. To learn more about prompts, see Tips for writing efficient prompts.
- Test often: Use the playground to validate agent logic and outputs.
- Monitor usage: Review agent performance and cost.