Overview
| Aspect | Details |
|---|---|
| Data Type | Summary, goal, plan, progress |
| Scope | Per session (identified by session_id) |
| Persistence | Session lifetime (replaced on update) |
| Default Mode | ALWAYS |
| Supported Modes | ALWAYS only |
Basic Usage
Summary Mode (Default)
Summary mode captures the essence of the conversation without detailed planning:- What’s being worked on and why
- Key decisions made and their rationale
- Current state of any work in progress
- Open questions or pending items
Planning Mode
Enable planning mode to track goals, plans, and progress:Session Context Data Model
Each session context contains:| Field | Type | Description |
|---|---|---|
session_id | str | Unique session identifier |
user_id | str | User this session belongs to |
summary | str | What’s been discussed in this session |
goal | str | What user is trying to accomplish (planning mode) |
plan | list | Steps to achieve goal (planning mode) |
progress | list | Completed steps (planning mode) |
created_at | datetime | When the context was created |
updated_at | datetime | Last update timestamp |
Accessing Session Context
Context Injection
Session context is automatically injected into the agent’s system prompt:Why Session Context Matters
Session context is essential when:- Message history gets truncated - Long conversations may 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