Skip to content

Persist session evidence and searchable conversation memory - #58

Merged
devhims merged 2 commits into
mainfrom
feat/session-evidence-memory
Sep 19, 2026
Merged

devhims merged 2 commits into
mainfrom
feat/session-evidence-memory

Conversation

@devhims

@devhims devhims commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Follow-up runs currently retain source evidence mainly through earlier answers and per-run tool records. This can repeat extraction, lose raw data when analysis fails, and reuse ambiguous transcript citation IDs. Older messages also fall outside the eight-turn prompt window without a way for the model to retrieve them.

Add reusable session evidence on the existing Durable Object SQLite and R2 bindings. Complete transcripts, comments, storyboard sheets and frames persist independently of analysis. Explicit refresh bypasses transcript/comment provider caches and preserves version-specific citations. Partial or empty transcripts are not reusable.

Use Cloudflare's experimental Session API for searchable conversation history and model-facing searchable contexts. Original user messages, including failed requests and literal retry messages, are indexed from existing run records. Research, inspection and the shared finalizer can search history, memory, transcript passages and saved visual/comment observations. A paginated reader supports listing older messages. Classification keeps its compact inventory, memory briefing and eight recent turns. Evidence search results resolve to persisted citations; validated memory updates commit with the answer. The finalizer can request one inspection when existing context is insufficient, including for a video recovered from older history, and reserves its last model step for an answer.

Dashboard controls expose stored assets and memory. Deletion removes dependent findings, historical source copies and search entries. SQLite triggers keep context-index deletion and memory correction synchronous; generation checks prevent in-flight retrieval or index backfill from restoring deleted assets. The Session API is isolated behind one adapter using the existing pinned agents@0.21.0 dependency. Custom evidence/memory FTS5 providers preserve citation and deletion rules.

Validation:

  • 611 platform unit tests pass, with 7 existing skips.
  • 65 local Durable Object/SQLite/R2 integration tests pass. The 21 evidence/search tests were rerun after the finalizer budget change.
  • Tests exercise real SDK search tools through model-driven inspection and resumed finalization, retrieval beyond eight turns, pagination, literal retries, corrections, superseded versions, deletion races, account deletion and session isolation.
  • Platform type checking, generated API documentation checks and git diff checks pass.
  • Earlier validation of the unchanged dashboard includes 32 web unit tests, 19 Chrome session tests and the web production build.

Search is lexical, not semantic. Conversation history is indexed from existing runs, but historical run evidence is not retroactively converted into raw assets. Session compaction and frozen context prompts are not enabled; the existing five-step finalizer and cost budgets remain. No production deployment or live Fireworks inference benchmark was performed. Model/provider responses in tests are controlled fixtures.

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Sep 19, 2026 12:02pm UTC

@devhims devhims changed the title Persist session evidence and grounded memory across agent runs Persist session evidence and searchable conversation memory Sep 19, 2026
@devhims
devhims marked this pull request as ready for review September 19, 2026 12:17
@devhims
devhims merged commit 330fc9d into main Sep 19, 2026
6 checks passed
@devhims
devhims deleted the feat/session-evidence-memory branch September 19, 2026 12:17

This branch was successfully deployed

1 active deployment
Preview edbfc149 Deployed Sep 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant