Readonly
onReadonly
onEvent fired when the selected variant for a prompt variant set changes
Adds a prompt fragment to the service
The fragment to store
Optional
promptVariantSetId: stringOptional ID of the prompt variant set this is a variant of
Optional
isDefault: booleanGets all active prompts (highest priority version of each fragment)
Array of active prompt fragments
Gets all known prompts, including variants and customizations
Map of fragment IDs to arrays of fragments
Gets the built-in raw prompt fragment (before any customizations)
The prompt fragment ID
The built-in fragment or undefined if not found
Gets the raw prompt fragment without comments
The prompt fragment ID
The raw prompt fragment or undefined if not found
Gets the raw prompt fragment with comments
The prompt fragment ID
The raw prompt fragment or undefined if not found
Resolves a prompt fragment by replacing variables and function references
The prompt fragment ID
Optional
args: { Optional object with values for variable replacement
Optional
context: AIVariableContextOptional context for variable resolution
The resolved prompt fragment or undefined if not found
Resolves a prompt fragment by replacing variables but preserving function references
The prompt fragment ID
Optional
args: { Optional object with values for variable replacement
Optional
context: AIVariableContextOptional context for variable resolution
Optional
resolveVariable: ((variable) => Promise<undefined | ResolvedAIVariable>)Optional custom variable resolution function
The partially resolved prompt fragment or undefined if not found
Updates the selected variant for a prompt variant set
The ID of the agent to update
The prompt variant set ID
The new variant ID to set as selected
Event fired when the prompts change