Appbricx
Features

Build

  • Coding agents and MCP
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Payments

Logic

  • Workflows and jobs
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
All features
ShowcasePricingDocs
Log inStart free
  • Features
  • Showcase
  • Pricing
  • Docs
  • Log in

Build

  • Coding agents and MCP
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

  • Row-level security
  • Sign-in and auth
  • Payments

Logic

  • Workflows and jobs
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
  • All features
  • Coding agents and MCP
  • Verify testing
  • Builder console
  • Postgres database
  • Data API
  • Realtime
  • Row-level security
  • Sign-in and auth
  • Payments
  • Workflows and jobs
  • AI in your app
  • Integrations
  • Backups and rollback
  • Hosting and domains
  • Self-host and export
  1. Home
  2. Features
  3. AI in your app

AI in your app

AI features for your users, without a model key in the browser.

Suggest a class, draft a reply to a ticket, summarise a month, give a student a hint. One call from a screen or a workflow returns text. The model key never reaches the browser, and you decide how much each app and each user may spend.

Start freeRead the guide
Ticket #4821relay, agent inbox

Priya My export has been stuck at 90% since this morning. Can you check?

Suggested reply · app.ai.ask

Sorry about that, Priya. I've restarted the export on our side; it should finish in a few minutes and you'll get an email when it's ready.

Use replyEdit

Key on the server · 1,240 of 50,000 tokens used today

app.ai
ask and chat from any screen
ctx.ai
The same calls in workflows
Your key or credits
Pinned per project
Budgets
Per app and per user, with rate limits

How AI calls work

  1. 1

    Turn AI on for the project. Calls use your plan's AI credits, or your own model key (Anthropic, OpenAI, Azure OpenAI and many more) pinned to the project.

  2. 2

    Call app.ai.ask(prompt, { system, maxTokens }) behind a user action, or app.ai.chat for a conversation. Catch the error and show a fallback.

  3. 3

    For server-side AI, call ctx.ai.ask in a workflow or server function, for example to tag every new ticket before anyone looks.

screens/ticket.tsx
// in the browser: the key stays on the server
const draft = await app.ai.ask(
  `Draft a reply to: ${ticket.body}`,
  { system: "You are a calm support agent.", maxTokens: 600 },
);

// workflows/triage.ts: on every new ticket
const a = await ctx.ai.ask(`Ticket: ${row.body}`,
  { system: "Reply with one word: urgent, normal or low." });
await ctx.db.update("ticket", String(row.id), { priority: a.trim() });

In-app AI you stay in control of

  • Ask and chat

    app.ai.ask returns one answer; app.ai.chat holds a conversation with a system prompt, from any screen.

  • AI in background jobs

    ctx.ai runs in workflows and server functions, so triage and summaries can run on a schedule or on every new row.

  • Keys never leave the server

    Screens call Appbricx, Appbricx calls the model. Nothing secret is shipped to the browser.

  • Bring your own key

    Pin your own provider key per project and your provider bills you directly, or use plan credits.

  • Budgets and limits

    On or off per project, a model allow-list, token budgets for the app and per user, and rate limits that cut a loop off quickly.

  • Embeddings too

    The AI API also serves embeddings with the project's key or credits, metered the same way.

Learnly's tutor gives hints, not answers

Take a quiz in Learnly and ask for a hint: the tutor answers with a system prompt that forbids giving the answer away. Relay suggests replies to agents and Ledgerly explains a member's month in plain English.

Open Learnly Demo logins for every role

Learnly, courses with quizzes, streaks and an ai tutor, on desktop

Read the docs

  • AI in your app guide
  • SDK AI calls
  • AI API reference
  • AI key resolution

Works with

  • Workflows and jobsSchedules, webhooks and data-change triggers, with retries and replay.
  • RealtimeLive lists with one line, change events and pub/sub topics.
  • Coding agents and MCPClaude Code, Cursor or any MCP client builds, checks and deploys on its own.

AI in your app: common questions

Is my model API key exposed to the browser?

No. Screens call app.ai, Appbricx calls the model on the server, and the key never reaches the browser.

Can I use my own OpenAI or Anthropic key?

Yes. Add your own key under AI settings and pin it to the project; your provider bills you directly. With no key pinned, calls use your plan's AI credits.

How do I stop one user running up a bill?

Set token budgets for the whole app and per user over a window you choose, add rate limits and a model allow-list, or switch AI off for the project.

What happens when AI is unavailable?

Calls reject when AI is off, a budget is reached or there are no credits. Catch the error and show a fallback so the screen keeps working.

Your coding agent builds it. Appbricx runs it.

Start freeAll features
Appbricx

The backend, runtime and hosting for apps your coding agent builds. On our cloud, in yours, or on your own servers.

Features

Coding agents and MCPVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authPaymentsWorkflows and jobsAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcasePricingFor coding agentsTemplatesPrivate cloudBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use