Havendesk
A support desk in which an AI copilot works tickets next to a human agent, acts for that person, and asks before it issues a large refund.
ApplicationPlanned
This example is planned. Not built yet. This page is the specification for the example.
Scenario
A support representative opens a ticket. "Haven", the copilot, has already read it, found the customer's billing history and drafted a reply. The representative accepts the draft. For a refund above 100 dollars, Haven stops and asks the representative, who approves in the dashboard or on the phone. Every action of Haven is recorded with the representative it acted for.
People and agents
| Who | Role in the application | Identity in LumoAuth |
|---|---|---|
| Support representative | Works tickets and approves refunds. | A user with the role support-rep, signed in with a passkey. |
| Support lead | Sees every approval and can suspend Haven. | A user with the role support-lead. |
| Haven | Reads tickets, drafts replies, proposes refunds. | An agent that signs its requests with AAuth and acts for the representative. |
| Ticketing and billing servers | Hold the tools. | Two registered MCP servers. |
Flows
| Flow | What happens | What LumoAuth does |
|---|---|---|
| Sign-in | The representative signs in with a passkey. | Hosted sign-in, authorization code with PKCE. |
| Hand over | The representative turns Haven on for their queue. | Consent screen, then a token exchange: the person is the subject, Haven is the actor. |
| Read a ticket | Haven calls get_ticket at the ticketing server. | The server verifies the token and asks LumoAuth whether this agent may run this tool. |
| Small refund | Haven refunds 20 dollars. | A rule approves requests under the limit. The record names the rule. |
| Large refund | Haven asks to refund 400 dollars. | A just-in-time request goes to the representative: in the dashboard, and as a push on the phone. |
| Review | The lead reads the timeline of Haven. | Audit events with the trace of each run. A webhook posts approvals to the team channel. |
Parts
| Part | Built with | Job |
|---|---|---|
| Dashboard | Next.js, @lumoauth/nextjs | Tickets, the copilot pane, the approvals inbox, the "How this works" panel. |
| Ticketing server | FastMCP, lumoauth-fastmcp | Tools for tickets. Per-tool policy. |
| Billing server | FastMCP, lumoauth-fastmcp | Tools for invoices and refunds. The refund tool needs approval. |
| Haven | LangGraph, the Python SDK | The agent loop, with a node that waits for approval. |
What the seed script creates
- An application for the dashboard.
- The agent Haven, with an AAuth key and the switch "May act on behalf of users".
- Two MCP servers with their scopes.
- The roles
support-repandsupport-lead. - An auto-approve rule for refunds under 100 dollars.
- A webhook for the approval events.
Walkthrough
- Sign in as the representative and open a ticket.
- Turn Haven on, and read the consent screen.
- Accept a drafted reply.
- Ask Haven for a 400 dollar refund, and approve it.
- Deny a second one, and read how Haven explains the refusal.
- Sign in as the lead and suspend Haven.
Before you run it
- Check that your plan includes just-in-time permissions, acting for users and fine-grained authorization in the plans matrix.