Using loadPrompt() with Agent (Recommended)
The simplest way to use prompts from the portal is with loadPrompt(). It works just like openai() - no await needed!
loadPrompt()creates a lazy reference (no API call yet)- When
agent.process()runs, the prompt is fetched from the portal - Variables are rendered automatically
- Result is cached for subsequent calls
Standalone Prompts Manager
For more control, use thePrompts class directly:
Security Rules
- β Can read global prompts (provided by Runflow)
- β Can create/update/delete own tenant prompts
- β Cannot modify global prompts
- β Cannot access other tenantsβ prompts