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, 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, you can view the following information:

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 the agent configuration
  1. Sign in to the AWS Management Console, 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. In the Agent overview section, choose Edit.

  4. Edit the existing information in the fields as necessary.

  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 banner.

You might want to try different foundation models for your agent or change the instructions for the agent. These changes apply only to the working draft.

To change the foundation model that your agent uses or the instructions to the agent.
  1. Sign in to the AWS Management Console, 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. On the agent details page, for the Working draft section, choose the working draft.

  5. In the Model details section, choose Edit

  6. Select a different model or edit the instructions to the agent as necessary.

    Note

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

  7. 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.

  8. To apply the changes that you made to the agent before testing it, choose Prepare in the Test window or at the top of the Working draft page.

To edit the tags associated with an agent
  1. Sign in to the AWS Management Console, 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, 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.