Summary
Implement temporal awareness in the memory system — the agent knows what time it is, what's coming up, and proactively surfaces time-sensitive items.
Spec: docs/spec/agent-memory-architecture.md → Temporal sections throughout
Depends on: #542 (MemoryStore), #543 (MemoryMixin)
Features
Schema
due_at column on knowledge — ISO 8601 future date
reminded_at column — when agent last surfaced this to user
- Partial index on
due_at WHERE due_at IS NOT NULL
MemoryStore
get_upcoming(within_days=7) — returns items due soon or overdue
- Query:
due_at <= future AND (reminded_at IS NULL OR reminded_at < due_at)
- All temporal queries use Python-computed boundaries (SQLite doesn't handle TZ offsets)
System Prompt
- Current date/time always injected
- Upcoming/overdue section with
[DUE date] and [OVERDUE date] labels
- Instruction to call
update_memory(reminded_at="now") after mentioning
Tools
remember(due_at=...) — store time-sensitive items
update_memory(reminded_at="now") — mark as mentioned
- Validated via
datetime.fromisoformat()
Reminder Lifecycle
- User tells agent about future event → stored with due_at
- Agent interacts near due date → sees in system prompt → mentions it
- Agent marks reminded_at → won't nag
- If due_at passes and was only reminded before → resurfaces as overdue
Acceptance Criteria
Summary
Implement temporal awareness in the memory system — the agent knows what time it is, what's coming up, and proactively surfaces time-sensitive items.
Spec:
docs/spec/agent-memory-architecture.md→ Temporal sections throughoutDepends on: #542 (MemoryStore), #543 (MemoryMixin)
Features
Schema
due_atcolumn on knowledge — ISO 8601 future datereminded_atcolumn — when agent last surfaced this to userdue_at WHERE due_at IS NOT NULLMemoryStore
get_upcoming(within_days=7)— returns items due soon or overduedue_at <= future AND (reminded_at IS NULL OR reminded_at < due_at)System Prompt
[DUE date]and[OVERDUE date]labelsupdate_memory(reminded_at="now")after mentioningTools
remember(due_at=...)— store time-sensitive itemsupdate_memory(reminded_at="now")— mark as mentioneddatetime.fromisoformat()Reminder Lifecycle
Acceptance Criteria