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

Properties for SessionSummaryConfiguration.

Used as props by: [Memory](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-alpha.Memory.html)

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

## Example

TypeScript:

```ts
const agent = new bedrock.Agent(this, 'MyAgent', {
  agentName: 'MyAgent',
  instruction: 'Your instruction here',
  foundationModel: bedrock.BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
  memory: Memory.sessionSummary({
    maxRecentSessions: 10, // Keep the last 10 session summaries
    memoryDuration: Duration.days(20), // Retain summaries for 20 days
  }),
});
```

Python:

```python
agent = bedrock.Agent(self, "MyAgent",
    agent_name="MyAgent",
    instruction="Your instruction here",
    foundation_model=bedrock.BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
    memory=Memory.session_summary(
        max_recent_sessions=10,  # Keep the last 10 session summaries
        memory_duration=Duration.days(20)
    )
)
```

Java:

```java
Agent agent = Agent.Builder.create(this, "MyAgent")
        .agentName("MyAgent")
        .instruction("Your instruction here")
        .foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
        .memory(Memory.sessionSummary(SessionSummaryMemoryProps.builder()
                .maxRecentSessions(10) // Keep the last 10 session summaries
                .memoryDuration(Duration.days(20))
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
var agent = new Agent(this, "MyAgent", new AgentProps {
    AgentName = "MyAgent",
    Instruction = "Your instruction here",
    FoundationModel = BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
    Memory = Memory.SessionSummary(new SessionSummaryMemoryProps {
        MaxRecentSessions = 10,  // Keep the last 10 session summaries
        MemoryDuration = Duration.Days(20)
    })
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
agent := bedrock.NewAgent(this, jsii.String("MyAgent"), &AgentProps{
	AgentName: jsii.String("MyAgent"),
	Instruction: jsii.String("Your instruction here"),
	FoundationModel: bedrock.BedrockFoundationModel_AMAZON_NOVA_LITE_V1(),
	Memory: awsbedrockalpha.Memory_SessionSummary(&SessionSummaryMemoryProps{
		MaxRecentSessions: jsii.Number(10),
		 // Keep the last 10 session summaries
		MemoryDuration: awscdk.Duration_Days(jsii.Number(20)),
	}),
})
```

## Properties

- `maxRecentSessions`: number = 20 — Maximum number of recent session summaries to include (min 1).

- `memoryDuration`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.days(30) — Duration for which session summaries are retained (between 1 and 365 days).
