Skip to main content
This is a beta feature according to Algolia’s Terms of Service (“Beta Services”).
Start by creating a new agent, which acts as the core decision-maker in your generative AI workflow. An agent receives a prompt, selects the appropriate tools, and generates a response using a language model. To create a new agent:
  1. Go to the Algolia dashboard and select your Algolia application.
  2. On the left sidebar, select Generative AI.
  3. Go to Agent Studio > Agents and click Create agent.
Agent Studio dashboard

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)
You can modify the prompts, tools, and settings after selecting a template.

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:
You are a helpful assistant that answers product-related questions using the Algolia index.
Always return your answer in markdown format.

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)
Click Add tool, select the type, and configure the parameters. Add algolia tools

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
Client-side tools live in your application. But the JSON schema definitions need to be added in the agent editor. Add client-side tools Make sure to define the tool’s name, description, and parameters. The agent will use this information to decide when to invoke the tool. To learn more, see Function calling in the OpenAI documentation.

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:
  1. Go to the Providers page in the Agent Studio’s dashboard, and click Add provider.
  2. Select your provider and enter your API key.
Add a provider You can switch or update provider credentials at any time.

Publish your agent

When you’re satisfied with testing:
  1. Click Publish in the agent editor.
  2. Confirm the configuration, any unsaved changes will be applied.
  3. The agent is now live and available for API integration or frontend SDK.
  4. 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.

Next steps

Integrate Agent Studio
I