0 / 0
Agent Lab (beta)
Last updated: Jan 30, 2025
Agent Lab (beta)

Use the Agent Lab in IBM watsonx.ai to build and deploy an AI agent that can be used to make your applications more flexible and dynamic. You can configure the agent to make decisions and perform tasks on behalf of an end user by using the parameters and tools you specify in the agent's settings.

Note: The Agent Lab tool in watsonx.ai is available as a beta feature.

Getting started with Agent Lab

If you signed up for watsonx.ai and you have a sandbox project, all requirements are met and you're ready to use the Agent Lab.

You must meet the following requirements to use the Agent Lab:

  • You must have a project.
  • The project must have an associated watsonx.ai Runtime service instance. Otherwise, you might be prompted to associate the service when you open the Agent Lab.
Required permissions
To build an agent, you must have the Admin or Editor role in a project.

The Agent Lab lets you easily build and customize your AI agent with minimal coding. You define the parameters of the interaction between the agent and the end user, including the foundation model, framework, architecture, and tools that the agent uses to accomplish a task.

In a real-world scenario, the agent takes the next best step based on the current state of the interaction. The foundation model within the agent picks one or several external or custom tools based on the prompts submitted by the end user. The agent framework then uses a process called tool calling, which is also referred to as function calling, to search for information from multiple sources and generate a response.

For example, a flight reservation tool might need to collect the following information, and then create a reservation:

  • Source and destination locations
  • Number of passengers
  • Travel date
  • Price range

The order in which the information is collected might matter for some flights, where the number of available seats is limited, or where the prices are within the requested range. The agent processes all the user inputs and the underlying foundation model determines when to call additional tools, such as a search engine that finds an airline that provides frequent service between the source and destination locations, before the agent completes a reservation request.

Building an agent to automate generative AI tasks

To build an AI agent, complete the following steps:

  1. From the watsonx.ai home page, choose a project, and then click the New asset > Solve complex AI tasks using tools tile.

  2. Select a foundation model and optionally update model parameters. For details, see Foundation model configuration.

  3. To set up your agent, specify a name for the agent and describe the tasks the agent performs.

  4. Optional: Select an icon and background image to customize how your agent appears in the Agent Preview pane.

  5. Select the AI agent framework you want to use to create, deploy and, manage your agent.

    Note: Currently, watsonx.ai offers LangGraph as the only framework choice.
  6. Select the architecture that implements agentic AI reasoning.

    Note: Currently, watsonx.ai offers ReAct as the only architecture choice.
  7. Define specific instructions for your agent that is used to create a system prompt for the selected foundation model. The instructions can include using a specific language, date or time format, user greeting, or an external tool as an information source instead of a foundation model's knowledge base.

  8. Configure one or more external tools that the agent framework can invoke to compose a response. Select tools from a list of provided tools or create your own custom tool. For details, see Tools configuration.

  9. Optional: Add some sample questions that the end user can use to start interacting with the agent.

  10. Test your agent in the Agent preview pane to make sure the agent generates the correct result by using a combination of the foundation model and the relevant tools.

  11. To preserve your work so that you can reuse or share an agent with collaborators in the current project, save your work as a project asset. For details, see Saving agents. Alternatively, you can deploy your agent as an AI service in a deployment space. For details, see Deploying AI services with tools.

Agent configuration options

You can customise the foundation model and tools that your agent uses to make decisions, take actions, and interact with external environments.

Foundation model configuration

When you build an agentic workflow, choose a foundation model that meets the following requirements:

  • Handles chat tasks
  • Supports tool calling
  • Responds well to chain-of-thought prompting techniques and chooses the next action
  • Has a good performance on reasoning benchmarks

To control how the model generates output, you can specify the following parameters:

Frequency penalty
If the generated output for your chosen prompt, model, and parameters consistently contains text that appears multiple times, you can try adding a frequency penalty. When set, the penalty lowers the probability scores of tokens that were used multiple times so that the model is less likely to repeat them. A higher value leads to more diverse and varied output.
Supported values: Floating-point number in the range -2.0 (no penalty) to 2.0 (maximum penalty)
Default value: 0.0
Use: The higher the penalty, the less likely it is that the result will include text that has appeared frequently in the interaction so far.
Presence penalty
If the generated output for your chosen prompt, model, and parameters contains text that has appeared earlier in the interaction, you can try adding a presence penalty. When set, the penalty lowers the probability scores of tokens that were already used so that the model is less likely to repeat them. A higher value leads to more diverse and varied output.
Supported values: Floating-point number in the range -2.0 (no penalty) to 2.0 (maximum penalty)
Default value: 0.0
Use: The higher the penalty, the less likely it is that the result will include text that has already appeared in the interaction so far.
Temperature
A sampling technique that the model uses to select the tokens in the generated output by flattening or sharpening the probability distribution over the tokens to be sampled.
Top P (nucleus sampling)
A sampling technique that the model uses to select the tokens in the generated output by sampling tokens with the highest probability scores until the sum of the scores reaches the specified threshold value.
Maximum new tokens
The Max tokens parameter controls the maximum number of tokens in the generated output. The maximum number of tokens that are allowed in the output differs by model. For details, see the Maximum tokens information in Supported foundation models.

Tools configuration

You can configure your agent to use one or more external tools to retrieve additional information to ground prompts submitted to the foundation model to generate a response.

You can choose from a list of provided tools or create your own custom tool to process specialized inputs and generate a specific result. For details, see Creating a custom tool.

You can also update the configuration for the tools by clicking the Configure icon Configure. Some examples of how to customize tools are as follows:

Learn more

Parent topic: Developing generative AI solutions