Skip to main content

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.
Works with
JavaScript / TypeScriptPythonNext.jsFastMCPLangChain / LangGraph
Stack
Next.js dashboard, two FastMCP servers, LangGraph agent

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​

WhoRole in the applicationIdentity in LumoAuth
Support representativeWorks tickets and approves refunds.A user with the role support-rep, signed in with a passkey.
Support leadSees every approval and can suspend Haven.A user with the role support-lead.
HavenReads tickets, drafts replies, proposes refunds.An agent that signs its requests with AAuth and acts for the representative.
Ticketing and billing serversHold the tools.Two registered MCP servers.

Flows​

FlowWhat happensWhat LumoAuth does
Sign-inThe representative signs in with a passkey.Hosted sign-in, authorization code with PKCE.
Hand overThe representative turns Haven on for their queue.Consent screen, then a token exchange: the person is the subject, Haven is the actor.
Read a ticketHaven calls get_ticket at the ticketing server.The server verifies the token and asks LumoAuth whether this agent may run this tool.
Small refundHaven refunds 20 dollars.A rule approves requests under the limit. The record names the rule.
Large refundHaven asks to refund 400 dollars.A just-in-time request goes to the representative: in the dashboard, and as a push on the phone.
ReviewThe lead reads the timeline of Haven.Audit events with the trace of each run. A webhook posts approvals to the team channel.

Parts​

PartBuilt withJob
DashboardNext.js, @lumoauth/nextjsTickets, the copilot pane, the approvals inbox, the "How this works" panel.
Ticketing serverFastMCP, lumoauth-fastmcpTools for tickets. Per-tool policy.
Billing serverFastMCP, lumoauth-fastmcpTools for invoices and refunds. The refund tool needs approval.
HavenLangGraph, the Python SDKThe 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-rep and support-lead.
  • An auto-approve rule for refunds under 100 dollars.
  • A webhook for the approval events.

Walkthrough​

  1. Sign in as the representative and open a ticket.
  2. Turn Haven on, and read the consent screen.
  3. Accept a drafted reply.
  4. Ask Haven for a 400 dollar refund, and approve it.
  5. Deny a second one, and read how Haven explains the refusal.
  6. 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.