Context (system prompt)
This feature is only available in paid plans. Learn More
The features.ai.context customization is on the roadmap. The shape and exact API may change before release. This page documents the planned design so embedders can plan integrations and so the docs are ready when the feature lands.
What it will do
Embedders will be able to seed every AI Assistant turn with their own prior messages — brand voice rules, accessibility checklists, layout conventions, per-customer prompts, multi-turn context — through a new features.ai.context block on unlayer.init:
// PLANNED API (subject to change before release)
unlayer.init({
features: {
ai: {
enabled: true,
assistant: true,
context: {
messages: [
{
role: 'system',
content:
'You are designing for Acme Corp. Always use plain English. Never mention competitors.',
},
{
role: 'user',
content: 'Our brand voice is friendly and concise.',
},
{ role: 'assistant', content: 'Got it — friendly and concise.' },
],
metadata: {
customerId: 'acme-42',
brandTier: 'enterprise',
},
},
},
},
});
The input shape will mirror what the /v3/templates/generate API endpoint already accepts on its messages field, so the same payload works on both server and client. A system prompt is just a message with role: 'system' — no separate top-level field needed.
Why a separate page
This is a single point of leverage for getting consistent, on-brand output across every AI turn in your embed — without prompting end users to repeat the same instructions. It's significant enough to live on its own page rather than as one bullet inside the model-picking docs.
Status
Not yet implemented. Track progress and discussions in the AI Assistant roadmap, or contact your account manager if you have a specific use case you'd like to weigh in on.
Related
- Picking a Model — pin which model powers the assistant.
- AI Assistant overview — what the assistant does and where users find it.