Manage an Amazon Bedrock agent - Amazon Bedrock

Manage an Amazon Bedrock agent

After you create an agent, you can view or update its configuration as required. The configuration applies to the working draft. If you no longer need an agent, you can delete it.

View information about an agent

To learn how to view information about an agent, select the tab corresponding to your method of choice and follow the steps.

Console
To view information about an agent
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. Select Agents from the left navigation pane. Then, choose an agent in the Agents section.

  3. On the agent details page, you can see configurations that apply to all versions of the agent, associated tags, and its versions and aliases.

  4. To see details about the working draft of the agent, choose Edit in Agent builder.

API

To get information about an agent, send a GetAgent request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and specify the agentId. See code examples.

To list information about your agents, send a ListAgents request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint. See code examples. You can specify the following optional parameters:

Field Short description
maxResults The maximum number of results to return in a response.
nextToken If there are more results than the number you specified in the maxResults field, the response returns a nextToken value. To see the next batch of results, send the nextToken value in another request.

To list all the tags for an agent, send a ListTagsForResource request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and include the Amazon Resource Name (ARN) of the agent.

Edit an agent

To learn how to edit an agent, select the tab corresponding to your method of choice and follow the steps.

Console
To edit an agent's configuration or its components
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. Select Agents from the left navigation pane. Then, choose an agent in the Agents section.

  3. Choose Edit in Agent Builder

  4. Edit the existing information in the Agent details section, or choose Add, Edit, or Delete in any of the other subsections and modify as necessary. To edit an action group or knowledge base, select it in the respective section. For more information about the components of the agent that you can edit, see Create an agent in Amazon Bedrock.

    Note

    If you change the foundation model, any prompt templates that you modified will be set to default for that model.

  5. When you're done editing the information, choose Save to remain in the same window or Save and exit to return to the agent details page. A success banner appears at the top. To apply the new configurations to your agent, select Prepare in the test window.

To edit the tags associated with an agent
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. Select Agents from the left navigation pane. Then, choose an agent in the Agents section.

  3. Choose an agent in the Agents section.

  4. In the Tags section, choose Manage tags.

  5. To add a tag, choose Add new tag. Then enter a Key and optionally enter a Value. To remove a tag, choose Remove. For more information, see Tag resources.

  6. When you're done editing tags, choose Submit.

API

To edit an agent, send an UpdateAgent request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint. Because all fields will be overwritten, include both fields that you want to update as well as fields that you want to keep the same. For more information about required and optional fields, see Create an agent in Amazon Bedrock.

To apply the changes to the working draft, send a PrepareAgent request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint. Include the agentId in the request. The changes apply to the DRAFT version, which the TSTALIASID alias points to.

To add tags to an agent, send a TagResource request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and include the Amazon Resource Name (ARN) of the agent. The request body contains a tags field, which is an object containing a key-value pair that you specify for each tag.

To remove tags from an agent, send an UntagResource request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and include the Amazon Resource Name (ARN) of the agent. The tagKeys request parameter is a list containing the keys for the tags that you want to remove.

Delete an agent

To learn how to delete an agent, select the tab corresponding to your method of choice and follow the steps.

Console
To delete an agent
  1. Sign in to the AWS Management Console using an IAM role with Amazon Bedrock permissions, and open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  2. Select Agents from the left navigation pane.

  3. To delete an agent, choose the option button that's next to the agent you want to delete.

  4. A dialog box appears warning you about the consequences of deletion. To confirm that you want to delete the agent, enter delete in the input field and then select Delete.

  5. When deletion is complete, a success banner appears.

API

To delete an agent, send a DeleteAgent request (see link for request and response formats and field details) with an Agents for Amazon Bedrock build-time endpoint and specify the agentId.

By default, the skipResourceInUseCheck parameter is false and deletion is stopped if the resource is in use. If you set skipResourceInUseCheck to true, the resource will be deleted even if the resource is in use.

See code examples

Select a topic to learn about how to manage the action groups or knowledge bases for an agent.