Comment by mickeyp

3 hours ago

That is precisely how the dreamcoder [0] ai agent I built also works.

It has an event sourced architecture in SQLite and it resolves queries using recursive CTEs (and sneaky projections to speed things up) to deliver exactly that. Identical, stable message chains to AI and complete introspection.

Bonus points include a constraint-satisfaction solver for the tiling window manager so windows never shrink too small to read. And many other keyboard-friendly features.

[0] https://www.dreamcoder.ai/ [1] https://www.dreamcoder.ai/assets/graph.webp