Adding Variables
Variables are placeholders in messages that get replaced at runtime:Insert a Variable
1
Open message editor
Click on the message you want to edit.
2
Type /variable
In the editor, type
/variable to open the variable menu.3
Select or create
- Select an existing property
- Or create a new one
4
Configure
Set the variable format:
- Inline: Embedded in text
- Block: On its own line
Message Editor
The TipTap editor provides a rich editing experience:
- Rich text formatting
- Variable insertion via
/variablecommand - Auto-save as you edit
- Visual distinction between text and variables
Variable Syntax
Variables appear as{{variable_name}} in the editor:
Properties
A Property defines a variable’s type and metadata.Creating Properties
1
Open Properties
In your task, click Properties in the sidebar.
2
Create Property
Click Create Property.
3
Define the type
Configure the property:
- Name: Variable name (e.g.,
query) - Type: string, number, object, array, etc.
- Description: What this variable represents
- Required: Whether it must be provided
Property Types
| Type | Use Case | Example |
|---|---|---|
string | Text values | User queries, names |
integer | Whole numbers | Counts, IDs |
number | Decimals | Scores, prices |
boolean | True/false | Flags |
object | Structured data | User profiles |
array | Lists | Search results |
String Formats
Strings can have special formats:date: “2024-01-15”date-time: “2024-01-15T10:30:00Z”email: “user@example.com”uri: “https://example.com”uuid: “550e8400-e29b-…”
Complex Types
Objects
Define nested structures:Arrays
Define lists:Input Schema Auto-Sync
When you add variables to messages, the prompt’s input schema updates automatically.How It Works
Viewing the Input Schema
- Open your prompt
- Click Schema tab
- See all variables and their types
Schemas Tab
View all schemas in the Schemas tab:
- Input Schemas: Auto-generated from prompt variables
- User-Defined Schemas: Custom schemas for tools and structured output
Variable Formatting
Inline Variables
Embedded within text:Block Variables
On their own line, typically for larger content:Choosing Format
| Use Inline When | Use Block When |
|---|---|
| Short values | Long content |
| Part of a sentence | Standalone section |
| Names, IDs | JSON, documents |
Referencing the Same Property
You can use the same property multiple times:Required vs Optional
Mark properties as required or optional:Default Values
Properties can have default values:Best Practices
Use descriptive names
Use descriptive names
customer_query is better than q or input1.Add descriptions
Add descriptions
Descriptions help teammates understand what each variable is for.
Choose appropriate types
Choose appropriate types
Use specific types (integer, date) rather than just string when possible.
Group related data
Group related data
Keep schemas focused
Keep schemas focused
Each prompt should only have the variables it actually uses.