

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Tentukan alat penggunaan komputer untuk agen dalam grup tindakan
<a name="agent-computer-use-create-action-group"></a>

 Anda dapat menentukan alat yang tersedia untuk agen dalam operasi [CreateAgentActionGroup](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_CreateAgentActionGroup.html)atau [UpdateAgentActionGroup](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_UpdateAgentActionGroup.html)API. Untuk agen inline, Anda menentukan alat dalam operasi [InvokeInlineAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeInlineAgent.html)API. 

Di parentActionGroup Tanda tangan grup tindakan, Anda menentukan jenis alat dari nilai berikut:
+ Anthropic.komputer
+ ANTROPIK. TextEditor 
+ antropik.bash

Contoh kode berikut menunjukkan cara membuat grup tindakan yang menentukan `ANTHROPIC.Computer` alat untuk penggunaan agen.

```
def create_agent_action_group(client, agent_id, agent_version):
"""
Creates an action group that specifies the ANTHROPIC.Computer tool for the agent. 

Args:
    client: Boto3 bedrock-agent client
    agent_id (str): ID of the agent
    agent_version (str): Version of the agent

Returns:
    dict: Response from create_agent_action_group API call
"""
try:
    response = client.create_agent_action_group(
        agentId=agent_id,
        agentVersion=agent_version,
        actionGroupName="my_computer",
        actionGroupState="ENABLED",
        parentActionGroupSignature="ANTHROPIC.Computer",
        parentActionGroupSignatureParams={
            "type": "computer_20241022"
        }
    )
    return response
except ClientError as e:
    print(f"Error: {e}")
```