Web visualization layer — Memory Agent, Visualized (FastAPI + React/Vite)#5
Open
Tbearly55 wants to merge 1 commit into
Open
Web visualization layer — Memory Agent, Visualized (FastAPI + React/Vite)#5Tbearly55 wants to merge 1 commit into
Tbearly55 wants to merge 1 commit into
Conversation
Replay-based visualizer for the Helios memory-agent demo. Additive — lives
entirely under web/ and never touches the agent scripts.
Capture layer:
- web/snapshot_memory.py — dump a memory store to web/data/memory_s<N>.json
(lifts inspect_memory.py's list/retrieve loop; injects truststore so the
Anthropic SDK works behind corporate TLS inspection).
- web/parse_outputs.py — outputs/session*.txt -> web/data/sessions.json.
Backend (web/backend/main.py, FastAPI):
- GET /api/sessions, /api/memory/{n}, /api/diff?from=&to= (per-file
added/removed/modified/unchanged + difflib unified diff). Serves the built
frontend at / for single-port prod.
Frontend (web/frontend, React + Vite):
- Answer Compare (word-level highlight of what got sharper), Memory Browser
(clickable /mnt/memory/ tree), Memory Diff (git-style red/green — the S8
headline). Stage-friendly dark theme with KPMG accent colors from skill_studio.
- ←/→ steps Session B; one-command dev launcher (web/dev.py).
Ships sample Helios/Northwind data so the UI runs before any live session.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns the three-terminal demo into one screen. Additive — everything lives under
web/and never touches the agent scripts (create_agent.py,run_session_*.py). Replays captured artifacts, so the demo needs no network.Three views (the terminal pains, fixed)
/mnt/memory/file tree at the selected session.difflibunified diff for modified files.Capture layer
web/snapshot_memory.py— dumps a memory store toweb/data/memory_s<N>.json(liftsinspect_memory.py's list/retrieve loop). Injectstruststoreso the Anthropic SDK works behind corporate TLS inspection — the same fixskill_studiouses, and the cause of theAPIConnectionErrorwe hit earlier.web/parse_outputs.py—outputs/session*.txt→web/data/sessions.json.Backend —
web/backend/main.py(FastAPI)GET /api/sessions,GET /api/memory/{n},GET /api/diff?from=&to=. Diff is computed, not captured, so re-running sessions never desyncs it. Serves the built frontend at/for a single-port prod deploy.Merged decisions
.envloading,truststoreTLS handling,/api/REST conventions.Run
Verification status (honest)
/api/sessions(3 sessions),/api/memory/1(8 files),/api/diff?from=1&to=2→ 2 added + 2 modified + 6 unchanged,from=2&to=3→ all unchanged (reinforces the S3 flag-and-ask story). All Python compiles.npm install && npm run build(orpython web/dev.py) on a machine with Node 18+ to verify the UI.🤖 Generated with Claude Code