AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Bedrock::Agent

CfnAgent

Specifies an agent as a resource in a top-level template. Minimally, you must specify the following properties:. - AgentName – Specify a name for the agent. - AgentResourceRoleArn – Specify the Amazon Resource Name (ARN) of the service role with permissions to invoke API operations on the agent. For more information, see [Create a service role for Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-permissions.html) . - FoundationModel – Specify the model ID of a foundation model to use when invoking the agent. For more information, see [Supported regions and models for Agents for Amazon Bedrock](https://docs.aws.amazon.com//bedrock/latest/userguide/agents-supported.html) . For more information about using agents in Amazon Bedrock , see [Agents for Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/agents.html) . See the *Properties* section below for descriptions of both the required and optional properties.

Import

import { CfnAgent } from 'aws-cdk-lib/aws-bedrock';

Or use the module namespace:

import * as bedrock from 'aws-cdk-lib/aws-bedrock';
// bedrock.CfnAgent

Properties

Configuration passed to the constructor as CfnAgentProps.

agentNameRequired
string

The name of the agent.

actionGroupsOptional
IResolvable | IResolvable | AgentActionGroupProperty[]

The action groups that belong to an agent.

agentCollaborationOptional
string

The agent's collaboration settings.

agentCollaboratorsOptional
IResolvable | IResolvable | AgentCollaboratorProperty[]

List of Agent Collaborators.

agentResourceRoleArnOptional
string

The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.

autoPrepareOptional
boolean | IResolvable

Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent. The `DRAFT` version can be continually iterated upon during internal development. By default, this value is `false` .

Default: - false

customerEncryptionKeyArnOptional
string

The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.

customOrchestrationOptional
IResolvable | CustomOrchestrationProperty

Contains custom orchestration configurations for the agent.

descriptionOptional
string

The description of the agent.

foundationModelOptional
string

The foundation model used for orchestration by the agent.

guardrailConfigurationOptional
IResolvable | GuardrailConfigurationProperty

Details about the guardrail associated with the agent.

idleSessionTtlInSecondsOptional
number

The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent. A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.

instructionOptional
string

Instructions that tell the agent what it should do and how it should interact with users.

knowledgeBasesOptional
IResolvable | IResolvable | AgentKnowledgeBaseProperty[]

The knowledge bases associated with the agent.

memoryConfigurationOptional
IResolvable | MemoryConfigurationProperty

Contains memory configuration for the agent.

orchestrationTypeOptional
string

Specifies the orchestration strategy for the agent.

promptOverrideConfigurationOptional
IResolvable | PromptOverrideConfigurationProperty

Contains configurations to override prompt templates in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html) .

skipResourceInUseCheckOnDeleteOptional
boolean | IResolvable

Specifies whether to delete the resource even if it's in use. By default, this value is `false` .

Default: - false

tagsOptional
{ [key: string]: string }

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions) - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)

testAliasTagsOptional
{ [key: string]: string } | IResolvable

Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions) - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter