Skip to main content
The Prompts module manages prompt templates with support for global and tenant-specific prompts. The simplest way to use prompts from the portal is with loadPrompt(). It works just like openai() - no await needed!
How it works:
  1. loadPrompt() creates a lazy reference (no API call yet)
  2. When agent.process() runs, the prompt is fetched from the portal
  3. Variables are rendered automatically
  4. Result is cached for subsequent calls

Standalone Prompts Manager

For more control, use the Prompts 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

Next Steps

Agents

Learn about agents

Knowledge (RAG)

Learn about RAG