generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructs


@cdklabs/generative-ai-cdk-constructs / bedrock / AgentProps

Interface: AgentProps

Properties for creating a CDK managed Bedrock Agent.

Properties

actionGroups?

readonly optional actionGroups: AgentActionGroup[]

The Action Groups associated with the agent.


codeInterpreterEnabled?

readonly optional codeInterpreterEnabled: boolean

Select whether the agent can generate, run, and troubleshoot code when trying to complete a task

Default

- false

description?

readonly optional description: string

A description of the agent.

Default

- No description is provided.

existingRole?

readonly optional existingRole: IRole

The existing IAM Role for the agent to use. Ensure the role has a trust policy that allows the Bedrock service to assume the role.

Default

- A new role is created for you.

forceDelete?

readonly optional forceDelete: boolean

Whether to delete the resource even if it’s in use.

Default

- true

foundationModel

readonly foundationModel: IInvokable

The foundation model used for orchestration by the agent.


guardrail?

readonly optional guardrail: IGuardrail

The guardrail that will be associated with the agent.


idleSessionTTL?

readonly optional idleSessionTTL: Duration

How long sessions should be kept open for the agent. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.

Default

- 1 hour

instruction

readonly instruction: string

The instruction used by the agent. This determines how the agent will perform his task. This instruction must have a minimum of 40 characters.


kmsKey?

readonly optional kmsKey: IKey

The KMS key of the agent if custom encryption is configured.

Default

- An AWS managed key is used.

knowledgeBases?

readonly optional knowledgeBases: IKnowledgeBase[]

The KnowledgeBases associated with the agent.


name?

readonly optional name: string

The name of the agent.

Default

- A name is generated by CDK.

promptOverrideConfiguration?

readonly optional promptOverrideConfiguration: PromptOverrideConfiguration

Overrides some prompt templates in different parts of an agent sequence configuration.

Default

- No overrides are provided.

shouldPrepareAgent?

readonly optional shouldPrepareAgent: boolean

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.

Default

- false

userInputEnabled?

readonly optional userInputEnabled: boolean

Select whether the agent can prompt additional information from the user when it does not have enough information to respond to an utterance

Default

- false