Replyhaven: a help desk for a software company's support team
A live ticket queue with overdue badges, email replies, internal notes, canned replies, and who is viewing or typing on each ticket.
Agent specs
- Agent
- Claude Code, Opus 5.5 Medium
- Time
- 16 min
- Cost
- $6.19*
Agents work faster and more accurately on Elements.
* Cost at API rates, October 2026.
Run it yourself
Paste this prompt into your AI agent. You get the finished app on your own machine, ready to change however you like.
Install elements: curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH Create an Elements app from the elementscode/demo-replyhaven scaffold: cd ~/elements/projects elements create replyhaven -scaffold=elementscode/demo-replyhaven cd replyhaven Start the app.
How it's built
Replyhaven needed a shared queue that reorders itself as tickets arrive, conversations that stay current in every open window, email both ways with customers, and a way for agents to see who else is on a ticket. Each of those is a part of Elements, so the agent spent its 16 minutes on the help desk itself.
What Elements gave the app
- A live queue and conversations. Tickets, messages and canned replies are LiveTables. A database trigger announces every change, so a new ticket from the contact form lands in each agent's queue, sorted by priority then age, and a reply appears in every open copy of the ticket.
- First reply targets. Each priority has a target, from one hour for urgent to 24 for low. The queue counts down to each ticket's target, marks it overdue once the time passes, and the dashboard reports the median first reply and the share that met the target.
- Who is viewing and typing. A presence channel records each open ticket page, which shows "Priya is also viewing this ticket" and an eye with avatars on the queue row. A typing channel carries "is writing a reply" between agents on the same ticket.
- Email both ways. The public contact form opens a ticket and emails the customer a confirmation. An agent's reply schedules a background job that emails it to the customer, and internal notes stay with the agents.
- Server calls as function calls. The contact form, invites and presence lookups call server functions straight from the page with
@rpc, with types checked from the template to the database. - Sessions and roles. The admin invites agents by email and manages canned replies, and every server call checks the signed-in role with one shared guard. Migrations define the schema and seed one admin, three agents and 20 tickets with their conversations.
What the project server gave the agent
The project server runs alongside the agent and answers as soon as a file is saved: it type-checks the templates, TypeScript and SQL, applies migrations and reruns the tests, so every question came back right away and the agent kept building.
What shipped
The app type-checks with zero errors and all 20 tests pass. Every page works on desktop and phone, and the queue, conversations and who is viewing update live across tabs.
The code
Build it from scratch
To watch your agent build this app from an empty project, use the prompt we used instead. It takes longer than starting from the finished app above.
Install elements: curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH Create an Elements app: cd ~/elements/projects elements create replyhaven cd replyhaven Start the app, then build this: Build a help desk named replyhaven for a software company's support team. Two kinds of accounts: admin and agent. The admin invites agents by email. Customers never sign in: they write in through a public contact form and get replies by email. - Tickets: subject, customer name and email, status (new, open, pending, solved), priority (low, normal, high, urgent), assigned agent, tags. - A shared queue with views for unassigned, mine and each status, sorted by priority then age. A ticket waiting past its first reply target gets an overdue badge. - First reply targets per priority: urgent 1 hour, high 4, normal 8, low 24. - Ticket view: the conversation with the customer, internal notes only agents see, and a reply box. Replying emails the customer. - Canned replies that agents insert into a reply and the admin manages. - Dashboard: open tickets by status and priority, tickets solved this week per agent, and median first reply time. - An agent sees when another agent is viewing or typing a reply on the same ticket. Seed one admin, three agents and twenty tickets across statuses and priorities, with conversations. Show the seeded logins on the sign-in page. The queue, ticket conversations and who is viewing update in real time.
Comments· 0