Creating Actions Using AI

When you click the “Create from a blank” card, the “Create an AI Action” intro screen opens. On this screen:

  • There is a three-step visual diagram summarizing the workflow.
  • Click the “Start Building” button to proceed to the editing screen.

You can create personalized AI actions using the “Custom” template. When you enter a description of the desired AI template, a template is quickly generated based on that description, and the necessary prompts are automatically filled in.

Editing Screen

On the screen that opens after clicking “Start Building” (or when a template is opened via “EDIT”):

  • In the top-left corner, you’ll find a back arrow, the action’s name (which can be changed via a dropdown list), and an editing (pencil) icon next to it.
  • In the top right corner is the SAVE button (with an arrow next to it for additional options).
  • In the right panel, under the AI Action heading, there are two tabs: Parameters and Model Settings; changes can be undone using the Reset link in the top right corner.

Choose LLM Model

Located at the very top of the screen. A note indicates which models support file upload: “These models support file upload: Gemini 2.5 Flash, Gemini 2.5 Pro, GPT 5, GPT 5 Mini, GPT 5.1, GPT 5.2, GPT 5.4, GPT 5.4 Mini.” On the right side is the model selection dropdown list (default: Gemini 2.5 Flash). The AI Actions data source includes GPT-5, GPT-5 Mini, GPT-5 Nano, GPT-5.1, GPT-5.2, GPT-5.4, GPT-5. 4 Mini, GPT-5.4 Nano, Gemini 2.5 Flash, Gemini 2.5 Flash Image, Gemini 2.5 Flash Lite, Gemini 2.5 Pro, GPT Image 1, and Veo 3.1.

User Prompt and System Prompt

These two fields are positioned side by side (User Prompt on the left, System Prompt on the right):

  • User Prompt: Represents the input to be received from the user. This field specifies what the user wants to ask the AI. For example:
You are an AI Action assistant working in a low-code development environment (Kuika).Your task is to analyze the receipt/invoice image uploaded by the user, extract specific fields, and return them in a structured (JSON) format.Task Type: Information Extraction — Image-based structured data extractionInput:* {{receipt_image}} — The receipt/invoice image uploaded by the user (base64 or file reference)Fields to Extract:* tax_amount — The total tax/VAT amount specified on the receipt (numeric value only, without a currency symbol)* serial_number — The receipt’s serial number, invoice number, or financial document number on the receipt* total_amount — The final total amount paid (numeric value only, without a currency symbol)Rules:* Return only a valid JSON object; do not include any explanations, introductory text, or Markdown formatting (such as ```json).* If a field is not present on the receipt, set its value to null.* Return the `tax_amount` and `total_amount` fields as numbers (not strings), with a maximum of 2 decimal places.* Return the `serial_number` field as a string exactly as it appears on the receipt (including letters, hyphens, and leading zeros).* If the receipt contains multiple tax lines (e.g., different VAT rates), sum them into a single `tax_amount` value; however, if there is already a combined “Total Tax” line, use that value directly.* Do not make estimates or assumptions. Use `null` for unreadable or missing fields.Output Format:{“tax_amount”: <number or null>,‘serial_number’: “<string or null>”,“total_amount”: <number or null>}Sample Output:{“tax_amount”: 18.45,‘serial_number’: “FS-2026-004821”,“total_amount”: 205.00}Input/Output Format Description:* Input: A single image of a receipt or invoice (as a JPEG, PNG, or PDF page).* Output: A single-level JSON object containing three fields (tax_amount, serial_number, total_amount). It contains no additional fields, text, or descriptions; it is ready to be passed directly to the next AI Action step or data source.
  • System Prompt: This is the background instruction provided to the AI. This field defines how the model should behave (for example: “You are a legal expert.”). In other words, it determines the AI’s role. For example: “Extract specific information from an image of a receipt. The required fields are tax amount, serial number, and total amount. Return the extracted data as a valid JSON object following specific formatting rules.”

Sample Output Data

With the explanation “Choose how the AI should return its response. Either as plain text or select JSON to design your own structured data for detailed results,” the output format is selected from the JSON or Text tabs:

  • JSON: Select this if structured data is expected from the AI. When this option is used, a line-numbered code editor opens, and the expected JSON structure and fields can be predefined (e.g., tax_amount: 5.00, serial_number: “INV-00012345”, total_amount: 50.00), so that the model generates the output according to the specified schema. Undo/Redo and settings icons are located in the top-right corner of the editor.
  • Text: Used for free-form (natural language) outputs.

Right Panel — Parameters Tab

Parameters automatically provided based on the selected model are listed here:

  • GeminiFileParameter: Used to provide file-based input. The data type is selected from the drop-down list (e.g., String). When “Allow file upload” is enabled, an image or file can be uploaded from a device and sent to the model in Binary (Bytea) format. When disabled, only text-based (String) parameters are used.
  • Unknown: Unknown or unspecified data type.
  • Boolean: True/false value.
  • Bytea: Binary data (e.g., image, file, etc.).
  • Byte: Integer value between 0 and 255.
  • DateTimeOffset: Date and time information.
  • Decimal: A decimal number.
  • Double: A larger decimal number.
  • Guid: A unique identifier (UUID).
  • Int16: A small integer value.
  • Int32: A medium-sized integer.
  • Int64: A large integer.
  • Single: A small decimal number.
  • String: A text value.

Right Panel — Model Settings Tab

  • Temperature: Set the AI’s creativity (0 = consistent, 1 = random responses).
  • Maximum Length: Set the length of the content the AI will generate in tokens.
  • Stop Sequences: Add a word or sequence of words to make the response stop at a specific point.
  • Top P: Controls the breadth of the word pool the model will use when generating output. Takes a value between 0 and 1. Low values ensure the model selects only from the most likely and reasonable words; high values allow selection from a broader and more diverse word pool.
  • Frequency Penalty: Used to reduce the repetition of words.
  • Presence Penalty: Encourages the creation of new content.
  • Reset to Defaults: Restores modified parameters to their original default values.

Finally, click the SAVE button in the top-left corner to create your AI action.

Using AI Actions

  1. Open the UI Design module.
  2. Select the screen where you want to add the action.
  3. In the Properties panel, use +ADD ACTION to add the AI Actions found in the Custom category.

After completing these steps, you can integrate AI-powered processes into your applications using Kuika AI Functions.