-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmemory.tf
More file actions
25 lines (22 loc) · 1.13 KB
/
memory.tf
File metadata and controls
25 lines (22 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# AgentCore Memory Resource
# Provides persistent conversation context across sessions using DynamoDB backend
# Shared between VeraSlack and VeraTeams
resource "aws_bedrockagentcore_memory" "vera_memory" {
name = "${title(var.region_short_code)}${title(var.account_short_code)}VeraMemory"
event_expiry_duration = var.session_ttl_days
memory_execution_role_arn = module.worker.worker_task_role_arn
tags = {
Name = "${title(var.region_short_code)}${title(var.account_short_code)}VeraMemory"
Environment = var.environment
}
}
# User preferences path
# long term memory created via dynamically extracted facts, preferences, and patterns
# Distinct for each user (keyed by actorId)
resource "aws_bedrockagentcore_memory_strategy" "user_preferences" {
name = "${title(var.region_short_code)}${title(var.account_short_code)}UserPreferences"
memory_id = aws_bedrockagentcore_memory.vera_memory.id
type = "USER_PREFERENCE"
namespaces = ["/preferences/{actorId}"]
memory_execution_role_arn = module.worker.worker_task_role_arn
}