---
title: "PUT /agents/{agentId}/agentversions/{agentVersion}/actiongroups/"
method: PUT
path: "/agents/{agentId}/agentversions/{agentVersion}/actiongroups/"
---

# PUT /agents/{agentId}/agentversions/{agentVersion}/actiongroups/

`PUT /agents/{agentId}/agentversions/{agentVersion}/actiongroups/`

Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.

To allow your agent to request the user for additional information when trying to complete a task, add an action group with the `parentActionGroupSignature` field set to `AMAZON.UserInput`.

To allow your agent to generate, run, and troubleshoot code when trying to complete a task, add an action group with the `parentActionGroupSignature` field set to `AMAZON.CodeInterpreter`.

You must leave the `description`, `apiSchema`, and `actionGroupExecutor` fields blank for this action group. During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an [Observation](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html) reprompting the user for more information.

## Path parameters

- `agentId` string, required
- `agentVersion` string, required

## Request body

- object
  - `actionGroupName` string, required — The name to give the action group.
  - `clientToken` string — A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.
  - `description` string — A description of the action group.
  - `parentActionGroupSignature` 'AMAZON.UserInput' | 'AMAZON.CodeInterpreter' | 'ANTHROPIC.Computer' | 'ANTHROPIC.Bash' | 'ANTHROPIC.TextEditor' — <p>Specify a built-in or computer use action for this action group. If you specify a value, you must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields empty for this action group. </p> <ul> <li> <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. </p> </li> <li> <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>.</p> </li> <li> <p>To allow your agent to use an Anthropic computer use tool, specify one of the following values. </p> <important> <p> Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. When operating computer use functionality, we recommend taking additional security precautions, such as executing computer actions in virtual environments with restricted data access and limited internet connectivity. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>. </p> </important> <ul> <li> <p> <code>ANTHROPIC.Computer</code> - Gives the agent permission to use the mouse and keyboard and take screenshots.</p> </li> <li> <p> <code>ANTHROPIC.TextEditor</code> - Gives the agent permission to view, create and edit files.</p> </li> <li> <p> <code>ANTHROPIC.Bash</code> - Gives the agent permission to run commands in a bash shell.</p> </li> </ul> </li> </ul>
  - `parentActionGroupSignatureParams` object — <p>The configuration settings for a computer use action.</p> <important> <p> Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>. </p> </important>
  - `actionGroupExecutor` object — Contains details about the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.
    - `lambda` string — The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
    - `customControl` 'RETURN_CONTROL' — To return the action group invocation results directly in the <code>InvokeAgent</code> response, specify <code>RETURN_CONTROL</code>.
  - `apiSchema` object — Contains details about the OpenAPI schema for the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>. You can either include the schema directly in the <code>payload</code> field or you can upload it to an S3 bucket and specify the S3 bucket location in the <code>s3</code> field.
    - `s3` object — Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>.
      - `s3BucketName` string — The name of the S3 bucket.
      - `s3ObjectKey` string — The S3 object key for the S3 resource.
    - `payload` string, password — The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>.
  - `actionGroupState` 'ENABLED' | 'DISABLED' — Specifies whether the action group is available for the agent to invoke or not when sending an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request.
  - `functionSchema` object — <p>Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_RequestSyntax">CreateAgentActionGroup request</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html#API_agent_CreateAgentActionGroup_ResponseSyntax">CreateAgentActionGroup response</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_RequestSyntax">UpdateAgentActionGroup request</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html#API_agent_UpdateAgentActionGroup_ResponseSyntax">UpdateAgentActionGroup response</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_GetAgentActionGroup.html#API_agent_GetAgentActionGroup_ResponseSyntax">GetAgentActionGroup response</a> </p> </li> </ul>
    - `functions` Function[] — A list of functions that each define an action in the action group.
      - `name` string, required — A name for the function.
      - `description` string — A description of the function and its purpose.
      - `parameters` object — The parameters that the agent elicits from the user to fulfill the function.
      - `requireConfirmation` 'ENABLED' | 'DISABLED' — Contains information if user confirmation is required to invoke the function.

## Response `200`

Success

- CreateAgentActionGroupResponse
  - `agentActionGroup` object, required — Contains details about the action group that was created.
    - `agentId` string, required — The unique identifier of the agent to which the action group belongs.
    - `agentVersion` string, required — The version of the agent to which the action group belongs.
    - `actionGroupId` string, required — The unique identifier of the action group.
    - `actionGroupName` string, required — The name of the action group.
    - `clientToken` string — A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.
    - `description` string — The description of the action group.
    - `createdAt` string, date-time, required — The time at which the action group was created.
    - `updatedAt` string, date-time, required — The time at which the action group was last updated.
    - `parentActionSignature` 'AMAZON.UserInput' | 'AMAZON.CodeInterpreter' | 'ANTHROPIC.Computer' | 'ANTHROPIC.Bash' | 'ANTHROPIC.TextEditor' — <p>If this field is set as <code>AMAZON.UserInput</code>, the agent can request the user for additional information when trying to complete a task. The <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields must be blank for this action group.</p> <p>During orchestration, if the agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html">Observation</a> reprompting the user for more information.</p>
    - `parentActionGroupSignatureParams` object — <p>The configuration settings for a computer use action.</p> <important> <p> Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>. </p> </important>
    - `actionGroupExecutor` object — The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.
      - `lambda` string — The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
      - `customControl` 'RETURN_CONTROL' — To return the action group invocation results directly in the <code>InvokeAgent</code> response, specify <code>RETURN_CONTROL</code>.
    - `apiSchema` object — Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>.
      - `s3` object — Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>.
        - `s3BucketName` string — The name of the S3 bucket.
        - `s3ObjectKey` string — The S3 object key for the S3 resource.
      - `payload` string, password — The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html">Action group OpenAPI schemas</a>.
    - `functionSchema` object — Defines functions that each define parameters that the agent needs to invoke from the user. Each function represents an action in an action group.
      - `functions` Function[] — A list of functions that each define an action in the action group.
        - `name` string, required — A name for the function.
        - `description` string — A description of the function and its purpose.
        - `parameters` object — The parameters that the agent elicits from the user to fulfill the function.
        - `requireConfirmation` 'ENABLED' | 'DISABLED' — Contains information if user confirmation is required to invoke the function.
    - `actionGroupState` 'ENABLED' | 'DISABLED', required — Specifies whether the action group is available for the agent to invoke or not when sending an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html">InvokeAgent</a> request.

## Other responses

- `480` — ThrottlingException
- `481` — AccessDeniedException
- `482` — ValidationException
- `483` — InternalServerException
- `484` — ResourceNotFoundException
- `485` — ConflictException
- `486` — ServiceQuotaExceededException

---

[API](https://skmtc.net/aws/apis/bedrock-agent.md) · [All operations](https://skmtc.net/aws/apis/bedrock-agent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-agent/versions/a3b2356f17da/schema)
