Prompt Mode (Experimental)
Prompt mode is currently an experimental feature. Use only on non-production deployments.
The Portrait config file can be edited with natural language with the help of AI. To enable Prompt Mode, set the openrouter.api.key property to a valid OpenRouter API key in the config file. You can get an API key on OpenRouter’s website. Example:
openrouter:
api:
key: "sk-or-v1-....."
This will enable a toggle in the dashboard where an admin user can open the Prompt Mode panel.
Config items that can be manipulated via prompt mode:
Basic app settings (name, description, etc)
Sources
Connections
Sections
Theme
Dashboard
Quick actions
Forms
Example Prompts
Create a section based on the ‘Invoices’ connection. Include all fields from the source
Create a form for employees to request holidays
Add a signature field to the “Create invoice” form
Change the theme to a dark theme
Remove the “Scan barcode” quick action
Not Supported
All prompts that manipulate data in the index are not supported. For example: “add a user with email xyz”, or “remove the entry with id xyz”. Additionally, since sensitive data is stripped from the config file before consumption by the LLM, prompt mode can’t be used to retrieve passwords, API keys or ELO URLs from the config file.
Security and Privacy Considerations
When using prompt mode, the full content of the app’s config file, stripped of sensitive data, will be sent to OpenRouter, and then further on to the LLM provider, currently OpenAI, for consumption. Refer to OpenRouter’s and OpenAI’s privacy policies for information about data retention etc.
Sensitive data that is being stripped from the config:
openrouter.api.keyconnections.connection[].passwordconnections.connection[].urlspring.mail.passwordjwt.secretmapbox.tokenprepopulateUsers.users[].password