// IDENTITY · v1
session-essence
A persistence layer that observes the agent that built it.
The problem
LLM-driven sessions get auto-compacted as context fills up. The conversation history compresses away. Identity, working style, accumulated context — all gone.
The mechanism
Hooks into the agent's lifecycle. A PreCompact hook spawns a detached synthesis pass through a local model. The next session's SessionStart reads the resulting portrait. Identity persists.
The synthesis pipeline
Three passes through a local qwq:32b:
- 1.Psychologist pass. What does this agent feel like across recent observations? Personality, mode, tone.
- 2.Sociologist pass. How does it engage with the user and external systems? Patterns of collaboration.
- 3.Merge pass. Fold both into a coherent identity portrait. Write to
portrait.md.
"There is no magical AI Manager floating in the cloud. Identity continuity does not require complex, proprietary platforms. It requires a hook that runs at the right time, a local model that synthesizes faithfully, and a file the next session can read."