How ritzraven19/agent-run-explorer works
Agent Run Explorer lets people find runs, inspect individual executions, stream a deterministic explanation, and view dataset-wide statistics. The main path is browser → Next.js pages → HTTP API → in-memory JSONL records, with filtering, sorting and pagination for lists and separate statistics aggregation for the dashboard. Detail pages fetch full runs; explanations are streamed directly from the browser to the API. The API also validates models and reports data-quality warnings. The README documents the storage and product capabilities; unsampled frontend helper and warning-display internals are represented at subsystem level.
Main entry points: main.py FastAPI routes · models.py Run and response models · api.ts Frontend API client · page.tsx Runs pages
Components 14
Web experience
- Runs pages
frontend/app/runs/page.tsx - Run detail page
frontend/app/runs/[id]/page.tsx - Run views and filters
frontend/components - Dashboard
frontend/app/dashboard/page.tsx - Dashboard charts
frontend/components/charts - Frontend API client
frontend/lib/api.ts
API orchestration
- FastAPI routes
backend/app/main.py
Run data
- JSONL run data
data/runs.jsonl - Data loading and warnings
backend/app/data.py - Run and response models
backend/app/models.py
Filtering and analytics
- Run filtering and paging
backend/app/filters.py - Run statistics
backend/app/stats.py
Run explanations
- Mock explanation provider
backend/app/explain.py
Other components
- Browser user
Connections 20
- Browser user → Runs pages: opens runs
README.md - Browser user → Dashboard: opens dashboard
README.md - Runs pages → Frontend API client: fetches stats
frontend/app/runs/page.tsx - Runs pages → Run views and filters: renders
frontend/app/runs/page.tsx - Run detail page → Frontend API client: fetches run
frontend/app/runs/[id]/page.tsx - Run detail page → Run views and filters: renders
frontend/app/runs/[id]/page.tsx - Dashboard → Frontend API client: fetches stats
frontend/app/dashboard/page.tsx - Dashboard → Dashboard charts: renders
frontend/app/dashboard/page.tsx - Frontend API client → FastAPI routes: HTTP requests
README.md - Browser user → FastAPI routes: streams explanation request
README.md - FastAPI routes → Data loading and warnings: loads at startup
backend/app/main.py - Data loading and warnings → JSONL run data: reads records
README.md - Data loading and warnings → Run and response models: validates records
backend/app/data.py - FastAPI routes → Run and response models: validates responses
backend/app/main.py - FastAPI routes → Run filtering and paging: queries runs
backend/app/main.py - FastAPI routes → Run statistics: aggregates stats
backend/app/main.py - FastAPI routes → Mock explanation provider: streams explanation
backend/app/main.py - Run filtering and paging → Run and response models: uses run types
backend/app/filters.py - Run statistics → Run and response models: uses run types
backend/app/stats.py - Mock explanation provider → Run and response models: describes run
backend/app/explain.py