Overview
The session summarize endpoint produces and stores session summaries using an upsert model where ONE document exists per session. If the daemon already created an incremental summary, subsequent calls UPDATE it rather than creating duplicates.Endpoint
POST
/api/session/summarize
API Key required
Request Body
Session transcript text to summarize. Content is capped at 50,000 characters to prevent OOM. If exceeded, the middle portion is truncated.
Session identifier used to create the session tag (e.g.,
session:{id[:12]})Project reference for tagging (e.g.,
project:org/repo)Human-readable project context for LLM prompt (e.g.,
org/repo (main))Summary mode:
incremental: Daemon-generated incremental summary (appends to existing)finalize: Stop hook comprehensive final version (replaces existing)
Session epoch number. For epoch > 0, the session tag becomes
session:{id[:12]}:e{N}Custom session tag. If not provided, automatically generated from session_id and epoch
Response
Indicates if the operation was successful
ID of the created or updated document. Null if skipped.
Generated title in format:
Session: {date} - {project} - {title} (epoch {N})Action taken:
created, updated, or null if skippedReason for skipping (if applicable):
extraction_produced_no_summary: LLM returned no summarychunking_produced_no_output: Chunking failed
Behavior
Incremental Mode
In incremental mode, existing summaries are appended to with a separator (\n\n---\n\n). The stored summary is capped at 10,000 characters to prevent unbounded growth. When exceeded, the tail (most recent summaries) is kept.
Finalize Mode
The stop hook sendsmode="finalize" to replace the incremental summary with a comprehensive final version.
Tagging
Documents are tagged with:session-summary(category)- Priority tag from LLM extraction (default:
medium) - Session tag (
session:{id[:12]}orsession:{id[:12]}:e{N}) - Additional tags from LLM extraction