OptionalcategoryCategory tag for scoping (e.g. 'note', 'assignment'). The
consumer filters available prompts by category when mounting the
action; an empty/missing category matches everything.
OptionaldescriptionOptional human-readable description shown as helper text.
Stable identifier (e.g. ObjectId or slug).
OptionalisTrue when shipped as a host preset — UI hides edit/delete for these.
OptionalmodelOptional model override (e.g. 'gpt-4o-mini'). Consumer-controlled.
Display name shown in the action dropdown.
System role / behaviour instructions for the model. Sent as the
system message (or equivalent) by the host's onTransform.
Prefix prepended to the user input before sending. E.g.
"Rewrite the following text to be student-friendly:\n\n".
A reusable AI prompt template. Hosts persist these (typically per teacher) and pass them into
AIMagicAction.prompts. The SDK is AI-provider-agnostic —systemPromptanduserPromptPrefixdescribe the intent, the consumer'sonTransformcallback decides how to route them (OpenAI, Anthropic, local model, …).Two flavours co-exist in the same list:
isPreset: true): shipped with the host, immutable by end users. Always visible.isPresetfalse/absent): created by a teacher in the settings UI; only their own author sees them.