Skip to content

Commit 3c9edfb

Browse files
aws-rafamskrokoko
andauthored
feat(bedrock): update cdk version + agent memory (#1000)
* feat(bedrock): update cdk version + agent memory --------- Co-authored-by: krokoko <[email protected]>
1 parent 7704122 commit 3c9edfb

27 files changed

+1108
-41
lines changed

.gitignore

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmignore

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/deps.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/tasks.json

+69
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
const GITHUB_USER = 'awslabs';
3030
const PUBLICATION_NAMESPACE = 'cdklabs';
3131
const PROJECT_NAME = 'generative-ai-cdk-constructs';
32-
const CDK_VERSION: string = '2.178.0';
32+
const CDK_VERSION: string = '2.181.1';
3333

3434
function camelCaseIt(input: string): string {
3535
// Hypens and dashes to spaces and then CamelCase...

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# CDK Generative AI Constructs V0.1.294 (2025-02-28)
2+
3+
Based on CDK library version 2.181.1
4+
15
# CDK Generative AI Constructs V0.1.293 (2025-02-10)
26

37
Based on CDK library version 2.178.0

DEVELOPER_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Default output format [None]: json
1616
```
1717

1818
- [Node](https://nodejs.org/en) >= v20.9.0
19-
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.178.0) >= 2.178.0
19+
- [AWS CDK](https://github.com/aws/aws-cdk/releases/tag/v2.181.1) >= 2.181.1
2020
- [Python](https://www.python.org/downloads/) >=3.9
2121
- [Projen](https://github.com/projen/projen) >= 0.91.5
2222
- [Yarn](https://classic.yarnpkg.com/lang/en/docs/cli/install/) >= 1.22.19

apidocs/namespaces/bedrock/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
- [KendraKnowledgeBase](classes/KendraKnowledgeBase.md)
6565
- [KendraKnowledgeBaseBase](classes/KendraKnowledgeBaseBase.md)
6666
- [KnowledgeBaseBase](classes/KnowledgeBaseBase.md)
67+
- [Memory](classes/Memory.md)
6768
- [ParentActionGroupSignature](classes/ParentActionGroupSignature.md)
6869
- [ParsingStategy](classes/ParsingStategy.md)
6970
- [Prompt](classes/Prompt.md)
@@ -138,6 +139,7 @@
138139
- [SalesforceCrawlingFilters](interfaces/SalesforceCrawlingFilters.md)
139140
- [SalesforceDataSourceAssociationProps](interfaces/SalesforceDataSourceAssociationProps.md)
140141
- [SalesforceDataSourceProps](interfaces/SalesforceDataSourceProps.md)
142+
- [SessionSummaryMemoryProps](interfaces/SessionSummaryMemoryProps.md)
141143
- [SharePointCrawlingFilters](interfaces/SharePointCrawlingFilters.md)
142144
- [SharePointDataSourceAssociationProps](interfaces/SharePointDataSourceAssociationProps.md)
143145
- [SharePointDataSourceProps](interfaces/SharePointDataSourceProps.md)

apidocs/namespaces/bedrock/classes/Agent.md

+8
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ When this agent was last updated.
196196

197197
***
198198

199+
### memory?
200+
201+
> `readonly` `optional` **memory**: [`Memory`](Memory.md)
202+
203+
The memory configuration for the agent.
204+
205+
***
206+
199207
### name
200208

201209
> `readonly` **name**: `string`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / Memory
6+
7+
# Class: Memory
8+
9+
Memory class for managing Bedrock Agent memory configurations. Enables conversational context retention
10+
across multiple sessions through session identifiers. Memory context is stored with unique
11+
memory IDs per user, allowing access to conversation history and summaries. Supports viewing
12+
stored sessions and clearing memory.
13+
14+
## See
15+
16+
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html
17+
18+
## Constructors
19+
20+
### new Memory()
21+
22+
> **new Memory**(): [`Memory`](Memory.md)
23+
24+
#### Returns
25+
26+
[`Memory`](Memory.md)
27+
28+
## Properties
29+
30+
### SESSION\_SUMMARY
31+
32+
> `readonly` `static` **SESSION\_SUMMARY**: `MemoryConfigurationProperty`
33+
34+
Returns session summary memory with default configuration.
35+
36+
#### Default
37+
38+
```ts
39+
memoryDurationDays=30, maxRecentSessions=20
40+
```
41+
42+
## Methods
43+
44+
### sessionSummary()
45+
46+
> `static` **sessionSummary**(`props`): `MemoryConfigurationProperty`
47+
48+
Creates a session summary memory with custom configuration.
49+
50+
#### Parameters
51+
52+
##### props
53+
54+
[`SessionSummaryMemoryProps`](../interfaces/SessionSummaryMemoryProps.md)
55+
56+
Optional memory configuration properties
57+
58+
#### Returns
59+
60+
`MemoryConfigurationProperty`
61+
62+
Memory configuration object

apidocs/namespaces/bedrock/enumerations/AgentStepType.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Enumeration: AgentStepType
88

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

1111
## Enumeration Members
1212

@@ -16,6 +16,12 @@ The step in the agent sequence where to set a specific prompt configuration.
1616
1717
***
1818

19+
### MEMORY\_SUMMARIZATION
20+
21+
> **MEMORY\_SUMMARIZATION**: `"MEMORY_SUMMARIZATION"`
22+
23+
***
24+
1925
### ORCHESTRATION
2026

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

3339
> **PRE\_PROCESSING**: `"PRE_PROCESSING"`
40+
41+
***
42+
43+
### ROUTING\_CLASSIFIER
44+
45+
> **ROUTING\_CLASSIFIER**: `"ROUTING_CLASSIFIER"`

apidocs/namespaces/bedrock/interfaces/AgentProps.md

+20
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,26 @@ The KnowledgeBases associated with the agent.
138138

139139
***
140140

141+
### memory?
142+
143+
> `readonly` `optional` **memory**: [`Memory`](../classes/Memory.md)
144+
145+
The type and configuration of the memory to maintain context across multiple sessions and recall past interactions.
146+
This can be useful for maintaining continuity in multi-turn conversations and recalling user preferences
147+
or past interactions.
148+
149+
#### See
150+
151+
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-memory.html
152+
153+
#### Default
154+
155+
```ts
156+
- No memory will be used. Agents will retain context from the current session only.
157+
```
158+
159+
***
160+
141161
### name?
142162

143163
> `readonly` `optional` **name**: `string`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[**@cdklabs/generative-ai-cdk-constructs**](../../../README.md)
2+
3+
***
4+
5+
[@cdklabs/generative-ai-cdk-constructs](../../../README.md) / [bedrock](../README.md) / SessionSummaryMemoryProps
6+
7+
# Interface: SessionSummaryMemoryProps
8+
9+
## Properties
10+
11+
### maxRecentSessions?
12+
13+
> `readonly` `optional` **maxRecentSessions**: `number`
14+
15+
Maximum number of recent session summaries to include (min 1)
16+
17+
#### Default
18+
19+
```ts
20+
20
21+
```
22+
23+
***
24+
25+
### memoryDurationDays?
26+
27+
> `readonly` `optional` **memoryDurationDays**: `number`
28+
29+
Duration in days for which session summaries are retained (1-365)
30+
31+
#### Default
32+
33+
```ts
34+
30
35+
```

package.json

+8-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)