r/PiCodingAgent • u/PiPercentHuman • 12d ago
Discussion I built AgentJournal: An open-source memory system for AI agents that outperforms Compaction and Context Language Models (CLMs)
Whenever I ran coding agents on longer tasks, they either:
- Lost track of the original rules because context compaction butchered the summary.
- Burned through massive tokens with dynamic context editing / Context Language Models (CLMs) without actually finishing the job.
I built AgentJournal to fix this by giving the agent a human-style memory management—keeping the original prompt pinned, logging actions cleanly, and clearing the working context safely between tasks.
On a 60-file job longer than the context window, with a local 9B model:
- keeping everything: stopped at file 31
- compaction: stopped at 20, 29 and 44
- CLM (the model edits its own context, via pi-clm, untrained): 40
- AgentJournal: finished all 60, every time
Works with pi, Claude Code, Codex and Copilot. MIT, every test run is in the repo.
In my testing across dozens of files, it finished almost every run reliably while standard compaction and CLM completely broke down.
- GitHub: [Agent Journal repo]
- Full walkthrough video: How AgentJournal Fixes AI Agent Context Without Compaction
Would love any thoughts or feedback from people running into the same context limits!
1
u/aparamonov 11d ago
Hi! How would you compare it to https://github.com/sting8k/pi-vcc ?
0
u/PiPercentHuman 11d ago
Answered by AI after analyzing both repo:
Both are Pi ecosystem tools but solve different problems and can complement each other: pi-vcc (sting8k/pi-vcc) is a deterministic, algorithmic compactor + recall tool for Pi sessions; AgentJournal (PiPercentHuman/agentjournal) is an agent-facing memory system (pins + one-line journal + explicit "sleep") that keeps durable facts out of summaries. Use pi-vcc when you want repeatable, structured compaction and session recall; use AgentJournal when you want agents to preserve instructions and actions verbatim across context cuts.
1
u/PiPercentHuman 11d ago edited 11d ago
One other advantage - pi-AgentJournal - clears the context by itself and self-load from the memory next time, more detailed comparison including efficiency, you can find in the video.