Skip to content
OTFotf
All posts

How Papaya Global built a no-engineer production compliance agent with Claude

D
DaveAuthor
7 min read
How Papaya Global built a no-engineer production compliance agent with Claude

Payroll compliance is one of the least forgiving places to ship experimental AI. A global payroll operation spans dozens of jurisdictions, each with its own statutes, contracts, and edge cases — and a single confident-but-wrong answer can turn into real government penalties. Meanwhile the competition is not another payroll dashboard. It is the ChatGPT tab every customer already has open at 2am.

That tension is what makes the compliance-agent pattern worth studying. One payroll provider's much-discussed example — a production compliance agent assembled from Claude, Lovable, and Supabase by a product team rather than a standing ML org — shows what separates a production-grade answer pipeline from a chatbot with a logo. This post keeps the pattern and trims the specifics that could not be independently verified, so what remains is reproducible guidance.

Why generic chatbots fail in regulated domains

Generic chatbots look excellent in a vacuum: instant answers, authoritative tone, 24/7 coverage. The moment regulation or liability enters the picture, that same fluency becomes the risk. A general-purpose model has no hardwired notion of jurisdiction, no up-to-date statutory base, and no mechanism for saying "I do not know this country's rule." It fills gaps with alarmingly plausible text.

Consider the shape of the failure, using illustrative examples rather than attributed incidents. A client asks whether they can terminate a worker in a specific country on specific grounds. The model answers quickly and confidently. Or a team runs a real employment contract through two different models, gets two incompatible answers, and finds on human review that neither was fully correct. The danger is not model selection. It is that general-purpose AI does not know its own knowledge boundaries.

For high-stakes domains this creates a hidden risk profile: the quick answer nobody vetted becomes the legal liability nobody budgeted for. If your domain has fines, filings, or employment consequences, "sounded right" is not a compliance strategy. For the broader checklist of what production AI needs before it touches real users, see our AI app security checklist.

What production-grade actually means

A production compliance agent is not a fancier chatbot. It is a system that delivers auditable, current, domain-correct guidance in real time. Four properties separate it from generic bots:

  • Domain specificity is mandatory. The agent must consult regulatory material, company policies, and edge cases that differ by country and employment type — retrieved per question, not memorized at training time.
  • Auditability comes first. Every answer should be traceable to a source: a statutory excerpt, a policy timestamp, a documented decision tree. If you cannot show what the answer was based on, you cannot defend it.
  • Accuracy has no "close enough." In payroll, a wrong yes-or-no can mean penalties or blacklists. The system must prefer escalation over guessing.
  • Trust is explicit and earned. Answer history, sources, and last-synced dates are shown to end users, and the provider absorbs the cost of mistakes rather than passing ambiguity to the customer.

Contrast this with a raw chat model: no jurisdiction scoping, no retrieval base, no record of what law sat behind a given answer. The gap between those two systems is the entire project.

11 production screens. Login and database wired.

The SaaS Dashboard Kit includes login, a database, and a working dashboard. Live demo at saas.otf-kit.dev.

See the live demo

The no-backend pattern: model plus interface plus source of truth

The interesting architectural claim in the compliance-agent story is the stack shape: a frontier language model for reasoning, a no-code builder for the chat interface, and Postgres for the regulatory source of truth — connected by product and domain teams rather than a bespoke backend project.

Each leg of that triangle is independently verifiable technology. Anthropic's prompting guidance documents how system prompts and role instructions scope Claude's behavior, which is exactly the mechanism a guardrailed agent uses to constrain answers to retrieved material (prompting best practices). Supabase's AI toolkit shows Postgres with pgvector acting as the retrieval and source-of-truth layer AI applications query at scale (Supabase AI and vectors). And Lovable operates as an AI app builder with a live integration ecosystem, which is what makes the "interface without a frontend sprint" leg plausible (Lovable blog).

The workflow shape looks like this:

  1. A client question (for example, a termination question in a specific jurisdiction) enters through the chat interface.
  2. The interface layer triggers a domain-specific prompt build, pulling candidate policies and prior guidance from the Postgres store.
  3. Claude processes the prompted context under strict scope instructions and returns an answer; both prompt and output are logged.
  4. Compliance-relevant answers are tagged and queued so the compliance team can review, flag, and refine borderline cases — and prompt or policy fixes ship without engineering involvement.

The structural advantage is iteration speed: business teams validate output daily, and gaps close as prompt or data fixes rather than deploy trains. The slow part, by every account of this pattern, is client trust — which accumulates over months of audits and demonstrated reliability, not at launch. Product build is the fast half; trusted answers are the long half.

How to deploy this pattern with AI and no-code tools

You do not need a machine-learning headcount to build a scoped answer agent. The reproducible core is four steps:

  1. Define your domain-specific regulatory map. Start by cataloging the recurring questions and the authorities behind them — your mini knowledge base. For payroll that means country-by-country rules, contract types, and documented precedent. Each entry needs a jurisdiction, a rule name, an excerpt, a legal citation, and an updated-at timestamp:
// Example: US overtime rule entry in Supabase
{
  jurisdiction: "US",
  rule: "Overtime Pay",
  excerpt: "Nonexempt employees must receive overtime...",
  legalCitation: "FLSA Sec. 207(a)(1)",
  updatedAt: "2026-05-01"
}

Keep this table current the way you would keep code current, because stale law served confidently is worse than no answer. If your source of truth lives in Postgres, lock it down the same way you would any production data — our Supabase RLS production checklist covers the row-level rules that keep tenant and jurisdiction data separated.

  1. Scope the model with system instructions. Use prompt templates and system messages that restrict scope: only answer when legal authority was retrieved, cite the regulation and last update, and escalate to a human or request documentation when ambiguous. Explicitly forbid guessing:
{
  "system_instruction": "If the law for the user question exists in the retrieved context, cite the regulation and respond. Otherwise, escalate to a human or request clarifying documentation."
}
  1. Wire the chat interface to show its work. The UI should display and annotate outbound answers with sources and last-synced dates, and product or support staff should be able to adjust question flows without a deploy. Zero-friction iteration is the point of the no-code layer.

  2. Close the loop with human review. Tag compliance-relevant answers, queue them for domain review, and feed corrections back into the knowledge base and prompts. Ship the review habit before you scale the question volume — the ship-to-production checklist applies here exactly as it does to any AI MVP going live.

One framing caution: treat vendor anecdotes in this genre — timelines, headcounts, fine amounts, named conference sessions — as marketing-shaped unless you can verify them against a primary source. During this retrofit, the specific figures attached to the Papaya example (country counts, penalty amounts, event sessions, head-to-head model test results) could not be confirmed against a live primary, so they were removed rather than repeated. The architecture pattern above survives that trim because each leg is cited to its own documentation. Trim beats fabrication, every time.

In regulated workflows, the line between your company and a painful penalty is a trustworthy, domain-aware, rigorously auditable answer pipeline. With a scoped frontier model, a Postgres-backed source of truth, and an interface layer your domain team can iterate, teams of any size can deploy compliance agents that clients rely on — turning AI from a liability risk into a genuine competitive defense.

Ready to ship AI features on infrastructure you control? Explore the OTF templates — full-stack kits your coding agent can take to production.

Sources

  • Anthropic: prompting best practices for Claude — system prompts and role instructions that scope model behavior; basis for the guardrail-prompt claims.
  • Supabase docs: AI and vectors — Postgres plus pgvector as the retrieval and source-of-truth layer; basis for the Supabase-side architecture claims.
  • Lovable blog — confirms Lovable as a live AI app builder with an integration ecosystem; basis for the interface-layer existence claim only.
agentssupabasebackend
OTF SaaS Dashboard Kit

Ship the product, not the setup.

  • 11 production screens — auth, team, analytics, and settings
  • Login and a real database are wired in
  • AI configs pre-tuned so your agent extends instead of regenerates
Need more than components?

Full-stack kits.
Pay once, own the code.

SaaS Dashboard and Fitness include authentication and a database. Arcade is browse-first with a local demo session and no backend sign-in by default. Booking is in Preview; Marketplace is coming soon and not currently sold. The Bundle includes the three live kits.

Everything Bundle — $149See full pricing

Get the free AI configs pack

AI configs in every kit: CLAUDE.md, .cursorrules and task prompts. Drop them in and your AI tool instantly understands your project.

No spam. Unsubscribe any time.

Prefer the free SDK? Star it on GitHub →