Skip to main content

App Builder [BETA]

BETA FEATURE

The App Builder is a beta feature and because of this it is not completely stable yet. This means we might make changes to the App Builder without prior notice.

The App Builder has not been rolled out to all environments. Contact us if you would like to use it.

What is the App Builder?

The App Builder is your AI-powered coding assistant, designed to help you create VIKTOR apps quickly, all from your browser. It features a browser-based chat interface and a development environment. This eliminates the need for any local software installation, allowing you to go from an idea to a working app in seconds with our AI assistant as your pair-programmer! The AI assistant updates your app based on your prompts, but you can also make manual changes directly in the code editor. A real-time preview of your app is available, allowing you to see changes instantly. Once you're satisfied with your app, you can deploy it to your environment with a single click!

Using the App Builder

You can create new apps using the App Builder directly from the Develop page in the VIKTOR environment.

  1. Start by entering a prompt. Describe the kind of app you want to build, specifying the desired inputs, visualization, and logic.

  1. Upon sending your prompt, you will enter the App Builder, and our AI assistant will begin generating your app.

  2. Once the AI assistant finishes generating the app code, it will provide an explanation of the actions performed on the left side of the screen. On the right, you will see a preview of your app. You can interact with the app in Preview mode to test its functionality. To view the underlying Python code, simply switch to Code mode.

  3. Now, you can iteratively improve your app. This can be done by asking follow-up questions to VIKTOR's AI assistant. The assistant will then update the app and show you the results. Alternatively, you can modify the Python code yourself by switching from preview to code mode. Simply adjust any code in the editor, and after saving your changes, the preview will reload to show the updated app.

  4. To inspect what changes have been made to your app, click the 'Show changes' button. This will open a comparison of the current and previous revisions. If you are not happy with how the assistant has changed your app, you can revert these changes by clicking the 'Undo' button.

  1. Each change made to your app, whether by you or the AI assistant, is automatically saved as a revision. This allows you to restore earlier versions of your app. To find a revision, scroll up in your chat history. You can restore that revision directly by clicking the 'Restore' button. You may first want to see what the revision looked like by clicking the 'Show revision' button, which will load the revision for your inspection before restoring.

  1. Once you are satisfied with your app and wish to make it available within your environment, press the 'Publish' button in the top-right corner. After the publishing process is completed, you can add the app to a project to start using it.

  2. As mentioned in step 6, every change you make to your app within the App Builder is saved as a revision, so you can exit the App Builder without losing your progress. You can find your apps on both the Develop page and in the App Store under My apps. Click the Develop button to re-enter the App Builder and continue enhancing your app!

The underlying Large Language Model

The App Builder uses Anthropic's Claude 4 Sonnet and Claude 3.5 Sonnet through AWS Bedrock to generate VIKTOR code based on your prompts. Please refer to our AI addendum for more information on how AI features are integrated into the VIKTOR platform.

Limitations

The App Builder is a beta feature and is currently under development. This means that not all features supported in local development are available here. When you encounter one of these limitations, we currently advise you to copy the app code and continue developing locally. The installation and activation flow for local development can be found under the 'Level up' section on the Develop page.

App types

The current version of the App Builder only supports creating Editor apps. For more information on the different app types, please refer to App types in the Getting Started section of the documentation.

Python version

The App Builder runtime uses Python 3.12. It is currently not possible to change to a different Python (minor) version.

Supported packages

The App Builder runs on Python 3.12 and currently supports a fixed set of libraries that you can use in your apps. In the current version of the App Builder, it is not possible to install additional packages. Below you can find the full list of supported packages:

aiohttp==3.11.16
altair==5.5.0
anthropic==0.51.0
beautifulsoup4==4.13.4
bokeh==3.7.2
cadquery==2.3.0
cadquery-ocp==7.8.1.1.post1
chardet==5.2.0
ezdxf==1.4.1
fiona==1.10.1
folium==0.19.5
geopandas==1.0.1
google-genai==1.15.0
ifcopenshell==0.8.2
jinja2==3.1.6
kaleido==0.2.1
lxml==5.4.0
matplotlib==3.10.1
networkx==3.4.2
numpy==2.2.4
openai==1.78.1
opencv-python==4.11.0.86
openpyxl==3.1.5
openseespy==3.7.1.2
pandas==2.2.3
pillow==11.2.1
plotly==6.0.1
pypdf==5.4.0
python-docx==1.1.2
requests==2.32.3
scikit-learn==1.6.1
scipy==1.15.2
seaborn==0.13.2
shapely==2.1.0
statsmodels==0.14.4
sympy==1.13.3
trimesh==4.6.6
urllib3==2.4.0
viktor==14.22.0
xarray==2025.3.1
yfinance==0.2.55

Multiple file support

The current version of the App Builder does not support using multiple files to structure your app code. You must write all app code in a single app.py file. The same applies to using additional files next to your Python code for storing constants or other data.

Software integrations / workers

The VIKTOR platform supports integrating with local desktop software using a worker. The current version of the App Builder is not optimized to generate the required app code for these integrations. Additionally, you need to install a worker and connect it to your app manually. Therefore, we currently advise developing apps with integrations locally rather than using the App Builder.

Collaboration

The App Builder does not currently support real-time collaboration. While it is possible to assign multiple maintainers to apps created with the App Builder, the App Builder's context and code are bound to an individual user. This means that a colleague will not be able to see your conversation history or code within your App Builder environment.

Regional hosting

VIKTOR supports regional hosting, meaning apps are synced across multiple geographic regions. Apps created with the App Builder are also synced across regions. However, the content (chat history and app revisions) of the associated App Builder environment is not synced across regions.

Reading data from uploaded files.

You can use a FileField in your app to allow users to upload files. While these files can be accessed within your app's code, the AI assistant does not have direct access to their content or structure. This means you must explicitly explain to the assistant how your file is structured for it to be able to generate functioning Python logic to process the data.

While you can use a print-statement in your app code the output will not be shown in the console.

Writing effective prompts

The AI in the VIKTOR App Builder helps you transform ideas into working applications quickly. To get the most out of it, it’s crucial to learn how to write effective prompts.

Think of prompting as providing clear, concise instructions to a highly capable assistant. The better your instructions, the better the result.

Core prompting principles

  1. Structured input and output
    Clearly state what inputs you’re providing and what outputs you expect, whether they are text, code, plots, tables, or 3D models.

  2. Clarity and specificity
    Provide enough context for the AI to understand the scope and capabilities. Describe exactly what calculations, formulas, or visualizations you need.

  3. Task decomposition
    Break complex tasks into smaller, manageable steps. For instance, first prompt for the UI, then the logic, and finally the visualization.

These principles are also covered in our blog:
Mastering LLMs: Essential Prompting Techniques for AEC Professionals

Tips for better prompts

Start with the goal:

I want an app that calculates pressure loss in a pipe based on user input.

Mention input/output:

Inputs: diameter, flow rate, pipe length. Output: pressure loss in bar, shown as a table and line plot.

Use engineering terms:

Use the Darcy‑Weisbach equation to calculate pressure loss.

Break it down into steps:

First, generate the form UI. Then, write the calculation logic. Finally, render results.

Guide the view/output:

Show pressure loss as a line plot versus pipe length, and include a summary table.

Additionally, you can add some examples of inputs/outputs and expected behavior. This will allow the AI assistant to understand your intentions.

Troubleshooting and debugging

LLMs make mistakes, therefore, you might encounter issues or unexpected behavior. Here's how to approach troubleshooting and debugging your app within the App Builder.

Understanding error messages

When an error occurs, the App Builder will display an error message. When you switch to Code mode an error console will be shown with a Python traceback.

This traceback is crucial for identifying the problem:

  • Location: Look for file names (e.g. app.py) and line numbers. This tells you exactly where the error occurred in your code.
  • Error Type: The error type (e.g. Attribute, TypeError, ValueError) indicates the kind of problem.
    • Attribute: Usually means you're trying to use a variable or function that hasn't been defined.
    • TypeError: Occurs when an operation is performed on an object of an inappropriate type (e.g. trying to add a string and a number).
    • ValueError: Indicates that an operation received an argument that has the right type but an inappropriate value.
  • Description: Read the accompanying description carefully. It often provides specific details about why the error occurred.

More information on Python Tracebacks can be found in this Real Python article.

You can ask the AI assistant to fix the error for you by clicking the 'Fix with VIKTOR.AI' button. The AI assistant can also help explain why the error occurred.

Debugging your Python code

  • Check Input Values: Verify that the inputs provided in the UI are what your code expects. Sometimes, a simple typo in the input can lead to unexpected results.
  • Inspect Intermediate Calculations: For complex calculations, break it down in smaller steps and visualize each sub-result. This helps pinpoint exactly where the calculation goes wrong.

When the App Builder gets stuck or generates unexpected code

Sometimes the App Builder might struggle with a complex prompt, produce irrelevant code, or seem 'stuck' in a loop. Here's how to help it:

  1. Simplify Your Prompt: If your initial prompt was very broad or complex, try breaking it down into smaller, more specific steps (as outlined in 'Task Decomposition')
    • Instead of: 'Create an app that calculates structural integrity and plots the results in 3D, allowing for material changes and load variations.'
    • Try: 'First, create a form with inputs for material properties (e.g., Young's Modulus, Poisson's Ratio) and dimensions. Next, add a view for a simple stress calculation based on these inputs.'
  2. Provide More Context: If the AI is missing information, provide it explicitly. This is especially true when trying to use uploaded files in your app.
    • If the AI struggles with a CSV: 'The CSV file has three columns: Time (s), Force (kN), Displacement (mm).'
  3. Rephrase or Reset: If the AI's response is consistently off-topic, try rephrasing your prompt with different keywords or a different approach. If it seems truly stuck, you can try reverting to an earlier revision of your app and trying a different prompting strategy.
  4. Make Manual Edits: For small, specific issues, it might be faster and more efficient to switch to Code mode and fix the Python code yourself rather than trying to prompt the AI to fix it.

By following these troubleshooting and debugging steps, you can more effectively develop and refine your VIKTOR apps using the App Builder.