Prompt Template
On this page
Purpose
Prompt Template combines fixed instructions with values from the flow and returns a completed Message.
When to use it
- Reuse a model instruction with changing values.
- Combine a question and retrieved context.
- Create a concise input for a Language Model or Agent.
How to use it
Tool Mode
- Add Prompt Template, enable Tool Mode, and connect the tool output to Agent Core.
- Use Tool Placeholder for the value Agent Core should supply at runtime.
- Test that the completed prompt contains the expected value.
Normal mode
- Write the instruction and placeholders.
- Connect source values to the generated placeholder inputs.
- Send Prompt to a Language Model or Agent.
Configuration
| Setting | What it controls | Recommended starting point |
|---|---|---|
| Template | Defines the prompt text and placeholder names. | Start with one input and one clear instruction. |
| Generated placeholder inputs | Supply values for placeholders in the template. | Use distinct names for different values. |
| Tool Placeholder | Supports Tool Mode when the prompt is used as a tool. | Leave it alone unless you are building an Agent tool. |
Expected result
The component returns a Message with supplied values inserted into the template. A placeholder with no value substitutes an empty string. Use another validation step when a value must be present.
Reference details
Escape literal braces in JSON examples with {{ and }}. This prevents the template from treating JSON keys as placeholder names.
Works well with
Connect Prompt to Language Model for a direct model call, or to Agent Core when the Agent needs structured instructions.
