system/architecture.md
All foreign keys use slug strings (not integer IDs).
agents — Registry of all AI agents with status, type, and configtasks — Work items with stage pipeline and agent assignmentskills — Capability catalogskill_assignments — Agent-skill join table with proficiency scoresactivities — Chronological log of all agent actionsusages — Per-agent, per-period API cost and token trackingusers — Human operators with bcrypt + Google OAuth autherror_logs — Structured error capture with polymorphic contextnew → queued → in_progress → done
→ failed
any stage → archived
JSON API at /api/v1/ for programmatic agent access:
- GET/POST /api/v1/tasks — List and create tasks
- POST /api/v1/tasks/:slug/queue|start|complete|fail_task — Stage transitions
- GET/PATCH /api/v1/agents/:slug — Read and update agent status
- POST /api/v1/activities — Log agent activity
- POST /api/v1/usages — Report usage metrics
Dashboard is public (monitoring). Task mutations require authentication.
All views use the shared dark theme with stage-colored badges.