gflores05’s movie chatbot uses Jev to trim a tool-using conversation without breaking its message structure. The app searches an in-memory catalog through LangGraph tools and saves conversations in SQLite. Its filtering step starts after the chat grows beyond eight messages.
Keep dependent messages together
group_units()joins an assistant tool-call message to the following tool responses. Jev scores the unit, so a dropped search call takes its results with it. Otherwise a retained tool response without its call can make the chat history invalid.- The code asks two Jev yes/no (
Noul) questions per earlier unit: whether it contains useful information about the person or remains relevant. A score of 0.8 or above on either question retains it. - The first unit and the latest human turn onward always survive.
RemoveMessage(id=REMOVE_ALL_MESSAGES)replaces the previous history with the retained messages. The model is not allowed to delete the latest turn.
Where the guarantee ends
The repository’s test uses a fake classifier and fake chat model to check that a sample search and result disappear together while a stated movie preference remains. It tests the grouping and replacement policy, not Jev’s judgment quality. The code groups consecutive tool messages with a preceding tool call; unusual interrupted or interleaved tool histories need separate tests. At the cutoff, real Jev errors have no local fallback in the filter method, and false deletions may lose useful context. Typed scores do not prove the retained memory is correct.
Verification: inspected the README, graph.py, tests and in-memory catalog at commit 4e3d3f6. Did not run the app, its tests or paid APIs. This extends the author’s earlier smart-memory-chat by handling tool calls; it is a workflow example, not a measured model comparison.