# SelfManagedStrategyProps

Configuration parameters for a self managed memory strategy existing built-in default prompts/models.

Extends: SelfManagedStrategyProps
Extends: MemoryStrategyCommonProps
Used as props by: SelfManagedMemoryStrategy

- Source: [`aws-bedrockagentcore/lib/memory/strategies/self-managed-strategy.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/memory/strategies/self-managed-strategy.ts#L129)
- Type last changed: v2.255.0 · 19 May 2026

## Example

```ts

const bucket = new s3.Bucket(this, 'memoryBucket', {
  bucketName: 'test-memory',
  removalPolicy: cdk.RemovalPolicy.DESTROY,
  autoDeleteObjects: true,
});

const topic = new sns.Topic(this, 'topic');

// Create a custom semantic memory strategy
const selfManagedStrategy = agentcore.MemoryStrategy.usingSelfManaged({
  strategyName: "selfManagedStrategy",
  description: "self managed memory strategy",
  historicalContextWindowSize: 5,
  invocationConfiguration: {
    topic: topic,
    s3Location: {
      bucketName: bucket.bucketName,
      objectKey: 'memory/',
    }
  },
  triggerConditions: {
    messageBasedTrigger: 1,
    timeBasedTrigger: cdk.Duration.seconds(10),
    tokenBasedTrigger: 100
  }
});

// Create memory with custom strategy
const memory = new agentcore.Memory(this, "MyMemory", {
  memoryName: "my-custom-memory",
  description: "Memory with custom strategy",
  expirationDuration: cdk.Duration.days(90),
  memoryStrategies: [selfManagedStrategy],
});
```

## Properties

- `description`: string — The description of the strategy.

  **Default:** No description

- `historicalContextWindowSize`: number = 4 — Define the number of previous events to be included when processing memory.

  A larger history window provides more context from past conversations.

- `invocationConfiguration`: [InvocationConfiguration](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.InvocationConfiguration.html) (required) — Invocation configuration for self managed memory strategy.

- `strategyName`: string (required) — The name for the strategy.

- `triggerConditions`: [TriggerConditions](/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.TriggerConditions.html) = undefined — Trigger conditions for self managed memory strategy.
