Skip to content

[ENH] EMC should embed all turns not just WMC overflow #20

@OppaAI

Description

@OppaAI

Summary

Currently EMC only receives event segments when WMC overflows. If WMC never fills up (short conversations), nothing gets embedded into EMC. Recent interactions that didn't trigger overflow are invisible to EMC search.

Current Behavior

WMC overflow only → em_buffer → embed → EMC

Short conversations where WMC never fills = EMC stays empty.

Proposed Enhancement

Add a low-priority background path from MCC → EMC for all turns, not just overflow:

# Option A — embed every turn async (fire and forget)
await mcc.add_turn(role, content)  # always goes to EMC too

# Option B — embed every Nth turn (throttled)
if self._turn_count % N == 0:
    self.emc.buffer_append(role, content)

# Option C — embed during idle periods
# queue turns, process when CNC is not busy with Cosmos

Impact

  • EMC stays current even in short conversations
  • GRACE remembers everything, not just overflow
  • More consistent episodic memory across all usage patterns

Notes

  • Need to balance CPU load — embedding every turn may overwhelm embeddinggemma-300m on Jetson
  • Option B (every Nth turn) or Option C (idle embedding) are safer for Jetson
  • Implement in M2

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions