Appbricx
Features

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

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

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

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

Build

  • Coding agents and MCP
  • UI components and hooks
  • Templates
  • Verify testing
  • Builder console

Data

  • Postgres database
  • Data API
  • Realtime

Users

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

Logic

  • Workflows and jobs
  • Server functions and webhooks
  • AI in your app
  • Integrations

Ship and own

  • Backups and rollback
  • Hosting and domains
  • Self-host and export
  1. Home
  2. Templates
  3. Blocks
  4. AI chat panel

AI chat panel

Adds an Assistant page (or a side panel you can open from any page) where each signed-in person chats with an AI that knows your app's data. A server function reads the newest records of the tables you choose as that person, under their own permissions, so a customer's assistant only knows their own orders while a manager's sees the team's, and sends them to the model with the conversation. Conversations and messages are stored per person and private to them. Suggested questions get people started, answers render as markdown, and when AI isn't available for the project the person sees why and can retry; their question is kept.

Use in AppbricxFree. Already have an account? Log in
View the files
AI chat panel: the Relay Copilot page, added to Relay, on desktopAI chat panel: the Relay Copilot page, added to Relay, on a phone
  • AI chat panel: the Relay Copilot page, added to Relay, on desktopDesktop
  • AI chat panel: the Relay Copilot page, added to Relay, on a phonePhone

What it adds to your app

Tables assistant_chat and assistant_message, private to each person. Server function ai-chat-reply (ctx.ai with the person's own records as context). AiChatPanel component: an Assistant page, or a side panel on any page.

Tables

  • assistant_chat title, last_message_at
  • assistant_message conversation_id, author, content

Pages

  • /assistant ‹assistant_name› (@everyone)
  • /assistant-history Chat history (@everyone)

Components

  • AiChatPanel A private AI chat that answers from the ‹context_entity› records the signed-in person can see: conversations, suggested questions, markdown answers, retry; a full page or a side panel

Rules on every write

  • assistant_chat Keep the chat title under 120 characters.
  • assistant_message A message needs some text.
  • assistant_message You can only add messages to your own chats.

How its workflows run

Each one is a server workflow in your project: it runs on its trigger, with retries, and its runs show in the builder's log.

  1. Answer a chat message from the records the person can see

    When the app calls it: server function. Then: Look up assistant_chat, then Create assistant_message, then Update assistant_chat.

Set it up

It merges into the contract of an app you already have. Nothing is overwritten: a name you already use is refused until you pass a prefix.

  1. Pick the project

    Use the button above, or ask your coding agent with the Appbricx MCP server connected (quickstart).

  2. Point it at your tables and roles

    Leave out the ones with defaults; a wrong one is refused with the options your app has.

    ParamWhat it isExample
    context_entityThe table whose records the assistant reads to answer (as the person asking).ticket
    context_entity_2Optional: a second table it reads. Optional.customer
    assistant_nameWhat the assistant is called on the page and in its answers. Optional.Copilot
    suggestionsUp to four starter questions, separated by |. Optional.Which tickets are waiting longest?|Summarise this week's tickets
  3. Preview, then apply to dev

    A dry run shows the diff and the check report; applying it changes your dev environment only.

  4. Deploy

    When dev looks right, deploy. Production gets a snapshot first, so you can roll back.

Use it with your coding agent

The agent reads the template, runs a dry run, shows you the diff and applies it.

Prompt
Add the AI chat panel template (slug "ai-chat-panel") to my Appbricx project. Read it with get_template, run use_template with dry_run first and show me the diff, then apply it. Ask me where it attaches if you can't tell from my contract (context_entity: what it knows about; context_entity_2: also knows about (optional); assistant_name: assistant name; suggestions: suggested questions).
MCP call
{
  "tool": "use_template",
  "arguments": {
    "slug": "ai-chat-panel",
    "project_id": "<your project id>",
    "params": {
      "context_entity": "ticket",
      "context_entity_2": "customer",
      "assistant_name": "Copilot",
      "suggestions": "Which tickets are waiting longest?|Summarise this week's tickets"
    },
    "dry_run": true
  }
}
CLI
appbricx templates use ai-chat-panel --param context_entity=ticket --param context_entity_2=customer --param assistant_name=Copilot --param suggestions=Which tickets are waiting longest?|Summarise this week's tickets --dry-run
Kind
Block
Category
Productivity
Params
4 (1 required)
Version
1.0.0
Files
blocks/ai-chat-panel
Published by
Appbricx, free

Goes well with

  • Kanbo

    Team project board with drag-and-drop cards, checklists, comments and my work.

    App · Productivity · Live demo
  • Overdue alerts

    Each morning, flags rows past their due date, tells the person assigned and sends the team a list.

    Workflow · Productivity
  • Form builder

    Form builder: forms with nine question types, a share link, open sign-up for respondents, a signed webhook for website forms, response review, notifications and CSV export.

    App · Productivity

Your agent adds it. Appbricx runs it.

Start freeAll templates
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 MCPUI components and hooksTemplatesVerify testingBuilder consolePostgres databaseData APIRealtimeRow-level securitySign-in and authOrganisations and teamsPaymentsWorkflows and jobsServer functions and webhooksAI in your appIntegrationsBackups and rollbackHosting and domainsSelf-host and exportAll features

Product

ShowcaseTemplatesIntegrationsPricingFor coding agentsSelf-hostBring your own AI keyFAQ

Compare

Appbricx vs SupabaseLovable alternativeBolt alternativeFor freelancersFor agencies

Resources

DocumentationReferenceBlogSupportContact

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use