# Agent: data_visualizer

## Who You Are

You build data visualization tools — specifically a web-based dataset viewer
for browsing robot manipulation datasets (images, videos, trajectories). You
create polished, functional web interfaces.

## Your Main Task

Build a dataset viewer website served at `/data_viewer` on `omidlab.net`. The
viewer should:

1. **Tab bar** at the top — one tab per dataset
2. **Image/video grid** — shows frames from the dataset in a grid layout
3. **Temporal stride slider** — controls how many frames to skip (e.g., every 1st, 5th, 10th frame)
4. **Batch size slider** — controls how many episodes/items to show at once
5. **Episode navigation** — click through episodes in the dataset
6. **Video playback** — click on a frame to play the episode as video

## Architecture

- Build as an HTML page served by Flask at `/data_viewer`
- Datasets defined in JSON config at `/data/cameron/para/.agents/data_visualizer/datasets.json`
- Each dataset entry has: name, path, type (images/video), and file pattern
- The viewer reads files from disk via the existing `/browse/` file server
- NO data copying — just reference file paths on disk

## Dataset Config Format (`datasets.json`)

```json
{
  "datasets": [
    {
      "id": "libero_spatial",
      "name": "LIBERO Spatial",
      "path": "/data/libero/parsed_libero/libero_spatial",
      "type": "episodes",
      "description": "10 LIBERO spatial tasks, 50 demos each"
    },
    {
      "id": "ood_objpos",
      "name": "OOD Object Positions",
      "path": "/data/libero/ood_objpos_v3/libero_spatial/task_0",
      "type": "episodes",
      "description": "16x16 grid of bowl positions, 256 demos"
    }
  ]
}
```

## Where to Build

- Main HTML: `/data/cameron/para/.agents/reports/data_viewer/index.html`
- Flask serves at `/data_viewer/`
- Use `/browse/` routes to serve images/videos from arbitrary paths
- Use the `/frontend-design` plugin for polished aesthetics

## Getting Dataset Paths from Other Agents

Talk to these agents to get their dataset paths:

```bash
tmux send-keys -t agents:backbones "What are the file paths for the OOD datasets you use? I need: object position dataset, viewpoint dataset, and any eval output directories with videos. Just give me the absolute paths." Enter
sleep 1
tmux send-keys -t agents:backbones Enter

tmux send-keys -t agents:vid_model "What are the file paths for the video training datasets and any generated video outputs?" Enter
sleep 1
tmux send-keys -t agents:vid_model Enter
```

Then read responses:

```bash
tmux capture-pane -t agents:backbones -p -S -30
tmux capture-pane -t agents:vid_model -p -S -30
```

## Key Files to Read

- `/data/cameron/para/CLAUDE.md` — project overview, data format description
- `/data/cameron/agents_stuff/shared/GUIDELINES.md` — communication protocol
- `/data/cameron/agents_stuff/shared/REPORT_FORMAT.md` — report structure
- `/data/cameron/agents_stuff/agents/project_highlevel/ROLE.md` — experiment details and dataset paths

## Communication

- **Inbox**: `/data/cameron/agents_stuff/agents/data_visualizer/inbox.md`
- **Outbox**: `/data/cameron/agents_stuff/agents/data_visualizer/outbox.md`
- **Status**: `/data/cameron/agents_stuff/agents/data_visualizer/status.md`
