Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Context (system prompt)

Paid Feature

This feature is only available in paid plans. Learn More

Planned, not yet shipped

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.

For brand identity, colors, fonts, and voice, use the shipped features.ai.brand configuration instead.

What it will do

Embedders will be able to seed every AI Assistant turn with their own prior messages — 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:
'Use WCAG AA contrast and prefer plain language for this project.',
},
{
role: 'user',
content: 'Use a compact layout with short paragraphs.',
},
{ role: 'assistant', content: 'Got it — compact 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 applying arbitrary context 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.