session
Manage session lifecycle: start, end, view history, check active status, clean up stale sessions, or retrieve a boot-time digest of narrative and decisions.
Instructions
Session lifecycle — start, end, history, active check, stale cleanup, and the v0.9.0 boot-time digest.
ACTIONS:
"start": Begin a new session. Returns session_id.
"end": End a session (needs session_id). Returns stats.
"history": View past sessions.
"active": Check if there's a running session.
"abandon_stale": Clean up orphaned sessions older than abandon_stale_hours.
"digest": One-call boot-time briefing (v0.9.0) — narrative chain head, open decisions/conflicts/triggers, top stale memories. Call this at conversation start instead of N separate recalls.
Args: action: "start", "end", "history", "active", "abandon_stale", "digest". session_id: For end. namespace: Memory namespace. client_id: Client identifier. metadata: For start — optional dict. summary: For end — what happened. limit: For history. abandon_stale_hours: For abandon_stale — max age in hours. narrative_namespace: For digest — namespace for the narrative chain. max_decisions / max_conflicts / max_triggers: For digest — surface caps. snippet_chars: For digest — text-snippet length per item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| action | Yes | ||
| summary | No | ||
| metadata | No | ||
| client_id | No | default | |
| namespace | No | default | |
| session_id | No | ||
| max_triggers | No | ||
| max_conflicts | No | ||
| max_decisions | No | ||
| snippet_chars | No | ||
| abandon_stale_hours | No | ||
| narrative_namespace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |