翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
アクショングループ内のエージェントのコンピュータ使用ツールを指定する
CreateAgentActionGroup または UpdateAgentActionGroup API オペレーションで、エージェントが使用できるツールを指定できます。インラインエージェントの場合は、InvokeInlineAgent API オペレーションで ツールを指定します。
アクショングループの parentActionGroupSignature で、次の値からツールタイプを指定します。
-
ANTHROPIC.Computer
-
ANTHROPIC.TextEditor
-
ANTHROPIC.Bash
次のコード例は、エージェント用にANTHROPIC.Computer
ツールを指定するアクショングループを作成する方法を示しています。
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}")