Customer support · enforced, not requested

An AI support agent whose money rules can't be argued with.

ShopFast answers real customers about real orders. The refund cap, the verify-before-disclose rule and the escalation policy live in agent hooks and Postgres constraints — not in a system prompt the model can be talked out of.

Four layers, each one machine-checkable.

Deterministic enforcement

The refund cap is a PreToolUse hook, not a suggestion.
PreToolUse hooks read the actual tool argument the model is about to send and deny it outright when it breaks policy. No prompt wording changes that — the hook runs whether the model is polite about it or not.

Verify before act

No order lookup, no refund, until the customer is confirmed.
The agent has to verify identity before it can see an order or move money. Skip the check and the hook fires; the attempt is logged as denied, not quietly ignored.

Audit trail in Postgres

Every decision is a row, not a transcript you have to re-read.
Hook decisions, processed refunds, blocked refunds, tickets and messages all land in Postgres as they happen. Reproducing what the agent did is a query, not an investigation.

Read-only by default

The agent's database role can't write outside its own tools.
Order and policy lookups run through a read-only role. Money only moves through the process_refund tool, which is itself gated by the enforcement hook and a database trigger that guards against over-refunds.

How a ticket moves through the agent.

01

Verify

Confirm who the customer is before anything else is disclosed.

02

Look up

Read the order, the delay, the policy — through a read-only role.

03

Act

Process a refund inside policy limits, or explain why not.

04

Escalate

Over the limit or outside policy: a ticket, not an override.

What the console shows.

Sign in and every ticket ID (sequential, from a Postgres sequence) resolves to the full conversation that produced it.

Live transcript
Every tool call, hook decision and reply as it happens, with a per-turn cost and token footer.
Refunds & escalations
Processed refunds in teal, BLOCKED attempts in red, human escalations in amber — colour is never decorative here.
Tickets, filtered
Every ticket the agent or a human closed, with the order, the issue and who handled it.

Watch it deny a refund it shouldn't make.

Open the storefront, chat as a customer, then sign in to the dashboard to see the same conversation as hook decisions, ticket rows and refund rows.