interface AgentAttributes
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.AgentAttributes |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#AgentAttributes |
![]() | software.amazon.awscdk.services.bedrock.alpha.AgentAttributes |
![]() | aws_cdk.aws_bedrock_alpha.AgentAttributes |
![]() | @aws-cdk/aws-bedrock-alpha ยป AgentAttributes |
Attributes for specifying an imported Bedrock Agent.
Example
const cmk = new kms.Key(this, 'cmk', {});
// Assuming you have an existing agent and alias
const agent = bedrock.Agent.fromAgentAttributes(this, 'ImportedAgent', {
agentArn: 'arn:aws:bedrock:region:account:agent/agent-id',
roleArn: 'arn:aws:iam::account:role/agent-role',
});
const agentAlias = bedrock.AgentAlias.fromAttributes(this, 'ImportedAlias', {
aliasId: 'alias-id',
aliasName: 'my-alias',
agentVersion: '1',
agent: agent,
});
const agentVariant = bedrock.PromptVariant.agent({
variantName: 'agent-variant',
model: bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_3_5_SONNET_V1_0,
agentAlias: agentAlias,
promptText: 'Use the agent to help with: {{task}}. Please be thorough and provide detailed explanations.',
promptVariables: ['task'],
});
new bedrock.Prompt(this, 'agentPrompt', {
promptName: 'agent-prompt',
description: 'Prompt for agent interactions',
defaultVariant: agentVariant,
variants: [agentVariant],
kmsKey: cmk,
});
Properties
Name | Type | Description |
---|---|---|
agent | string | The ARN of the agent. |
role | string | The ARN of the IAM role associated to the agent. |
agent | string | The agent version. |
kms | string | Optional KMS encryption key associated with this agent. |
last | string | When this agent was last updated. |
agentArn
Type:
string
The ARN of the agent.
roleArn
Type:
string
The ARN of the IAM role associated to the agent.
agentVersion?
Type:
string
(optional, default: 'DRAFT')
The agent version.
If no explicit versions have been created, leave this empty to use the DRAFT version. Otherwise, use the version number (e.g. 1).
kmsKeyArn?
Type:
string
(optional, default: undefined - An AWS managed key is used)
Optional KMS encryption key associated with this agent.
lastUpdated?
Type:
string
(optional, default: undefined - No last updated timestamp is provided)
When this agent was last updated.