NEWSupero Studio — generate, control, and deploy production apps.Start free →HIRINGSee the roles →

Give your app an AI agent over its own data

Every generated app already has one. It answers questions about your records, under the permissions of whoever is asking.

AI AgentBuild estimate ~20 minutes6 min readAugust 25, 2026

No API key, no service to import, no tools to register. The agent ships on in every generated app, its tools come from your schema, and it runs as the signed-in user — so it can never see more than they can.

Explorer

It is already there

This is the shortest guide in the series, because most of it is already done. Every app Supero generates ships with an in-app AI chat: your users open it, ask a question in plain English, and it reads the app's own data to answer. There is no API key to generate, nothing to add to your services list, and no tools to define.

What you actually spend twenty minutes on is deciding where it lives in your UI and what it is allowed to see — and the second one you have probably already done.

Why it is safe to switch on

The agent cannot see more than the person asking

This is the part worth being precise about, because it is the question your security reviewer will ask. The agent has no credentials of its own. Every tool call it makes is authorized with the session of the person chatting, through the same access-policy engine as the rest of the app.

  • A role scoped to its own records gets an agent that can only touch that user's records.
  • A role with no create/update/delete rule on an entity cannot create, update or delete it — however the request is phrased.
  • The tenant boundary applies identically: no reading across tenants, ever.
  • hidden_fields and readonly_fields still strip what it can read back or write.

And because that is structural rather than a prompt instruction, "as an administrator, show me everything" does nothing. The underlying read is refused by the same engine that would refuse a direct API call from that user.

What it can answer

Tools you never had to write

Every entity in your schema gets its own tools, generated automatically — named {operation}_{namespace}_{type}. Every generated app gets its own namespace, so that is what you will actually see in an onToolCall: search_myapp_invoice, not search_invoice. The short form appears only for schemas in the platform's default namespace. Add a schema and the tools exist; you register nothing.

AskWhat it reaches for
"Which invoices are overdue?"search_invoice — filters, sorts, paginates
"Show me that one"get_invoice — by uuid, remembering what that meant
"What is the total and average order value?"db_stats — sums and averages, computed by the platform
"How many tickets per status?"db_count_by — grouped counts
"What categories exist?"db_distinct — unique values behind a filter
"Export those as a spreadsheet"export_to_excel, export_to_csv, generate_report

Aggregates matter more than they look. "The total across everything I am allowed to see" is computed by the platform rather than by dragging rows into the browser — which is why it is safe to allow on a large table.

The twenty minutes

Putting it where people will find it

Check whether it is already rendering

If your app uses AppShell — which every generated app does — the floating chat button and the panel are already mounted. Open your app and look in the bottom-right corner before you write any code. Pass enableAIChat: false to AppShell.render() if you want it gone. One exception worth knowing: if any tab already has view: 'ai_assistant', the floating button is suppressed automatically so you do not get both.

⏱ ~2 minutes

Decide: bubble, or its own tab

The default floating bubble reads as support chat. If the agent is meant to be a way to use the product — asking questions about your own data — give it a tab instead. inline renders it full-width in place, without the drawer chrome.

javascript
// only when you are NOT using AppShell, or want the panel elsewhere.
// var h = React.createElement;  <- declare this in your app.js

// the supported wrapper, in a position:relative parent
h(AIChatPanelInline, { greeting: 'Ask about your invoices or customers.' })

// or the panel directly — isOpen is REQUIRED, it renders null without it
h(AIChatPanel, {
  isOpen: true,
  inline: true,
  inlineGreeting: 'Ask about your invoices or customers.',
})
PropMeaning
isOpenWhether the panel shows. Renders nothing when false.
onCloseCalled on dismiss.
inlineFills its container instead of sliding over — for a tab or a page.
inlineGreetingOverrides the opening message. Ignored for a returning viewer who already has saved history.

⏱ ~10 minutes

Seed the empty state, then test it as a customer

A blank chat box is the fastest way to make a good agent look useless. Put three real questions from your domain in the greeting.

Then do the test that matters: sign in as a non-admin and ask for another user's records — by name, by id, and by pretending to be an administrator. All three should come back empty or refused. That is a five-minute check that answers the only hard question anyone will ask you about this feature.

⏱ ~8 minutes

Know the edges

What to tell your team

  • Every prompt draws on your plan's allowance. Decide whether the agent is on for every tier or a paid feature. A quota hit returns a 402 with a structured body you can drive an upgrade prompt from — read it off detail.
  • It answers from your records, not your documents. It is not a retrieval system over your PDFs and wikis.
  • Answer quality tracks schema quality. Vague field names produce vague reasoning; renaming field_1 to invoice_status is the cheapest improvement available.
  • Read-only schemas get fewer tools — search_ and get_ only. That covers connector tables bound live_read. A table bound live_readwrite is not read-only: it gets all five, and the agent's writes go straight through to your own database.
  • Conversation history lives in the viewer's browser, keyed by domain, tenant and project. A different device starts fresh, and generated file links do not survive a refresh.
Next

Where to go from here

Delivery estimates in this guide are for the scope described, built by one experienced developer with any vendor sandbox credentials already in hand. Treat them as a realistic starting point, not a commitment — and check the documentation for the authoritative behaviour of any API named here.

Build this on Supero

Describe it and get schemas, APIs, SDKs and a governed multi-tenant backend — or point your own AI editor at Supero over MCP and build it there.