Create a new prompt template
1
Navigate to the prompt library
In the left sidebar, click Knowledge → Prompts, then click + New Prompt.
2
Name and describe the prompt
Give the prompt a clear, specific name (for example,
Customer Support – Tone Guide) and add an optional description so teammates understand when to use it.3
Write the prompt content
Type or paste your instructions into the editor. Use plain prose, markdown, or a mix—the editor renders a live preview as you type.
4
Add tags
Apply one or more tags to help your team find the prompt later (for example,
support, tone, onboarding).5
Save the prompt
Click Save Prompt. The prompt is now available to attach to any agent in the workspace.
Use variables in prompts
Variables let you inject dynamic values into a prompt at runtime, turning a static template into a flexible instruction set. Wrap any variable name in double curly braces:{{variable}} with the corresponding value from the agent’s input or from the trigger payload. If a variable is missing at runtime, Layest leaves a warning in the run trace so you can identify gaps in your data mapping.
Rules for variable names:
- Use lowercase letters, numbers, and underscores only.
- No spaces: use
customer_name, notcustomer name. - Keep names descriptive—
{{ticket_subject}}is clearer than{{ts}}.
Attach a prompt to an agent
1
Open the agent editor
Navigate to Agents, select the agent you want to configure, and click the Prompts tab.
2
Add a prompt
Click + Add Prompt and search for the prompt by name or tag. Select it from the results.
3
Set the prompt role
Choose where the prompt is injected into the agent’s context:
- System – Prepended as the system message, setting the agent’s overall persona and rules.
- Pre-task – Injected before each task or user message, providing task-specific instructions.
- Post-task – Appended after the agent’s response, useful for formatting rules or sign-off instructions.
4
Map variable values
If the prompt contains variables, the editor shows a variable mapping panel. Bind each variable to an agent input, a trigger payload field, or a static value.
5
Save the agent
Click Save. The prompt is active on the next run.
Organize prompts with tags and categories
As your prompt library grows, tags and categories keep it navigable. From Knowledge → Prompts:- Filter by tag – Click any tag chip in the sidebar to show only prompts with that tag.
- Sort – Sort by name, last modified date, or number of agents using each prompt.
- Archive – Archive prompts that are no longer in active use. Archived prompts remain attached to agents that already reference them but are hidden from the browsing view.
tone, rules, persona), by team (support, sales, engineering), or by status (draft, approved, deprecated)—saves significant time as the library scales.
Share prompts across the workspace
Every prompt you create is automatically visible to all members of your Layest workspace. There are no per-prompt sharing settings—the library is intentionally shared to encourage reuse and consistency. To control who can create or edit prompts, use workspace roles:- Editor and above can create, edit, and delete prompts.
- Viewer can browse and attach prompts to agents but cannot modify them.