When an AI agent makes a decision, it evaluates several options and picks one. The rest disappear forever β you never see what it almost did or why it rejected the alternatives.
I built GhostTrace to fix that.
It captures "Phantom Branches": the actions your agent considered but rejected, with the full reasoning for each rejection. Everything is saved to a .ghost.json file that you can replay and inspect anytime.
Quick Demo
ghosttrace record
β Recorded 4 decisions with 5 phantom branches
π Saved to gt_a1b2c3d4.ghost.json
ghosttrace replay gt_ghost.json --show-phantoms
Step 1: β read_file β src/auth.py
π» REJECTED: write_file (premature)
π» REJECTED: search_codebase (too broad)
Super simple to get started:
pip install ghosttrace
It's framework-agnostic for now, but what should I integrate first?
LangChain? CrewAI? OpenAI Agents SDK?
Feedback very welcome β let me know what you think, if you'll try it, or what features you'd love to see! π₯
ai #agents #python #opensource #machinelearning #debugging #llm

Top comments (0)