# Auto-generated UIs

> How does Windmill generate UIs automatically? From script and flow parameters, with customizable forms via JSON schema annotations.

Windmill automatically generates user interfaces (UIs) for scripts and flows based on their parameters.

:::info Windmill app builders

You might also be interested in Windmill's [full-code apps](../../full_code_apps/index.mdx) for building custom frontends in React or Svelte, or the [low-code app editor](../../getting_started/7_apps_quickstart/index.mdx) (legacy) for drag-and-drop UIs.

:::

By analyzing the parameters of the main function, Windmill generates an input specification for the script or flow in the [JSON Schema](../13_json_schema_and_parsing/index.mdx) format. Windmill then renders the UI for the Script or Flow from that specification.

You don't need to directly interact with the JSON Schema associated with the Script or Flow. It is the result of the analysis of the script parameters of the main function and the optional UI customization.

The parsing of the main function will be used to generate an UI for scripts, or scripts used as flow steps (useful to [link steps together](../../flows/16_architecture.mdx)).
The auto-generated UI of a flow is made from [Flow Input](../../flows/3_editor_components.mdx#flow-inputs).

In the [UI customization interface](../../script_editor/customize_ui.mdx), you can refine information that couldn't be inferred directly from the parameters, such as specifying string enums or restricting lists to numbers. You can also add helpful descriptions to each field.

![Customize inputs](./customize_inputs.png)

## Advanced settings

Scripts' main function or flow input arguments can be given advanced settings (custom title, placeholder, field settings per type, enums, formats, etc.) that will affect the inputs' auto-generated UI and JSON Schema. See [Advanced settings](../13_json_schema_and_parsing/index.mdx#advanced-settings) for the full list of settings per type.

## AI form filling

Windmill can automatically fill your script and flow input forms using AI to save you time and effort.

You can enable that feature from your script or flow settings. You can also provide custom instructions to guide the AI on how to fill the form, making it adapt to your specific workflow needs.

This feature is powered by [Windmill AI](../22_ai_generation/index.mdx), which provides comprehensive AI assistance throughout the platform.

## Test code

In Windmill Web IDE or [VS Code extension](../../cli_local_dev/1_vscode-extension/index.mdx), auto-generated UIs can be directly used in the [script](../../getting_started/0_scripts_quickstart/index.mdx) & [flow](../../getting_started/6_flows_quickstart/index.mdx) editors to [test your code](../23_instant_preview/index.mdx).

## Build App

You can generate a dedicated [app](../../full_code_apps/index.mdx) to execute your script or flow.

This is the recommended way to share scripts and flows with [operators](../16_roles_and_permissions/index.mdx), with the second option being of sharing the script and [variables](../2_variables_and_secrets/index.mdx) it depends on (but operators won't be able to load variable directly from the UI/API, only use them within the scripts they have access to).

The apps will be permissioned on behalf of the [admin/author](../16_roles_and_permissions/index.mdx), the user is still identified at the time of execution from the [Runs](../5_monitor_past_and_future_runs/index.mdx) and [Audit logs](../14_audit_logs/index.mdx) menus.

![Script execution Runs menu](./script_exec_runs.png.webp 'View from the run menu')

> View from the [Runs](../5_monitor_past_and_future_runs/index.mdx) menu.

At last, this is an easy way to get an app for your scripts and flows to be customized with [Styling](../../apps/4_app_configuration_settings/4_app_styling.mdx) and [Components](../../apps/4_app_configuration_settings/1_app_component_library.mdx).

## Types

Each [type](../13_json_schema_and_parsing/index.mdx#script-parameters-to-json-schema) in Windmill has its own UI representation.

You can also check [special types](../13_json_schema_and_parsing/index.mdx#script-parameters-to-json-schema) that are types that are made by Windmill and have a particular behavior in the UI.

## Saved inputs

Each [deployed](../0_draft_and_deploy/index.mdx) script or flow can have its own saved inputs.

From a deployed script or flow, fill inputs and click on the `Save Current Input` button to save the inputs.

You can then reuse them by clicking on the input and then 'Use Input'. It's an easy way to quickly use recurrent inputs without having to enter pre-set settings or creating an [app](../../full_code_apps/index.mdx).

Each saved input can be named and 'Shared' with the users having [access](../16_roles_and_permissions/index.mdx) to the script or flow.

![Saved inputs](./saved_inputs.png)
