| Aspect | Value |
|---|---|
| Scope | Per session |
| Persistence | Session lifetime (replaced on update) |
| Default mode | Always |
| Supported modes | Always |
Basic Usage
Summary Mode
Default behavior. Captures the essence of the conversation without detailed planning.Planning Mode
Enable planning to track goals, plan steps, and progress.Data Model
| Field | Description |
|---|---|
session_id | Unique session identifier |
user_id | User this session belongs to |
summary | What’s been discussed |
goal | What user is trying to accomplish (planning mode) |
plan | Steps to achieve goal (planning mode) |
progress | Completed steps (planning mode) |
created_at | When created |
updated_at | Last update |
Accessing Session Context
Context Injection
Session context is injected into the system prompt:When to Use
Session context is essential when:- Message history gets truncated: long conversations lose early context
- Sessions are resumed: user returns after a break
- Complex multi-step tasks: track progress through long workflows
- Handoffs: another agent or human needs to understand the state