App Builder
Guide to building production-ready interactive forms with drag-and-drop components, reusable templates, and prompt mapping in Sapientia.
App Builder is a visual design environment inside Sapientia that enables you to create production-ready interactive forms (App Forms) without writing frontend code.
With App Builder, you can arrange form inputs using drag-and-drop components, map each field into AI instructions using @mention tokens, and convert user submissions into structured workflows integrated directly with the Chat interface, Workflow Builder, and remote mobile clients via Sapientia Link.
Visual Components in App Builder
App Builder provides a comprehensive palette of visual building blocks:
1. Layout
- Container: Groups components into structured panels. Supports flexible layout direction (vertical or horizontal), element spacing (gap), internal padding, and responsive overrides across desktop, tablet, and mobile viewports.
2. Input Fields
- Text Field: Single-line input field for concise text such as names, titles, or brief identifiers.
- Text Area: Multi-line input area for long-form text, context notes, descriptions, or raw content.
- Dropdown / Select: Single-selection dropdown populated with custom configurable options.
- Checkbox: Boolean toggle for terms acceptance, feature toggles, or binary decisions.
- Date Picker: Interactive date selector for schedules, deadlines, or report timeframes.
- File Upload: File attachment component allowing users to upload local documents for analysis within prompts or workflows.
3. Display & Typography
- Heading: Section titles with configurable heading levels (
h1throughh6), font weights, and text alignment. - Label / Text: Descriptive guidance, instructions, or explanatory notes for form users.
Component Configuration & Property Panel
Selecting any component on the canvas opens the Property Panel on the right side:
- Component Key: Unique variable identifier (e.g.,
applicant_name,job_role,cv_file). This key serves as the@mentiontoken in the Prompt Builder. - Label & Placeholder: Field labels and placeholder guidance displayed to the end user.
- Validation Rules: Set fields as required, establish minimum and maximum character thresholds, or enforce regex patterns.
- Layout & Responsive Styling: Configure padding, flex alignment, and device-specific styling.
Prompt Mapping (Prompt Builder)
A core capability of App Builder is seamless prompt mapping that connects form values to local AI instructions:
- Click the "Prompt Builder" button at the top of the canvas.
- Compose your AI instruction template, typing
@to trigger an autocomplete menu of available form variables (e.g.,@job_title,@candidate_cv). - Structure the prompt to match your desired analysis or task format.
You are a professional recruitment analyst. Evaluate the following candidate for the specified role:
- Target Position: @job_title
- Experience Level: @experience_level
- Job Requirements: @job_requirements
Candidate CV:
"""
@cv_content
"""
Provide an evaluation report including:
1. Match score (0-100%)
2. Key strengths
3. Skill gaps or red flags
4. Recommendation (Shortlist / Hold / Reject)When a user submits the form, Sapientia automatically interpolates each @ token with the actual submitted value. If no custom prompt template is provided, submitted form fields are automatically formatted into clean key-value pairs.
Runtime Integrations
App Forms integrate across the Sapientia ecosystem:
1. Embedded Chat Interface
When you activate a draft in App Selection, the form is automatically embedded directly into the Command Center / Chat interface. Users fill out structured fields rather than relying on unstructured, error-prone manual prompts.
2. Workflow Builder Integration
Downstream nodes in your visual workflows can directly reference submitted form data using the @input.form.<fieldName> variable syntax, streamlining branching conditions, data parsing, and multi-agent execution.
3. Automatic Synchronization via Sapientia Link
When a mobile device connects to your desktop via Sapientia Link, the active App Form is automatically delivered to the mobile client over a peer-to-peer network with end-to-end encryption. Remote users can fill out and submit structured forms from their phones, with inference processed locally on your desktop.
Creating a New Form
- Navigate to the App Builder tab in the sidebar.
- Click "Create New App" for a blank canvas, or select a starter template from the catalog (such as AI CV Screener or Healthcare Consultation).
- Drag components from the left palette onto the canvas.
- Select each component to configure labels, keys, and validation rules in the right panel.
- Open the Prompt Builder and map component variables into your prompt template with
@mentions. - Use Preview to verify real-time layout behavior and input validations.
- Save your draft and click Set Active to embed the form into Chat and publish it to Sapientia Link.