Skip to content

feat(memory): make consolidate ratio configurable#3281

Merged
chengyongru merged 2 commits intoHKUDS:nightlyfrom
subalkum:subalkum/feature/consolidation-ratio-configr
Apr 18, 2026
Merged

feat(memory): make consolidate ratio configurable#3281
chengyongru merged 2 commits intoHKUDS:nightlyfrom
subalkum:subalkum/feature/consolidation-ratio-configr

Conversation

@subalkum
Copy link
Copy Markdown
Contributor

Summary #3270

  • Added consolidationRatio config option to AgentDefaults (default: 0.5)
  • Range: 0.1 to 0.95 to prevent edge cases
  • Values > 0.5 = more fidelity preserved (e.g., 0.7 = 70% retention)
  • Values < 0.5 = more aggressive compression

Context

Per @chengyongru feedback:

  • Trigger point (token threshold) remains hardcoded as it's a reliability engineering decision
  • Consolidation ratio is now configurable as it's a user preference dependent on use case
  • Time-based compaction unchanged (already configurable)

this time the pr is clean haha :)

@chengyongru chengyongru changed the base branch from nightly to main April 18, 2026 14:54
@chengyongru chengyongru changed the base branch from main to nightly April 18, 2026 14:56
@chengyongru chengyongru force-pushed the subalkum/feature/consolidation-ratio-configr branch from 9636779 to 93358d6 Compare April 18, 2026 14:57
@chengyongru chengyongru changed the title Subalkum/feature/consolidation ratio configr feat(memory): make consolidate ratio configurable Apr 18, 2026
Cover ratio propagation, schema validation, and consolidation
behavior with different ratio values (0.1, 0.5, 0.9).
@chengyongru chengyongru force-pushed the subalkum/feature/consolidation-ratio-configr branch from 93358d6 to e89e04f Compare April 18, 2026 15:14
@chengyongru chengyongru merged commit 9b9e096 into HKUDS:nightly Apr 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants