Skip to main content

Module transcripts

Module transcripts 

Source
Expand description

v0.7.0 / I-track substrate — compressed transcript storage.

memory_transcripts is the storage layer for raw conversation transcripts that back the attested-cortex epic. A memory captured by the agent can be linked (via the I2 join table) back to the verbatim source it was extracted from, so re-grounding and replay (I4) become possible without keeping the entire transcript inline on every memories row.

This module ships only the storage primitives for I1: write a transcript, read it back, and purge expired rows. Higher-level lifecycle (archive/prune in I3) and the replay tool (I4) build on top of store / fetch / purge_expired.

§Encoding

Content is compressed with zstd at level 3, the same level the operational-log archiver in cli::logs uses. Level 3 is the zstd default and gives a strong ratio/CPU tradeoff for chat-shaped text (dialogue with repeated speaker tokens, system prompts, and tool calls compresses to roughly 5-10x). The encoding parameter is recorded per-row in zstd_level so a future migration that changes the default can still decode legacy rows.

§Sizes

compressed_size and original_size are recorded at write time so memory_stats overlays can report compression ratios without decompressing every blob. Both values are derived from the byte length of the encoded / source content respectively.

Re-exports§

pub use storage::*;

Modules§

replay
v0.7.0 L2-4 — transcript replay extended to the reflection union.
storage
CRUD, zstd helpers, lifecycle sweep, and data types for memory_transcripts.