Picasso — SQLite persistence for Agent Framework, and seeing what compaction removes #8241
1picassoai
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
My agent started ignoring its own instructions halfway through a long conversation. I rewrote the prompt three times before working out what it actually was: compaction had dropped the opening user message. Nothing in the logs said so. An agent that has had its instruction removed and an agent that is ignoring it look identical from the outside.
So I wrote two small MIT packages to make it visible.
Persistence — a SQLite
ChatHistoryProvider, one line:Conversations survive restarts, and every compaction is recorded: before count, after count, and whether the first user message survived.
Dashboard —
app.MapPicasso(), then open/picasso. Turns, tool calls, timings, and a compaction log that names a dropped first message rather than leaving you to infer it. Read-only, every route a GET, Chart.js embedded so it works offline. Nothing leaves the machine.The bit worth knowing even if you never install it: detection has to live in
InvokingCoreAsync, notStoreChatHistoryAsync. The base class strips provider-contributed messages before the latter runs, so the counts there tell you nothing about what compaction removed. Cost me an evening. Also compare messages by reference, not content —CompactionProvidermutatesAdditionalPropertieson survivors in place.Does not prevent compaction, only records it. SQLite only. Local dev tool, not production observability.
MIT, net8.0/9.0/10.0, source at https://github.com/1picassoai/picasso — I wrote them, so treat that as a disclosure. Free, no paid version, nothing to upgrade to.
Is this as invisible for everyone else, or are you surfacing it some other way?
All reactions