# 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.

Extends: [Construct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Construct.html) › [CfnElement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnElement.html) › [CfnRefElement](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnRefElement.html) › [CfnResource](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnResource.html) › CfnAgent
Implements: [IInspectable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IInspectable.html), [ITaggableV2](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.ITaggableV2.html), [IEnvironmentAware](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.IEnvironmentAware.html), [IAgentRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_bedrock.IAgentRef.html), [IConstruct](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.IConstruct.html), IDependable

- CloudFormation: [`AWS::Bedrock::Agent`](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-bedrock-agent.html)
- Source: Generated at build time
- Type last changed: v2.252.0 · 30 Apr 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';

declare const additionalModelRequestFields: any;
const cfnAgent = new bedrock.CfnAgent(this, 'MyCfnAgent', {
  agentName: 'agentName',

  // the properties below are optional
  actionGroups: [{
    actionGroupName: 'actionGroupName',

    // the properties below are optional
    actionGroupExecutor: {
      customControl: 'customControl',
      lambda: 'lambda',
    },
    actionGroupState: 'actionGroupState',
    apiSchema: {
      payload: 'payload',
      s3: {
        s3BucketName: 's3BucketName',
        s3ObjectKey: 's3ObjectKey',
      },
    },
    description: 'description',
    functionSchema: {
      functions: [{
        name: 'name',

        // the properties below are optional
        description: 'description',
        parameters: {
          parametersKey: {
            type: 'type',

            // the properties below are optional
            description: 'description',
            required: false,
          },
        },
        requireConfirmation: 'requireConfirmation',
      }],
    },
    parentActionGroupSignature: 'parentActionGroupSignature',
    skipResourceInUseCheckOnDelete: false,
  }],
  agentCollaboration: 'agentCollaboration',
  agentCollaborators: [{
    agentDescriptor: {
      aliasArn: 'aliasArn',
    },
    collaborationInstruction: 'collaborationInstruction',
    collaboratorName: 'collaboratorName',

    // the properties below are optional
    relayConversationHistory: 'relayConversationHistory',
  }],
  agentResourceRoleArn: 'agentResourceRoleArn',
  autoPrepare: false,
  customerEncryptionKeyArn: 'customerEncryptionKeyArn',
  customOrchestration: {
    executor: {
      lambda: 'lambda',
    },
  },
  description: 'description',
  foundationModel: 'foundationModel',
  guardrailConfiguration: {
    guardrailIdentifier: 'guardrailIdentifier',
    guardrailVersion: 'guardrailVersion',
  },
  idleSessionTtlInSeconds: 123,
  instruction: 'instruction',
  knowledgeBases: [{
    description: 'description',
    knowledgeBaseId: 'knowledgeBaseId',

    // the properties below are optional
    knowledgeBaseState: 'knowledgeBaseState',
  }],
  memoryConfiguration: {
    enabledMemoryTypes: ['enabledMemoryTypes'],
    sessionSummaryConfiguration: {
      maxRecentSessions: 123,
    },
    storageDays: 123,
  },
  orchestrationType: 'orchestrationType',
  promptOverrideConfiguration: {
    promptConfigurations: [{
      additionalModelRequestFields: additionalModelRequestFields,
      basePromptTemplate: 'basePromptTemplate',
      foundationModel: 'foundationModel',
      inferenceConfiguration: {
        maximumLength: 123,
        stopSequences: ['stopSequences'],
        temperature: 123,
        topK: 123,
        topP: 123,
      },
      parserMode: 'parserMode',
      promptCreationMode: 'promptCreationMode',
      promptState: 'promptState',
      promptType: 'promptType',
    }],

    // the properties below are optional
    overrideLambda: 'overrideLambda',
  },
  skipResourceInUseCheckOnDelete: false,
  tags: {
    tagsKey: 'tags',
  },
  testAliasTags: {
    testAliasTagsKey: 'testAliasTags',
  },
});
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

# additional_model_request_fields: Any

cfn_agent = bedrock.CfnAgent(self, "MyCfnAgent",
    agent_name="agentName",

    # the properties below are optional
    action_groups=[bedrock.CfnAgent.AgentActionGroupProperty(
        action_group_name="actionGroupName",

        # the properties below are optional
        action_group_executor=bedrock.CfnAgent.ActionGroupExecutorProperty(
            custom_control="customControl",
            lambda_="lambda"
        ),
        action_group_state="actionGroupState",
        api_schema=bedrock.CfnAgent.APISchemaProperty(
            payload="payload",
            s3=bedrock.CfnAgent.S3IdentifierProperty(
                s3_bucket_name="s3BucketName",
                s3_object_key="s3ObjectKey"
            )
        ),
        description="description",
        function_schema=bedrock.CfnAgent.FunctionSchemaProperty(
            functions=[bedrock.CfnAgent.FunctionProperty(
                name="name",

                # the properties below are optional
                description="description",
                parameters={
                    "parameters_key": bedrock.CfnAgent.ParameterDetailProperty(
                        type="type",

                        # the properties below are optional
                        description="description",
                        required=False
                    )
                },
                require_confirmation="requireConfirmation"
            )]
        ),
        parent_action_group_signature="parentActionGroupSignature",
        skip_resource_in_use_check_on_delete=False
    )],
    agent_collaboration="agentCollaboration",
    agent_collaborators=[bedrock.CfnAgent.AgentCollaboratorProperty(
        agent_descriptor=bedrock.CfnAgent.AgentDescriptorProperty(
            alias_arn="aliasArn"
        ),
        collaboration_instruction="collaborationInstruction",
        collaborator_name="collaboratorName",

        # the properties below are optional
        relay_conversation_history="relayConversationHistory"
    )],
    agent_resource_role_arn="agentResourceRoleArn",
    auto_prepare=False,
    customer_encryption_key_arn="customerEncryptionKeyArn",
    custom_orchestration=bedrock.CfnAgent.CustomOrchestrationProperty(
        executor=bedrock.CfnAgent.OrchestrationExecutorProperty(
            lambda_="lambda"
        )
    ),
    description="description",
    foundation_model="foundationModel",
    guardrail_configuration=bedrock.CfnAgent.GuardrailConfigurationProperty(
        guardrail_identifier="guardrailIdentifier",
        guardrail_version="guardrailVersion"
    ),
    idle_session_ttl_in_seconds=123,
    instruction="instruction",
    knowledge_bases=[bedrock.CfnAgent.AgentKnowledgeBaseProperty(
        description="description",
        knowledge_base_id="knowledgeBaseId",

        # the properties below are optional
        knowledge_base_state="knowledgeBaseState"
    )],
    memory_configuration=bedrock.CfnAgent.MemoryConfigurationProperty(
        enabled_memory_types=["enabledMemoryTypes"],
        session_summary_configuration=bedrock.CfnAgent.SessionSummaryConfigurationProperty(
            max_recent_sessions=123
        ),
        storage_days=123
    ),
    orchestration_type="orchestrationType",
    prompt_override_configuration=bedrock.CfnAgent.PromptOverrideConfigurationProperty(
        prompt_configurations=[bedrock.CfnAgent.PromptConfigurationProperty(
            additional_model_request_fields=additional_model_request_fields,
            base_prompt_template="basePromptTemplate",
            foundation_model="foundationModel",
            inference_configuration=bedrock.CfnAgent.InferenceConfigurationProperty(
                maximum_length=123,
                stop_sequences=["stopSequences"],
                temperature=123,
                top_k=123,
                top_p=123
            ),
            parser_mode="parserMode",
            prompt_creation_mode="promptCreationMode",
            prompt_state="promptState",
            prompt_type="promptType"
        )],

        # the properties below are optional
        override_lambda="overrideLambda"
    ),
    skip_resource_in_use_check_on_delete=False,
    tags={
        "tags_key": "tags"
    },
    test_alias_tags={
        "test_alias_tags_key": "testAliasTags"
    }
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

Object additionalModelRequestFields;

CfnAgent cfnAgent = CfnAgent.Builder.create(this, "MyCfnAgent")
        .agentName("agentName")

        // the properties below are optional
        .actionGroups(List.of(AgentActionGroupProperty.builder()
                .actionGroupName("actionGroupName")

                // the properties below are optional
                .actionGroupExecutor(ActionGroupExecutorProperty.builder()
                        .customControl("customControl")
                        .lambda("lambda")
                        .build())
                .actionGroupState("actionGroupState")
                .apiSchema(APISchemaProperty.builder()
                        .payload("payload")
                        .s3(S3IdentifierProperty.builder()
                                .s3BucketName("s3BucketName")
                                .s3ObjectKey("s3ObjectKey")
                                .build())
                        .build())
                .description("description")
                .functionSchema(FunctionSchemaProperty.builder()
                        .functions(List.of(FunctionProperty.builder()
                                .name("name")

                                // the properties below are optional
                                .description("description")
                                .parameters(Map.of(
                                        "parametersKey", ParameterDetailProperty.builder()
                                                .type("type")

                                                // the properties below are optional
                                                .description("description")
                                                .required(false)
                                                .build()))
                                .requireConfirmation("requireConfirmation")
                                .build()))
                        .build())
                .parentActionGroupSignature("parentActionGroupSignature")
                .skipResourceInUseCheckOnDelete(false)
                .build()))
        .agentCollaboration("agentCollaboration")
        .agentCollaborators(List.of(AgentCollaboratorProperty.builder()
                .agentDescriptor(AgentDescriptorProperty.builder()
                        .aliasArn("aliasArn")
                        .build())
                .collaborationInstruction("collaborationInstruction")
                .collaboratorName("collaboratorName")

                // the properties below are optional
                .relayConversationHistory("relayConversationHistory")
                .build()))
        .agentResourceRoleArn("agentResourceRoleArn")
        .autoPrepare(false)
        .customerEncryptionKeyArn("customerEncryptionKeyArn")
        .customOrchestration(CustomOrchestrationProperty.builder()
                .executor(OrchestrationExecutorProperty.builder()
                        .lambda("lambda")
                        .build())
                .build())
        .description("description")
        .foundationModel("foundationModel")
        .guardrailConfiguration(GuardrailConfigurationProperty.builder()
                .guardrailIdentifier("guardrailIdentifier")
                .guardrailVersion("guardrailVersion")
                .build())
        .idleSessionTtlInSeconds(123)
        .instruction("instruction")
        .knowledgeBases(List.of(AgentKnowledgeBaseProperty.builder()
                .description("description")
                .knowledgeBaseId("knowledgeBaseId")

                // the properties below are optional
                .knowledgeBaseState("knowledgeBaseState")
                .build()))
        .memoryConfiguration(MemoryConfigurationProperty.builder()
                .enabledMemoryTypes(List.of("enabledMemoryTypes"))
                .sessionSummaryConfiguration(SessionSummaryConfigurationProperty.builder()
                        .maxRecentSessions(123)
                        .build())
                .storageDays(123)
                .build())
        .orchestrationType("orchestrationType")
        .promptOverrideConfiguration(PromptOverrideConfigurationProperty.builder()
                .promptConfigurations(List.of(PromptConfigurationProperty.builder()
                        .additionalModelRequestFields(additionalModelRequestFields)
                        .basePromptTemplate("basePromptTemplate")
                        .foundationModel("foundationModel")
                        .inferenceConfiguration(InferenceConfigurationProperty.builder()
                                .maximumLength(123)
                                .stopSequences(List.of("stopSequences"))
                                .temperature(123)
                                .topK(123)
                                .topP(123)
                                .build())
                        .parserMode("parserMode")
                        .promptCreationMode("promptCreationMode")
                        .promptState("promptState")
                        .promptType("promptType")
                        .build()))

                // the properties below are optional
                .overrideLambda("overrideLambda")
                .build())
        .skipResourceInUseCheckOnDelete(false)
        .tags(Map.of(
                "tagsKey", "tags"))
        .testAliasTags(Map.of(
                "testAliasTagsKey", "testAliasTags"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var additionalModelRequestFields;

var cfnAgent = new CfnAgent(this, "MyCfnAgent", new CfnAgentProps {
    AgentName = "agentName",

    // the properties below are optional
    ActionGroups = new [] { new AgentActionGroupProperty {
        ActionGroupName = "actionGroupName",

        // the properties below are optional
        ActionGroupExecutor = new ActionGroupExecutorProperty {
            CustomControl = "customControl",
            Lambda = "lambda"
        },
        ActionGroupState = "actionGroupState",
        ApiSchema = new APISchemaProperty {
            Payload = "payload",
            S3 = new S3IdentifierProperty {
                S3BucketName = "s3BucketName",
                S3ObjectKey = "s3ObjectKey"
            }
        },
        Description = "description",
        FunctionSchema = new FunctionSchemaProperty {
            Functions = new [] { new FunctionProperty {
                Name = "name",

                // the properties below are optional
                Description = "description",
                Parameters = new Dictionary<string, object> {
                    { "parametersKey", new ParameterDetailProperty {
                        Type = "type",

                        // the properties below are optional
                        Description = "description",
                        Required = false
                    } }
                },
                RequireConfirmation = "requireConfirmation"
            } }
        },
        ParentActionGroupSignature = "parentActionGroupSignature",
        SkipResourceInUseCheckOnDelete = false
    } },
    AgentCollaboration = "agentCollaboration",
    AgentCollaborators = new [] { new AgentCollaboratorProperty {
        AgentDescriptor = new AgentDescriptorProperty {
            AliasArn = "aliasArn"
        },
        CollaborationInstruction = "collaborationInstruction",
        CollaboratorName = "collaboratorName",

        // the properties below are optional
        RelayConversationHistory = "relayConversationHistory"
    } },
    AgentResourceRoleArn = "agentResourceRoleArn",
    AutoPrepare = false,
    CustomerEncryptionKeyArn = "customerEncryptionKeyArn",
    CustomOrchestration = new CustomOrchestrationProperty {
        Executor = new OrchestrationExecutorProperty {
            Lambda = "lambda"
        }
    },
    Description = "description",
    FoundationModel = "foundationModel",
    GuardrailConfiguration = new GuardrailConfigurationProperty {
        GuardrailIdentifier = "guardrailIdentifier",
        GuardrailVersion = "guardrailVersion"
    },
    IdleSessionTtlInSeconds = 123,
    Instruction = "instruction",
    KnowledgeBases = new [] { new AgentKnowledgeBaseProperty {
        Description = "description",
        KnowledgeBaseId = "knowledgeBaseId",

        // the properties below are optional
        KnowledgeBaseState = "knowledgeBaseState"
    } },
    MemoryConfiguration = new MemoryConfigurationProperty {
        EnabledMemoryTypes = new [] { "enabledMemoryTypes" },
        SessionSummaryConfiguration = new SessionSummaryConfigurationProperty {
            MaxRecentSessions = 123
        },
        StorageDays = 123
    },
    OrchestrationType = "orchestrationType",
    PromptOverrideConfiguration = new PromptOverrideConfigurationProperty {
        PromptConfigurations = new [] { new PromptConfigurationProperty {
            AdditionalModelRequestFields = additionalModelRequestFields,
            BasePromptTemplate = "basePromptTemplate",
            FoundationModel = "foundationModel",
            InferenceConfiguration = new InferenceConfigurationProperty {
                MaximumLength = 123,
                StopSequences = new [] { "stopSequences" },
                Temperature = 123,
                TopK = 123,
                TopP = 123
            },
            ParserMode = "parserMode",
            PromptCreationMode = "promptCreationMode",
            PromptState = "promptState",
            PromptType = "promptType"
        } },

        // the properties below are optional
        OverrideLambda = "overrideLambda"
    },
    SkipResourceInUseCheckOnDelete = false,
    Tags = new Dictionary<string, string> {
        { "tagsKey", "tags" }
    },
    TestAliasTags = new Dictionary<string, string> {
        { "testAliasTagsKey", "testAliasTags" }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var additionalModelRequestFields interface{}

cfnAgent := awscdk.Aws_bedrock.NewCfnAgent(this, jsii.String("MyCfnAgent"), &CfnAgentProps{
	AgentName: jsii.String("agentName"),

	// the properties below are optional
	ActionGroups: []interface{}{
		&AgentActionGroupProperty{
			ActionGroupName: jsii.String("actionGroupName"),

			// the properties below are optional
			ActionGroupExecutor: &ActionGroupExecutorProperty{
				CustomControl: jsii.String("customControl"),
				Lambda: jsii.String("lambda"),
			},
			ActionGroupState: jsii.String("actionGroupState"),
			ApiSchema: &APISchemaProperty{
				Payload: jsii.String("payload"),
				S3: &S3IdentifierProperty{
					S3BucketName: jsii.String("s3BucketName"),
					S3ObjectKey: jsii.String("s3ObjectKey"),
				},
			},
			Description: jsii.String("description"),
			FunctionSchema: &FunctionSchemaProperty{
				Functions: []interface{}{
					&FunctionProperty{
						Name: jsii.String("name"),

						// the properties below are optional
						Description: jsii.String("description"),
						Parameters: map[string]interface{}{
							"parametersKey": &ParameterDetailProperty{
								"type": jsii.String("type"),

								// the properties below are optional
								"description": jsii.String("description"),
								"required": jsii.Boolean(false),
							},
						},
						RequireConfirmation: jsii.String("requireConfirmation"),
					},
				},
			},
			ParentActionGroupSignature: jsii.String("parentActionGroupSignature"),
			SkipResourceInUseCheckOnDelete: jsii.Boolean(false),
		},
	},
	AgentCollaboration: jsii.String("agentCollaboration"),
	AgentCollaborators: []interface{}{
		&AgentCollaboratorProperty{
			AgentDescriptor: &AgentDescriptorProperty{
				AliasArn: jsii.String("aliasArn"),
			},
			CollaborationInstruction: jsii.String("collaborationInstruction"),
			CollaboratorName: jsii.String("collaboratorName"),

			// the properties below are optional
			RelayConversationHistory: jsii.String("relayConversationHistory"),
		},
	},
	AgentResourceRoleArn: jsii.String("agentResourceRoleArn"),
	AutoPrepare: jsii.Boolean(false),
	CustomerEncryptionKeyArn: jsii.String("customerEncryptionKeyArn"),
	CustomOrchestration: &CustomOrchestrationProperty{
		Executor: &OrchestrationExecutorProperty{
			Lambda: jsii.String("lambda"),
		},
	},
	Description: jsii.String("description"),
	FoundationModel: jsii.String("foundationModel"),
	GuardrailConfiguration: &GuardrailConfigurationProperty{
		GuardrailIdentifier: jsii.String("guardrailIdentifier"),
		GuardrailVersion: jsii.String("guardrailVersion"),
	},
	IdleSessionTtlInSeconds: jsii.Number(123),
	Instruction: jsii.String("instruction"),
	KnowledgeBases: []interface{}{
		&AgentKnowledgeBaseProperty{
			Description: jsii.String("description"),
			KnowledgeBaseId: jsii.String("knowledgeBaseId"),

			// the properties below are optional
			KnowledgeBaseState: jsii.String("knowledgeBaseState"),
		},
	},
	MemoryConfiguration: &MemoryConfigurationProperty{
		EnabledMemoryTypes: []*string{
			jsii.String("enabledMemoryTypes"),
		},
		SessionSummaryConfiguration: &SessionSummaryConfigurationProperty{
			MaxRecentSessions: jsii.Number(123),
		},
		StorageDays: jsii.Number(123),
	},
	OrchestrationType: jsii.String("orchestrationType"),
	PromptOverrideConfiguration: &PromptOverrideConfigurationProperty{
		PromptConfigurations: []interface{}{
			&PromptConfigurationProperty{
				AdditionalModelRequestFields: additionalModelRequestFields,
				BasePromptTemplate: jsii.String("basePromptTemplate"),
				FoundationModel: jsii.String("foundationModel"),
				InferenceConfiguration: &InferenceConfigurationProperty{
					MaximumLength: jsii.Number(123),
					StopSequences: []*string{
						jsii.String("stopSequences"),
					},
					Temperature: jsii.Number(123),
					TopK: jsii.Number(123),
					TopP: jsii.Number(123),
				},
				ParserMode: jsii.String("parserMode"),
				PromptCreationMode: jsii.String("promptCreationMode"),
				PromptState: jsii.String("promptState"),
				PromptType: jsii.String("promptType"),
			},
		},

		// the properties below are optional
		OverrideLambda: jsii.String("overrideLambda"),
	},
	SkipResourceInUseCheckOnDelete: jsii.Boolean(false),
	Tags: map[string]*string{
		"tagsKey": jsii.String("tags"),
	},
	TestAliasTags: map[string]*string{
		"testAliasTagsKey": jsii.String("testAliasTags"),
	},
})
```

## Initializer

TypeScript:

```ts
new CfnAgent(scope: Construct, id: string, props: CfnAgentProps)
```

Python:

```python
CfnAgent(scope: Construct, id: str, props: CfnAgentProps)
```

Java:

```java
new CfnAgent(Construct scope, String id, CfnAgentProps props)
```

C# / .NET:

```csharp
new CfnAgent(Construct scope, string id, CfnAgentProps props)
```

Golang:

```go
NewCfnAgent(Scope Construct, Id *string, Props CfnAgentProps)
```

## Construct Props

- `actionGroups`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentActionGroupProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentActionGroupProperty.html)[] — The action groups that belong to an agent.

- `agentCollaboration`: string — The agent's collaboration settings.

- `agentCollaborators`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentCollaboratorProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentCollaboratorProperty.html)[] — List of Agent Collaborators.

- `agentName`: string (required) — The name of the agent.

- `agentResourceRoleArn`: string — The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.

- `autoPrepare`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) = false — 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` .

- `customerEncryptionKeyArn`: string — The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.

- `customOrchestration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.CustomOrchestrationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.CustomOrchestrationProperty.html) — Contains custom orchestration configurations for the agent.

- `description`: string — The description of the agent.

- `foundationModel`: string — The foundation model used for orchestration by the agent.

- `guardrailConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.GuardrailConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.GuardrailConfigurationProperty.html) — Details about the guardrail associated with the agent.

- `idleSessionTtlInSeconds`: 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.

- `instruction`: string — Instructions that tell the agent what it should do and how it should interact with users.

- `knowledgeBases`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentKnowledgeBaseProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentKnowledgeBaseProperty.html)[] — The knowledge bases associated with the agent.

- `memoryConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.MemoryConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.MemoryConfigurationProperty.html) — Contains memory configuration for the agent.

- `orchestrationType`: string — Specifies the orchestration strategy for the agent.

- `promptOverrideConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.PromptOverrideConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.PromptOverrideConfigurationProperty.html) — 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) .

- `skipResourceInUseCheckOnDelete`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) = false — Specifies whether to delete the resource even if it's in use.

  By default, this value is `false` .

- `tags`: { [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)

- `testAliasTags`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [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)

## Properties

- `actionGroups`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentActionGroupProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentActionGroupProperty.html)[] — The action groups that belong to an agent.

- `agentCollaboration`: string — The agent's collaboration settings.

- `agentCollaborators`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentCollaboratorProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentCollaboratorProperty.html)[] — List of Agent Collaborators.

- `agentName`: string — The name of the agent.

- `agentRef`: [AgentReference](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_bedrock.AgentReference.html) — A reference to a Agent resource.

- `agentResourceRoleArn`: string — The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.

- `attrAgentArn`: string — The Amazon Resource Name (ARN) of the agent.

- `attrAgentId`: string — The unique identifier of the agent.

- `attrAgentStatus`: string — The status of the agent and whether it is ready for use. The following statuses are possible:.

  - CREATING – The agent is being created.
  - PREPARING – The agent is being prepared.
  - PREPARED – The agent is prepared and ready to be invoked.
  - NOT_PREPARED – The agent has been created but not yet prepared.
  - FAILED – The agent API operation failed.
  - UPDATING – The agent is being updated.
  - DELETING – The agent is being deleted.

- `attrAgentVersion`: string — The version of the agent.

- `attrCreatedAt`: string — The time at which the agent was created.

- `attrFailureReasons`: string[] — Contains reasons that the agent-related API that you invoked failed.

- `attrPreparedAt`: string — The time at which the agent was last prepared.

- `attrRecommendedActions`: string[] — Contains recommended actions to take for the agent-related API that you invoked to succeed.

- `attrUpdatedAt`: string — The time at which the agent was last updated.

- `autoPrepare`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to automatically update the `DRAFT` version of the agent after making changes to the agent.

- `cdkTagManager`: [TagManager](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.TagManager.html) — Tag Manager which manages the tags for this resource.

- `CFN_RESOURCE_TYPE_NAME`: string (static) — The CloudFormation resource type name for this resource class.

- `cfnOptions`: [ICfnResourceOptions](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.ICfnResourceOptions.html) — Options for this resource, such as condition, update policy etc.

- `cfnResourceType`: string — AWS resource type.

- `creationStack`: string[]

- `customerEncryptionKeyArn`: string — The Amazon Resource Name (ARN) of the AWS key that encrypts the agent.

- `customOrchestration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.CustomOrchestrationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.CustomOrchestrationProperty.html) — Contains custom orchestration configurations for the agent.

- `description`: string — The description of the agent.

- `env`: [ResourceEnvironment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html)

- `foundationModel`: string — The foundation model used for orchestration by the agent.

- `guardrailConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.GuardrailConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.GuardrailConfigurationProperty.html) — Details about the guardrail associated with the agent.

- `idleSessionTtlInSeconds`: number — The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.

- `instruction`: string — Instructions that tell the agent what it should do and how it should interact with users.

- `knowledgeBases`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.AgentKnowledgeBaseProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.AgentKnowledgeBaseProperty.html)[] — The knowledge bases associated with the agent.

- `logicalId`: string — The logical ID for this CloudFormation stack element.

  The logical ID of the element
  is calculated from the path of the resource node in the construct tree.

  To override this value, use `overrideLogicalId(newLogicalId)`.

- `memoryConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.MemoryConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.MemoryConfigurationProperty.html) — Contains memory configuration for the agent.

- `node`: [Node](https://docs.aws.amazon.com/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `orchestrationType`: string — Specifies the orchestration strategy for the agent.

- `promptOverrideConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAgent.PromptOverrideConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrock.CfnAgent.PromptOverrideConfigurationProperty.html) — Contains configurations to override prompt templates in different parts of an agent sequence.

- `ref`: string — Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.

  If, by any chance, the intrinsic reference of a resource is not a string, you could
  coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.

- `skipResourceInUseCheckOnDelete`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Specifies whether to delete the resource even if it's in use.

- `stack`: [Stack](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this element is defined.

  CfnElements must be defined within a stack scope (directly or indirectly).

- `tags`: { [key: string]: string } — Metadata that you can assign to a resource as key-value pairs.

  For more information, see the following resources:.

- `testAliasTags`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: string } — Metadata that you can assign to a resource as key-value pairs.

  For more information, see the following resources:.

## Methods

- `addDeletionOverride(path: string): void` — Syntactic sugar for `addOverride(path, undefined)`.

  **Parameters**

  - `path` — The path of the value to delete.

- `addDependency(target: CfnResource): void` — Use `addResourceDependency` instead.

  This method has been renamed to `addResourceDependency` to more clearly
  set it apart from `construct.node.addDependency`. See the documentation
  of that function for more details.

- `addDependsOn(target: CfnResource): void` — Use `addResourceDependency` instead.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method has been renamed to `addResourceDependency`, which makes it
  more clear that this method operates at a different level from the
  construct-level `construct.node.addDependency()` mechanism.

- `addMetadata(key: string, value: any): void` — Add a value to the CloudFormation Resource Metadata.

- `addOverride(path: string, value: any): void` — Adds an override to the synthesized CloudFormation resource.

  To add a
  property override, either use `addPropertyOverride` or prefix `path` with
  "Properties." (i.e. `Properties.TopicName`).

  If the override is nested, separate each nested level using a dot (.) in the path parameter.
  If there is an array as part of the nesting, specify the index in the path.

  To include a literal `.` in the property name, prefix with a `\`. In most
  programming languages you will need to write this as `"\\."` because the
  `\` itself will need to be escaped.

  For example,
  ```typescript
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
  cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
  ```
  would add the overrides
  ```json
  "Properties": {
    "GlobalSecondaryIndexes": [
      {
        "Projection": {
          "NonKeyAttributes": [ "myattribute" ]
          ...
        }
        ...
      },
      {
        "ProjectionType": "INCLUDE"
        ...
      },
    ]
    ...
  }
  ```

  The `value` argument to `addOverride` will not be processed or translated
  in any way. Pass raw JSON values in here with the correct capitalization
  for CloudFormation. If you pass CDK classes or structs, they will be
  rendered with lowercased key names, and CloudFormation will reject the
  template.

  **Parameters**

  - `path` — - The path of the property, you can use dot notation to override values in complex types.
  - `value` — - The value.

- `addPropertyDeletionOverride(propertyPath: string): void` — Adds an override that deletes the value of a property from the resource definition.

  **Parameters**

  - `propertyPath` — The path to the property.

- `addPropertyOverride(propertyPath: string, value: any): void` — Adds an override to a resource property.

  Syntactic sugar for `addOverride("Properties.<...>", value)`.

  **Parameters**

  - `propertyPath` — The path of the property.
  - `value` — The value.

- `addResourceDependency(target: CfnResource, reason?: string): void` — Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

  This can be used for resources across stacks (or nested stack) boundaries
  and the dependency will automatically be transferred to the relevant scope.

  This method only adds dependencies between L1 resources. If you are
  looking for a generic construct-to-construct dependency mechanism that works
  for all constructs including L2s, use `construct.node.addDependency` instead.

- `applyCrossStackReferenceStrength(strength: ReferenceStrength): void` — Sets the cross-stack reference strength for this resource.

  When set, any cross-stack reference to this resource will use the specified
  strength instead of the global default from the consuming stack's context.

  **Parameters**

  - `strength` — - The reference strength to use for this resource.

- `applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void` — Sets the deletion policy of the resource based on the removal policy specified.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
  cases, a snapshot can be taken of the resource prior to deletion
  (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
  can be found in the following link:

- `arnForAgent(resource: IAgentRef): string` (static)

- `cfnPropertyName(cdkPropertyName: string): string`

- `fromAgentArn(scope: Construct, id: string, arn: string): IAgentRef` (static) — Creates a new IAgentRef from an ARN.

- `fromAgentId(scope: Construct, id: string, agentId: string): IAgentRef` (static) — Creates a new IAgentRef from a agentId.

- `getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference` — Returns a token for an runtime attribute of this resource.

  Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
  in case there is no generated attribute.

  **Parameters**

  - `attributeName` — The name of the attribute.

- `getMetadata(key: string): any` — Retrieve a value value from the CloudFormation Resource Metadata.

- `inspect(inspector: TreeInspector): void` — Examines the CloudFormation resource and discloses attributes.

  **Parameters**

  - `inspector` — tree inspector to collect and process attributes.

- `isCfnAgent(x: any): boolean` (static) — Checks whether the given object is a CfnAgent.

- `isCfnElement(x: any): boolean` (static) — Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

  Uses duck-typing instead of `instanceof` to allow stack elements from different
  versions of this library to be included in the same stack.

  **Returns:** The construct as a stack element or undefined if it is not a stack element.

- `isCfnResource(x: any): boolean` (static) — Check whether the given object is a CfnResource.

- `isConstruct(x: any): boolean` (static) — Checks if `x` is a construct.

  Use this method instead of `instanceof` to properly detect `Construct`
  instances, even when the construct library is symlinked.

  Explanation: in JavaScript, multiple copies of the `constructs` library on
  disk are seen as independent, completely different libraries. As a
  consequence, the class `Construct` in each copy of the `constructs` library
  is seen as a different class, and an instance of one class will not test as
  `instanceof` the other class. `npm install` will not create installations
  like this, but users may manually symlink construct libraries together or
  use a monorepo tool: in those cases, multiple copies of the `constructs`
  library can be accidentally installed, and `instanceof` will behave
  unpredictably. It is safest to avoid using `instanceof`, and using
  this type-testing method instead.

  **Parameters**

  - `x` — Any object.

  **Returns:** true if `x` is an object created from a class which extends `Construct`.

- `obtainDependencies(): Stack | CfnResource[]` — Retrieves an array of resources and stacks this resource depends on.

  For resources depended on directly, returns the `CfnResource` object. For
  dependencies on other stacks, returns the `Stack` object. The order of the
  array is not guaranteed.

- `overrideLogicalId(newLogicalId: string): void` — Overrides the auto-generated logical ID with a specific ID.

  **Parameters**

  - `newLogicalId` — The new logical ID to use for this stack element.

- `removeDependency(target: CfnResource): void` — Use `removeResourceDependency` instead

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `removeResourceDependency(target: CfnResource): void` — Indicates that this resource no longer depends on another resource.

  This can be used for resources across stacks (including nested stacks)
  and the dependency will automatically be removed from the relevant scope.

- `replaceDependency(target: CfnResource, newTarget: CfnResource): void` — Replaces one dependency with another.

  **Parameters**

  - `target` — The dependency to replace.
  - `newTarget` — The new dependency to add.

- `toString(): string` — Returns a string representation of this construct.

  **Returns:** a string representation of this resource

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.
  Use multiple `with()` calls if subsequent mixins should apply to added
  constructs.
