API Agent overview

An overview of the API Agent user interface and its key components.

This page assumes you have already logged into API Agent. If you need help logging in, see Getting started.
Note: The actual look and feel of the images might differ slightly because updates are made regularly. Additionally, local Visual Studio Code themes and UI customizations can affect the appearance.

Connection details

After you log in, you can view your connection details at the upper-left bar. You can click on the text to the left of AI to access more specific information, which includes the API Connect management URL and your provider organization.

Screenshot of upper left bar

Screenshot of connection details

New chat

  1. Click the IBM API Agent menu and select New chat to start a new session.

    Screenshot of API Agent menu

  2. Select a provider organization. You must already be a member of this organization, and the API Agent must be enabled there for you. This allows you to use the API Agent.

    Screenshot of new chat in API Agent

  3. Click Continue. A welcome message is displayed.

    Screenshot of welcome message in API Agent
  4. In the Type something field, enter text to start interacting with API Agent.

Plan

After you input a command, the API Agent displays or runs a plan, which is a series of tools each with its corresponding arguments, that is designed to fulfill the user request.
  • Plans that do not modify the system (read-only operations) are executed automatically and do not require user approval.
  • Plans that modify the system state (such as creating, updating, or deleting resources) requires explicit user approval before execution.

The following example shows the plan for user message of create test cases for the petstore api and run the test cases.

Screenshot of example of pet store API and run cases

Viewing and editing the plan

After a plan is displayed, you can view and modify the suggestions for each tool. If the default suggestions that are provided by the API Agent are satisfactory, you can approve them and continue.

To make any changes, select Edit plan to open the Edit plan window, where you can make changes to the values.

Screenshot of edit option in example of pet store API and run cases

Approval

User approval is required to execute any tool that makes changes to the system state. These tools cannot be run without explicit user consent.

Understanding responses

Each response is a result that is displayed for the execution of a single tool. It includes a summary, expand the arrow option to view a detailed system response.

After you click Approve, the tool runs, and displays a response. The following is an example of a successful run.

Errors

If your prompt requests an action that the API Agent cannot perform because the system lacks the appropriate set of tools for the request. The API Agent states that the request cannot be completed with the current tools. It will then list the available tools and their brief descriptions. Any other errors are execution errors of the tools. In such cases, the API Agent provides a summary of the error that was encountered during the tool's run time.

Screenshot of prompt show weather for San Jose in API agent

Aborting

You have the option to disregard the generated plan and initiate another request. If you choose to do so, the previous prompt and action are disregarded.

Screenshot of prompt list published APIs in API Agent

Commands

You can run some of the available tools directly by using /commands. If you start typing forward slash (/), you can view the list of available commands.

Screenshot of available commands in API agent

To pass parameters, you have to give values in key:value format. Space is allowed before value, which makes it easier to specify file to upload. The following is an example of using /command.

Screenshot of example for key:value format

Uploading and downloading files

Some commands need files to be uploaded. The file must be in your Visual Studio Code workspace for uploading.

Screenshot of file icon to upload file

Entering @ in the Type something field displays a list of available files. As you input characters, the list is filtered accordingly. You can select a file at any point during this process.

Screenshot of files listed after typing @ in the type something field

Where the @file name is listed, you can upload a file from the local workspace.

Whenever api_name is mentioned, you can use it with id, name:version, or the name of a draft API. Using just the name is acceptable as long as there is only one draft API with that specific name. However, using the title of an API is not permissible. The same guidelines apply when product_name is mentioned.

Some commands allow you to download files from the response, which is indicated by a download icon.

Screenshot of download icon under the downloadable file in chat