agents
Creates, updates, deletes or gets an agent resource or lists agents in a region
Overview
| Name | agents |
| Type | Resource |
| Description | Definition of AWS::Bedrock::Agent Resource Type |
| Id | awscc.bedrock.agents |
Fields
| Name | Datatype | Description |
|---|---|---|
action_groups | array | List of ActionGroups |
agent_arn | string | Arn representation of the Agent. |
agent_id | string | Identifier for a resource. |
agent_name | string | Name for a resource. |
agent_resource_role_arn | string | ARN of a IAM role. |
agent_status | string | Schema Type for Action APIs. |
agent_version | string | Draft Agent Version. |
auto_prepare | boolean | Specifies whether to automatically prepare after creating or updating the agent. |
created_at | string | Time Stamp. |
custom_orchestration | object | Structure for custom orchestration |
customer_encryption_key_arn | string | A KMS key ARN |
skip_resource_in_use_check_on_delete | boolean | Specifies whether to allow deleting agent while it is in use. |
description | string | Description of the Resource. |
failure_reasons | array | Failure Reasons for Error. |
foundation_model | string | ARN or name of a Bedrock model. |
guardrail_configuration | object | Configuration for a guardrail |
memory_configuration | object | Configuration for memory storage |
idle_session_ttl_in_seconds | number | Max Session Time. |
agent_collaboration | string | Agent collaboration state |
instruction | string | Instruction for the agent. |
knowledge_bases | array | List of Agent Knowledge Bases |
agent_collaborators | array | List of Agent Collaborators |
orchestration_type | string | Types of orchestration strategy for agents |
prepared_at | string | Time Stamp. |
prompt_override_configuration | object | Configuration for prompt override. |
recommended_actions | array | The recommended actions users can take to resolve an error in failureReasons. |
tags | object | A map of tag keys and values |
updated_at | string | Time Stamp. |
region | string | AWS region. |
For more information, see AWS::Bedrock::Agent.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | AgentName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all properties from an individual agent.
SELECT
region,
action_groups,
agent_arn,
agent_id,
agent_name,
agent_resource_role_arn,
agent_status,
agent_version,
auto_prepare,
created_at,
custom_orchestration,
customer_encryption_key_arn,
skip_resource_in_use_check_on_delete,
description,
failure_reasons,
foundation_model,
guardrail_configuration,
memory_configuration,
idle_session_ttl_in_seconds,
agent_collaboration,
instruction,
knowledge_bases,
agent_collaborators,
orchestration_type,
prepared_at,
prompt_override_configuration,
recommended_actions,
tags,
test_alias_tags,
updated_at
FROM awscc.bedrock.agents
WHERE region = 'us-east-1' AND data__Identifier = '<AgentId>';
INSERT example
Use the following StackQL query and manifest file to create a new agent resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.bedrock.agents (
AgentName,
region
)
SELECT
'{{ AgentName }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.bedrock.agents (
ActionGroups,
AgentName,
AgentResourceRoleArn,
AutoPrepare,
CustomOrchestration,
CustomerEncryptionKeyArn,
SkipResourceInUseCheckOnDelete,
Description,
FoundationModel,
GuardrailConfiguration,
MemoryConfiguration,
IdleSessionTTLInSeconds,
AgentCollaboration,
Instruction,
KnowledgeBases,
AgentCollaborators,
OrchestrationType,
PromptOverrideConfiguration,
Tags,
TestAliasTags,
region
)
SELECT
'{{ ActionGroups }}',
'{{ AgentName }}',
'{{ AgentResourceRoleArn }}',
'{{ AutoPrepare }}',
'{{ CustomOrchestration }}',
'{{ CustomerEncryptionKeyArn }}',
'{{ SkipResourceInUseCheckOnDelete }}',
'{{ Description }}',
'{{ FoundationModel }}',
'{{ GuardrailConfiguration }}',
'{{ MemoryConfiguration }}',
'{{ IdleSessionTTLInSeconds }}',
'{{ AgentCollaboration }}',
'{{ Instruction }}',
'{{ KnowledgeBases }}',
'{{ AgentCollaborators }}',
'{{ OrchestrationType }}',
'{{ PromptOverrideConfiguration }}',
'{{ Tags }}',
'{{ TestAliasTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: agent
props:
- name: ActionGroups
value:
- ActionGroupName: '{{ ActionGroupName }}'
Description: '{{ Description }}'
ParentActionGroupSignature: '{{ ParentActionGroupSignature }}'
ActionGroupExecutor: null
ApiSchema: null
ActionGroupState: '{{ ActionGroupState }}'
FunctionSchema:
Functions:
- Name: '{{ Name }}'
Description: '{{ Description }}'
Parameters: {}
RequireConfirmation: '{{ RequireConfirmation }}'
SkipResourceInUseCheckOnDelete: '{{ SkipResourceInUseCheckOnDelete }}'
- name: AgentName
value: '{{ AgentName }}'
- name: AgentResourceRoleArn
value: '{{ AgentResourceRoleArn }}'
- name: AutoPrepare
value: '{{ AutoPrepare }}'
- name: CustomOrchestration
value:
Executor:
Lambda: '{{ Lambda }}'
- name: CustomerEncryptionKeyArn
value: '{{ CustomerEncryptionKeyArn }}'
- name: SkipResourceInUseCheckOnDelete
value: '{{ SkipResourceInUseCheckOnDelete }}'
- name: Description
value: '{{ Description }}'
- name: FoundationModel
value: '{{ FoundationModel }}'
- name: GuardrailConfiguration
value:
GuardrailIdentifier: '{{ GuardrailIdentifier }}'
GuardrailVersion: '{{ GuardrailVersion }}'
- name: MemoryConfiguration
value:
EnabledMemoryTypes:
- '{{ EnabledMemoryTypes[0] }}'
StorageDays: null
SessionSummaryConfiguration:
MaxRecentSessions: null
- name: IdleSessionTTLInSeconds
value: null
- name: AgentCollaboration
value: '{{ AgentCollaboration }}'
- name: Instruction
value: '{{ Instruction }}'
- name: KnowledgeBases
value:
- KnowledgeBaseId: '{{ KnowledgeBaseId }}'
Description: '{{ Description }}'
KnowledgeBaseState: '{{ KnowledgeBaseState }}'
- name: AgentCollaborators
value:
- AgentDescriptor:
AliasArn: '{{ AliasArn }}'
CollaborationInstruction: '{{ CollaborationInstruction }}'
CollaboratorName: '{{ CollaboratorName }}'
RelayConversationHistory: '{{ RelayConversationHistory }}'
- name: OrchestrationType
value: '{{ OrchestrationType }}'
- name: PromptOverrideConfiguration
value:
PromptConfigurations:
- PromptType: '{{ PromptType }}'
PromptCreationMode: '{{ PromptCreationMode }}'
PromptState: '{{ PromptState }}'
BasePromptTemplate: '{{ BasePromptTemplate }}'
InferenceConfiguration:
Temperature: null
TopP: null
TopK: null
MaximumLength: null
StopSequences:
- '{{ StopSequences[0] }}'
ParserMode: null
FoundationModel: null
AdditionalModelRequestFields: {}
OverrideLambda: '{{ OverrideLambda }}'
- name: Tags
value: {}
- name: TestAliasTags
value: null
DELETE example
/*+ delete */
DELETE FROM awscc.bedrock.agents
WHERE data__Identifier = '<AgentId>'
AND region = 'us-east-1';
Permissions
To operate on the agents resource, the following permissions are required:
Create
bedrock:CreateAgent,
bedrock:GetAgent,
bedrock:PrepareAgent,
bedrock:GetAgentKnowledgeBase,
bedrock:AssociateAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:CreateAgentActionGroup,
bedrock:GetAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:TagResource,
bedrock:ListTagsForResource,
bedrock:CreateGuardrail,
bedrock:CreateGuardrailVersion,
bedrock:GetGuardrail,
bedrock:AssociateAgentCollaborator,
bedrock:GetAgentCollaborator,
bedrock:ListAgentCollaborators,
iam:PassRole,
kms:GenerateDataKeyWithoutPlainText,
kms:ReEncryptFrom,
kms:ReEncryptTo,
kms:Decrypt,
kms:GenerateDataKey
Read
bedrock:GetAgent,
bedrock:GetAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:GetAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:ListTagsForResource,
bedrock:GetGuardrail,
bedrock:GetAgentCollaborator,
bedrock:ListAgentCollaborators,
kms:Decrypt,
kms:GenerateDataKey,
kms:Encrypt
Update
bedrock:GetAgent,
bedrock:UpdateAgent,
bedrock:PrepareAgent,
bedrock:GetAgentKnowledgeBase,
bedrock:UpdateAgentKnowledgeBase,
bedrock:AssociateAgentKnowledgeBase,
bedrock:DisassociateAgentKnowledgeBase,
bedrock:ListAgentKnowledgeBases,
bedrock:CreateAgentActionGroup,
bedrock:GetAgentActionGroup,
bedrock:UpdateAgentActionGroup,
bedrock:DeleteAgentActionGroup,
bedrock:ListAgentActionGroups,
bedrock:TagResource,
bedrock:UntagResource,
bedrock:ListTagsForResource,
bedrock:UpdateGuardrail,
bedrock:GetGuardrail,
bedrock:AssociateAgentCollaborator,
bedrock:GetAgentCollaborator,
bedrock:ListAgentCollaborators,
bedrock:DisassociateAgentCollaborator,
bedrock:UpdateAgentCollaborator,
kms:Decrypt,
kms:Encrypt,
kms:GenerateDataKey,
kms:GenerateDataKeyWithoutPlainText,
kms:ReEncryptFrom,
kms:ReEncryptTo,
iam:PassRole
Delete
bedrock:GetAgent,
bedrock:DeleteAgent,
bedrock:DeleteGuardrail,
bedrock:GetGuardrail,
kms:Decrypt,
kms:Encrypt,
kms:GenerateDataKey
List
bedrock:ListAgents,
bedrock:ListGuardrails