Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bedrock): update cdk version + agent memory #1000

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
const GITHUB_USER = 'awslabs';
const PUBLICATION_NAMESPACE = 'cdklabs';
const PROJECT_NAME = 'generative-ai-cdk-constructs';
const CDK_VERSION: string = '2.178.0';
const CDK_VERSION: string = '2.181.1';

function camelCaseIt(input: string): string {
// Hypens and dashes to spaces and then CamelCase...
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CDK Generative AI Constructs V0.1.294 (2025-02-28)

Based on CDK library version 2.181.1

# CDK Generative AI Constructs V0.1.293 (2025-02-10)

Based on CDK library version 2.178.0
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Default output format [None]: json
```

- [Node](https://nodejs.org/en) >= v20.9.0
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.178.0) >= 2.178.0
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.181.1) >= 2.181.1
- [Python](https://www.python.org/downloads/) >=3.9
- [Projen](https://github.com/projen/projen) >= 0.91.5
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19
Expand Down
2 changes: 2 additions & 0 deletions apidocs/namespaces/bedrock/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
- [KendraKnowledgeBase](classes/KendraKnowledgeBase.md)
- [KendraKnowledgeBaseBase](classes/KendraKnowledgeBaseBase.md)
- [KnowledgeBaseBase](classes/KnowledgeBaseBase.md)
- [Memory](classes/Memory.md)
- [ParentActionGroupSignature](classes/ParentActionGroupSignature.md)
- [ParsingStategy](classes/ParsingStategy.md)
- [Prompt](classes/Prompt.md)
Expand Down Expand Up @@ -138,6 +139,7 @@
- [SalesforceCrawlingFilters](interfaces/SalesforceCrawlingFilters.md)
- [SalesforceDataSourceAssociationProps](interfaces/SalesforceDataSourceAssociationProps.md)
- [SalesforceDataSourceProps](interfaces/SalesforceDataSourceProps.md)
- [SessionSummaryMemoryProps](interfaces/SessionSummaryMemoryProps.md)
- [SharePointCrawlingFilters](interfaces/SharePointCrawlingFilters.md)
- [SharePointDataSourceAssociationProps](interfaces/SharePointDataSourceAssociationProps.md)
- [SharePointDataSourceProps](interfaces/SharePointDataSourceProps.md)
Expand Down
8 changes: 8 additions & 0 deletions apidocs/namespaces/bedrock/classes/Agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,14 @@ When this agent was last updated.

***

### memory?

> `readonly` `optional` **memory**: [`Memory`](Memory.md)

The memory configuration for the agent.

***

### name

> `readonly` **name**: `string`
Expand Down
62 changes: 62 additions & 0 deletions apidocs/namespaces/bedrock/classes/Memory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / Memory

# Class: Memory

Memory class for managing Bedrock Agent memory configurations. Enables conversational context retention
across multiple sessions through session identifiers. Memory context is stored with unique
memory IDs per user, allowing access to conversation history and summaries. Supports viewing
stored sessions and clearing memory.

## See

https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html

## Constructors

### new Memory()

> **new Memory**(): [`Memory`](Memory.md)

#### Returns

[`Memory`](Memory.md)

## Properties

### SESSION\_SUMMARY

> `readonly` `static` **SESSION\_SUMMARY**: `MemoryConfigurationProperty`

Returns session summary memory with default configuration.

#### Default

```ts
memoryDurationDays=30, maxRecentSessions=20
```

## Methods

### sessionSummary()

> `static` **sessionSummary**(`props`): `MemoryConfigurationProperty`

Creates a session summary memory with custom configuration.

#### Parameters

##### props

[`SessionSummaryMemoryProps`](../interfaces/SessionSummaryMemoryProps.md)

Optional memory configuration properties

#### Returns

`MemoryConfigurationProperty`

Memory configuration object
14 changes: 13 additions & 1 deletion apidocs/namespaces/bedrock/enumerations/AgentStepType.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Enumeration: AgentStepType

The step in the agent sequence where to set a specific prompt configuration.
The step in the agent sequence that this prompt configuration applies to.

## Enumeration Members

Expand All @@ -16,6 +16,12 @@ The step in the agent sequence where to set a specific prompt configuration.

***

### MEMORY\_SUMMARIZATION

> **MEMORY\_SUMMARIZATION**: `"MEMORY_SUMMARIZATION"`

***

### ORCHESTRATION

> **ORCHESTRATION**: `"ORCHESTRATION"`
Expand All @@ -31,3 +37,9 @@ The step in the agent sequence where to set a specific prompt configuration.
### PRE\_PROCESSING

> **PRE\_PROCESSING**: `"PRE_PROCESSING"`

***

### ROUTING\_CLASSIFIER

> **ROUTING\_CLASSIFIER**: `"ROUTING_CLASSIFIER"`
20 changes: 20 additions & 0 deletions apidocs/namespaces/bedrock/interfaces/AgentProps.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,26 @@ The KnowledgeBases associated with the agent.

***

### memory?

> `readonly` `optional` **memory**: [`Memory`](../classes/Memory.md)

The type and configuration of the memory to maintain context across multiple sessions and recall past interactions.
This can be useful for maintaining continuity in multi-turn conversations and recalling user preferences
or past interactions.

#### See

https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html

#### Default

```ts
- No memory will be used. Agents will retain context from the current session only.
```

***

### name?

> `readonly` `optional` **name**: `string`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)

***

[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / SessionSummaryMemoryProps

# Interface: SessionSummaryMemoryProps

## Properties

### maxRecentSessions?

> `readonly` `optional` **maxRecentSessions**: `number`

Maximum number of recent session summaries to include (min 1)

#### Default

```ts
20
```

***

### memoryDurationDays?

> `readonly` `optional` **memoryDurationDays**: `number`

Duration in days for which session summaries are retained (1-365)

#### Default

```ts
30
```
11 changes: 8 additions & 3 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading