Skip to main content

spawn_transcript_writer

Function spawn_transcript_writer 

Source
pub fn spawn_transcript_writer(
    rx: UnboundedReceiver<CapturedTurn>,
    memory: Arc<dyn Memory>,
) -> JoinHandle<()> ⓘ
Expand description

Spawn the background writer: drains rx and persists each turn to memory. role and session ride along as tags (role:…, session:…), so a metadata-aware backend (e.g. CortexDB) can filter/aggregate on them.

Transcripts are the biggest PII surface — tool results and model output flow in verbatim. Redact at this boundary by handing in a redacting memory: spawn_transcript_writer(rx, Arc::new(RedactingMemory::new(cortex))) (see harness_context::RedactingMemory).