# TASK: Add Task Board Page to AgentPi Dashboard **Priority:** HIGH (we need visibility into what tasks are queued/running/done) **Agent:** engineer **Filed:** 2026-02-16 **Filed by:** Doug (via Claude Code session) --- ## The Problem We can now file tasks as `.md` files in `AgentPi/tasks/` and the event bridge auto-enqueues them. But there's no way to see: - Which tasks have been filed - Which ones have been picked up by agents - What the agent produced (output, commits, errors) - Whether a task needs Doug's approval before the agent acts We need a `/tasks` page on the Pi dashboard. --- ## What to Build ### Add a `/tasks` route to the dashboard web server The dashboard is at `AgentPi/dashboard/` (Flask app served on the Pi). **New page: `/tasks`** — shows all task files with their status. ### Data Sources 1. **Task files:** `AgentPi/tasks/*.md` — the raw task descriptions 2. **Seen tracker:** `/data/agentpi/state/tasks_seen.json` — list of filenames that have been enqueued 3. **Job queue:** `/data/agentpi/jobs.db` — SQLite, has jobs with `source='task_file'` and `source_id=filename` 4. **Job logs:** The job queue tracks status (pending/running/completed/failed) and agent output ### UI Design Simple table/card layout matching existing dashboard style: | Task | Agent | Priority | Status | Filed | Output | |------|-------|----------|--------|-------|--------| | Authority Names Integration | engineer | HIGH | Running | Feb 16 | [View Log] | | Audit Trigger Watcher | engineer | HIGH | Queued | Feb 16 | — | | GDrive Historical Scan | data_pipeline | MEDIUM | Queued | Feb 16 | — | | Field Lineage Architecture | engineer | HIGH | Queued | Feb 16 | — | | ISOXML Boundary Fix | engineer | — | Completed | Feb 15 | [View Log] | **Status flow:** Filed → Queued (in tasks_seen.json) → Running (job in progress) → Completed/Failed **Color coding:** - Filed (gray) — task file exists but not yet seen by event bridge - Queued (blue) — enqueued in job queue, waiting for agent - Running (orange) — agent is actively working on it - Completed (green) — job finished successfully - Failed (red) — job errored out ### Task Detail View Clicking a task row shows: - Full markdown content of the task file (rendered) - Job queue entry (if exists): agent, started_at, completed_at, cost - Agent output/log (if available) ### Future: Approval Gates (NOT for this task) Later we'll add approval flow where agents propose changes and Doug reviews before they commit. For now, just visibility. --- ## File Locations - **Dashboard app:** `AgentPi/dashboard/app.py` (or wherever the Flask app lives) - **Dashboard templates:** `AgentPi/dashboard/templates/` - **Task files:** `AgentPi/tasks/*.md` - **State files:** `/data/agentpi/state/tasks_seen.json` - **Job queue DB:** `/data/agentpi/jobs.db` --- ## Integration Add a "Tasks" link to the dashboard navigation bar, alongside existing pages (Agents, Costs, Logs, etc.). --- ## DO NOT - Do NOT build approval/review flow yet — just visibility for now - Do NOT modify the event bridge or task file format - Do NOT build this as a separate app — add to the existing dashboard