jev-gc: reversible context garbage collection for long-running AI agents
Maleficent_College57 · reddit · 2026-09-23
The author open-sourced jev-gc, a Python library that decides at runtime what stays in an agent's next prompt and what gets evicted, tackling context bloat in long-running agents.
- Hooks into OpenTelemetry spans and tiers each as HOT (verbatim), WARM (one-line pointer), or COLD (archived).
- Rules first: pinned/recent spans kept, errored spans compressed but never dropped, empty outputs removed; only genuinely ambiguous cases go to a (batched) relevance model.
- Eviction is reversible: archived snapshots plus a keywords-only index let the agent retrieve full content it "remembers."
- Shadow-replay mode diffs full-context vs GC'd runs to surface possibly harmful evictions (keyword-overlap correlation, not proof).
- Early numbers with a fake scorer measure pipeline overhead only: 96µs/span, 1.14× overhead at 100× span count, archived content 2% of memory growth. Author seeks feedback on trust, evaluation, and rules-vs-model decisions.
Related event: jev-gc: Reversible Context Garbage Collection for Long-Running Agents(2 posts)→
More from coding & agent
- Open-source GUI agents top out at 8% task success on composite cross-device tasks — maier_ak · 2026-09-23
- JarvisGUI benchmark tests GUI agents across Android, Windows and Ubuntu in one workflow — maier_ak · 2026-09-23
- Cross-DURIAN: A New Benchmark for Multi-Device GUI Agents — maier_ak · 2026-09-23
- "Proactive" personal agents: reminder, proposal, or acting without asking? — sujingshen · 2026-09-23
- AWS Open-Sources Strands Harness, Claims 28% Fewer Agent Tokens — shashib · 2026-09-23
- Before your AI agent pays for you: four questions about authorization and billing — sujingshen · 2026-09-23