Skip to main content

Deploying and Configuring Agents on the Zeta Alpha Platform

In this tutorial, we will guide you through the process of deploying and configuring your agents on the Zeta Alpha platform. By the end of this tutorial, you will have your agent running on the platform and accessible to users.

Prerequisites

Before you begin, make sure you have completed the following tutorials:

Also make sure you have the following:

  • A Zeta Alpha API Key with admin access to the platform
  • The Zeta Alpha API base URL and the name of the tenant you want to deploy the agent to

Configuring your environment

In order to upload the agent to the platform, you need to configure your environment with the following command:

rag_agents config set

This command will prompt you to enter:

  1. the Zeta Alpha API base URL: fill in the base URL of the Zeta Alpha API.
  2. the tenant name: fill in the name of the tenant you want to deploy the agent to
  3. the Zeta Alpha API Key: fill in the API key with admin access to the tenant

The output of this command creates a env/zav_config.json file with the configuration needed to connect to the platform and upload your agents.

Uploading the agent to the platform

After configuring your environment, you can now upload the agents of your <agents project> to the platform. For example, from the tutorial for Building and Running Your First RAG Agent, the agent my_rag_agent will be uploaded.

info

Each uploaded agent becomes available under a specific project of the tenant. By default, this project is named after the <agents project> directory name of your local project. However, you can specify a custom project name by using the --project-name parameter in the upload command.

To upload the agent, run the following command from the root of the <agents project> directory:

rag_agents upload [--project-name <custom_project_name>]

This command will display the project's agents that are ready to be uploaded. For example, for a project named test-agents which contains the my_rag_agent agent, the command will display:

🚀 Preparing to upload the following agents:
• test-agents:my_rag_agent
These agents will be uploaded to tenant `<tenant name>` at `<Zeta Alpha API base URL>`
Do you want to continue? [Y/n]:

If everything is correct, type Y and press enter. This will upload the project's agent to the platform.

Listing the uploaded agents

You can also list the uploaded agents of the project by running the following command:

rag_agents list-remote

Enabling an agent

Once the <agents project> is uploaded, go to the Zeta Alpha Platform UI and open the settings of the corresponding tenant. The tenant settings contain a list of chat_bot_setups where each entry contains the configuration of an agent. Add one entry for the uploaded agent you want to use, where:

  • bot_identifier: a name of your choice which will be used to call the agent. Specifically, this name should be used as the agent_identifier field of the chat request sent to the Zeta Alpha Chat APIs
  • llm_configuration_name: the name of the LLM configuration that will be used by the agent. This name matches the name of an entry in the llm_configurations list that is found in the tenant settings as well. Select the LLM you would like to use for your agent and use the name of the LLM configuration as the value of the llm_configuration_name field.
  • agent_name: the name of the uploaded agent. In the example given above, this name is test-agents:my_rag_agent.
  • bot_configuration: This is a dictionary containing the configuration that will be passed to the agent. This basically matches the agent_configuration field of the agent's entry in your local agent_setups.json file.

Using the agent

Calling the agent through the Chat API

You can now call the agent through the Zeta Alpha Chat API or the Zeta Alpha Chat Streaming API.

Follow the instructions in the Getting Started with the Chat API tutorial to call the agent through the API.

Integrating the agent in the Zeta Alpha Navigator Web Application

The tenant settings in the Zeta Alpha Platform UI have a bot_configurations field under the client_settings which contains the configuration about which agents are going to be used in each frontend component of the Zeta Alpha Navigator.

Specifically, the bot_identifier in each entry of the bot_configurations identifies a frontend component and the bot_type field identifies the agent that will be called in this component. The following bot_identifier values are currently supported by the components of the Zeta Alpha Navigator:

  • chat_with_qa_widget: This is the QA Widget and Chat component in the main page.
  • chat_with_pdf: This is the Chat component in the PDF Viewer page.
  • chat_with_tag: This is the Chat component in the Tags page.
  • k_answer_table: This is the Table QA Widget component in the main page.

Select which of these components you want to integrate with your uploaded agent and replace the bot_type field with the agent identifier of the agent you want to use. You can now test your agent by opening the Zeta Alpha Navigator and navigating to the component you selected.

note

The updated tenant settings may take up to 1 minute to be reflected in the Zeta Alpha Navigator.