Session and turn
Sessions are JSONL conversation trees; each turn is one user prompt through model streaming, tool calls, and the final assistant message.
Responsibility
- Persist append-only session entries with
id/parentIdlinkage - Track the active leaf for branching (
/tree,/branch,/fork) - Drive compaction when context limits approach (
/compact, auto-compact settings) - Coordinate tool execution, approvals, and subagent spawns per turn
Public boundary
- The
AgentSessionowns the turn loop. - On-disk layout:
~/.veyyon/agent/sessions/<dir-encoded>/<timestamp>_<id>.jsonl - Blob store:
~/.veyyon/agent/blobs/<sha256>
Sessions run in-process; there is no separate session daemon.
User guide: Sessions.