SEC. 03c: SELF-EDITING MEMORY

The Distill Loop


Everyone else appends. Kontexta rewrites. Raw events become topic-shaped markdown that the next session searches instead of re-deriving.

FRAME 01

Raw events

Every MCP tool call, captured server-side.

14:02 files.read auth/session.ts
14:03 grep "refresh_token"
14:05 update auth/session.ts §token-rotation
14:06 hands: run_tests auth/*.test.ts
…184 more events this session
FRAME 02

Distilled markdown

Periodic pass rewrites the log into per-topic summaries.

# auth / token-rotation
Switched from opaque refresh tokens to JWT rotation. Old flow leaked tokens via referer header. New tests in auth/*.test.ts cover the rotation window.
rev 4 · 184 events → 3 paragraphs
FRAME 03

Next session recalls it

The next agent, same tool or another, searches the distilled file, not the raw log.

agent →
files.search("refresh token")
kxta ←
auth/token-rotation.md §1
est_tokens: 84
zero re-derivation. picks up mid-thought.
eventsdistillmarkdownnext session

Memory that edits itself stays useful. Append-only logs decay into noise.

kontexta (kon-TEX-tah) · by safiyu · REV 5.0.0 · Apache-2.0