Agents

Agents allow you to build the backend of your generative AI application. You can pick from a library of agents or create your own with your own models and data sets. The playground allows you to test the output of your agent against different prompts. The battleground allows you to test agents against each other to decide which one works best for your use case.

Before creating a agent, ensure that you have added at least one model and data source to your project. For more information, visit our section called “Model Lifecycle Management”.

Creating a New Agent

To create a new Agent:

  1. Select the Project you want to create your Agent in.
  2. Select the Agents tab.
  3. Validate that you have added at least one Model and one Data Source to your Model Library and Data Sources.
  4. Select “New Agent”.
  5. Give the Agent a name in the top left.
  6. Drag and drop nodes from the left side onto the canvas that you would like to use in your Agent.
  7. Use the line drawer to connect the objects together.
  8. Click “Save changes” or “Publish” to save your agent.

Testing a Agent

To test your agent:

  1. Open a Agent.
  2. Select “Test”.
  3. Insert the prompt in the text box at the bottom.
  4. Attach any files or images if needed.
  5. Submit the prompt.
  6. View the output in the output box.

To Compare Agents

  1. Click the + sign in the playground to add a new agent.
  2. Insert the prompt in the text box at the bottom.
  3. Attach any files or images if needed.
  4. Submit the prompt.
  5. View the outputs in the output box.

Editing a Agent

To edit a Agent:

  1. Open the agent.
  2. Make changes on the canvas.
  3. Click “Save changes” or “Publish” to save your agent.

Debugging a Agent

To debug a Agent:

  1. Test the Agent on the playgroung
  2. CLick the View Lows next to the output while testing, or navgiate to the Agent Executions feed on the left-side navigation and click on the Agent execution you are debugging.
  3. Review the Logs for errors.

Using Your Agent

To use your agent in your application:

  1. Visit our API documentation.
  2. From the Agents List, click the “…” on the agent you want to call.
  3. Select “Connection Info”.
  4. The API endpoint for the agent will appear.
  5. The headers of your API call should be:
  • Content-Type: application/json
  • X-API-Key: YOUR_API_KEY
  1. View the API Documentation for the body of the request.

To Generate Your API Key

  1. Navgiate to Settings and then API Keys.
  2. Click “Generate Key”.
  3. Name your key.
  4. Copy the key and use it in your API client.
  5. Click Create.