Skip to content

Insights and Compaction

As agents store facts over time, the memory system can grow large. Frona AI automatically compacts and curates memory to keep it useful and efficient.

The platform periodically reviews stored facts and:

  • Merges duplicates: combines facts that say the same thing in different ways
  • Resolves contradictions: when newer facts contradict older ones, the newer information takes precedence
  • Removes stale data: archives facts that are no longer relevant
  • Consolidates related facts: groups related information together

Insight compaction runs every 2 hours by default (FRONA_SCHEDULER_INSIGHT_COMPACTION_SECS).

Spaces accumulate conversation history over time. Space compaction summarizes this history into a condensed context block that agents can use efficiently.

The process:

  1. Reviews recent conversations in the space
  2. Generates a summary that captures key topics, decisions, and context
  3. Replaces the detailed history with the summary

Space compaction runs every hour by default (FRONA_SCHEDULER_SPACE_COMPACTION_SECS).

The platform also manages context within individual conversations:

  • Compaction trigger: when context usage reaches 80% (FRONA_INFERENCE_COMPACTION_TRIGGER_PCT), the platform summarizes older messages
  • History truncation: when context reaches 90% (FRONA_INFERENCE_HISTORY_TRUNCATION_PCT), older messages are truncated to make room

These thresholds ensure conversations can continue indefinitely without hitting context window limits.

VariableDefaultDescription
FRONA_SCHEDULER_INSIGHT_COMPACTION_SECS7200 (2 hours)How often to compact memory facts
FRONA_SCHEDULER_SPACE_COMPACTION_SECS3600 (1 hour)How often to compact space context
FRONA_INFERENCE_COMPACTION_TRIGGER_PCT80Context usage % that triggers compaction
FRONA_INFERENCE_HISTORY_TRUNCATION_PCT90Context usage % that triggers truncation