> **Experimental**
>
> `@aws-cdk/aws-bedrock-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# AgentAttributes

Attributes for specifying an imported Bedrock Agent.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`bedrock/agents/agent.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-bedrock-alpha/bedrock/agents/agent.ts#L305)

## Example

```ts
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

- `agentArn`: string (required) — The ARN of the agent.

- `agentVersion`: string = '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`: string — Optional KMS encryption key associated with this agent.

  **Default:** undefined - An AWS managed key is used

- `lastUpdated`: string — When this agent was last updated.

  **Default:** undefined - No last updated timestamp is provided

- `roleArn`: string (required) — The ARN of the IAM role associated to the agent.
