Use the API Agent chat interface to
run prompts and automate API tasks such as generating specifications, reviewing security, and
managing artifacts.
About this task
Use the API Agent
chat interface to automate API development tasks with natural language prompts. Use prompts to
generate OpenAPI specifications, create DataPower assemblies, policies, and reduce manual
effort.
The API Agent chat
interface is available in the following form factors:
- Web-based or API Manager
UI
- Visual Studio Code
- IBM API Studio desktop
version
These form factors differ in functionality:
- Visual Studio Code supports command-based automation, file-level operations by using
@filename, and MCP server setup.
- IBM API Studio focuses on
project-based workflows with a richer UI for managing projects and artifacts. It does not support
Visual Studio Code-specific commands such as MCP server.
To know more details about which platform supports which tools, see Tools compatibility.
Procedure
-
Log in to API Manager or
open IBM API Studio desktop
version.
- To use IBM API Studio
in API Manager UI, click the
API Studio icon in the left panel.
- On the top right corner of the window, click
to open the API Agent chat
interface.
- In the chat interface, select the instances from Select an API
Manager.
- From the Provider organization options, select the provider
organization, and then click Continue.
Note: Steps 4 and 5 apply only when you use the IBM API Studio desktop version. In
step 5, API Agent shows
the list of provider organizations for the instance that you selected in step 4. If you use IBM API Studio within API Manager, you do not need to
select a provider organization because you are already in a provider organization within an
instance.
- Optional: In the API Agent chat interface,
use the Main menu
to view the list of sample prompts.
- To create a new project, click New API project +.
- Enter a project name in the Project name field and click
Create.
Note: You can create project from repository or local folder or native storage. You can also import
a file.
- Click the project that you created, and click
.
- In the API Agent chat interface,
enter the prompts to receive a response from API Agent.
For example, in the
Type something field, enter the
following prompts, and then click
Send:
To create a YAML file and generate
an API inside a project.
Generate an OpenAPI spec for a user
Note: The API Agent in
API Manager offers a similar
experience to Visual Studio Code. For example, it generates an OpenAPI document that you can
download and use. However, to complete studio-specific actions such as opening the generated API
within a project you must provide prompts in IBM API Studio.
- In the displayed plan, click Start. The API Agent generates an API
inside the project.
- Click the source view to see the specification file that is
generated by API Agent and the kind file that is generated by IBM API Studio. Both files are linked
for your reference.
- If you are not inside the project, the API Agent displays the
API location options to select a project.
- From the API Location list, select the project, and click
Continue.
- To create a DataPower assembly that is linked to an API file, enter the following prompt,
and click Send:
Create a datapower assembly with a log policy for the API <api name>
Note: If you face any issues when trying to enter prompts from one UI page to another, see
Troubleshooting.
- On the displayed plan, click Start.
- Click the source view to see the DataPower assembly file generated
by API Agent.
- To publish the project, enter the following prompt, and then click
Send:
publish project <project name>