Interface AgentAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
AgentAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)", date="2025-09-02T11:25:42.763Z") @Stability(Experimental) public interface AgentAttributes extends software.amazon.jsii.JsiiSerializable
(experimental) Attributes for specifying an imported Bedrock Agent.

Example:

 Key cmk = Key.Builder.create(this, "cmk").build();
 // Assuming you have an existing agent and alias
 IAgent agent = Agent.fromAgentAttributes(this, "ImportedAgent", AgentAttributes.builder()
         .agentArn("arn:aws:bedrock:region:account:agent/agent-id")
         .roleArn("arn:aws:iam::account:role/agent-role")
         .build());
 IAgentAlias agentAlias = AgentAlias.fromAttributes(this, "ImportedAlias", AgentAliasAttributes.builder()
         .aliasId("alias-id")
         .aliasName("my-alias")
         .agentVersion("1")
         .agent(agent)
         .build());
 IPromptVariant agentVariant = PromptVariant.agent(AgentPromptVariantProps.builder()
         .variantName("agent-variant")
         .model(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(List.of("task"))
         .build());
 Prompt.Builder.create(this, "agentPrompt")
         .promptName("agent-prompt")
         .description("Prompt for agent interactions")
         .defaultVariant(agentVariant)
         .variants(List.of(agentVariant))
         .kmsKey(cmk)
         .build();
 
  • Method Details

    • getAgentArn

      @Stability(Experimental) @NotNull String getAgentArn()
      (experimental) The ARN of the agent.
    • getRoleArn

      @Stability(Experimental) @NotNull String getRoleArn()
      (experimental) The ARN of the IAM role associated to the agent.
    • getAgentVersion

      @Stability(Experimental) @Nullable default String getAgentVersion()
      (experimental) 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).

      Default: 'DRAFT'

    • getKmsKeyArn

      @Stability(Experimental) @Nullable default String getKmsKeyArn()
      (experimental) Optional KMS encryption key associated with this agent.

      Default: undefined - An AWS managed key is used

    • getLastUpdated

      @Stability(Experimental) @Nullable default String getLastUpdated()
      (experimental) When this agent was last updated.

      Default: undefined - No last updated timestamp is provided

    • builder

      @Stability(Experimental) static AgentAttributes.Builder builder()
      Returns:
      a AgentAttributes.Builder of AgentAttributes