The AI Template Assistant helps you build templates faster by generating blocks, creating sample data, and applying LithoBlocks best practices. Access it from the bottom right corner of the Template Builder to jumpstart new templates or enhance existing ones.
Prerequisites
Finding the AI Template Assistant
The AI Template Assistant is located in the bottom right corner of the Template Builder. Click the assistant icon to open the chat interface where you can describe what you want to build.
The assistant understands LithoBlocks syntax, block types, and templating best practices, so you can describe your needs in natural language.
Jumpstarting new templates
Use the AI Template Assistant to quickly create templates from scratch.
Starting from scratch
- Open a new or empty template in the Template Builder
- Click the AI Template Assistant icon (bottom right)
- Describe what you want to build, for example:
- “Create a welcome message template with a header, user greeting, and a ‘Get Started’ button”
- “Build an expense approval template with expense details and Approve/Reject buttons”
- “Make a project status update template with sections for tasks, status, and assignees”
- The assistant generates blocks based on your description
- Review the draft changes (see Reviewing changes)
Using existing sample data
If your template already has sample data:
- Open the template with sample data attached
- Open the AI Template Assistant
- Describe what you want to build, referencing your data structure
- The assistant uses your existing sample data to craft placeholders and structure
Example: “Create a template that displays the user’s name, role, and a list of their tasks using my existing sample data”
Creating sample data
The AI Template Assistant can generate initial sample data if you don’t have any yet.
Generating sample data
- Open a template without sample data
- Open the AI Template Assistant
- Describe the data structure you need, for example:
- “Create sample data for an expense approval with amount, category, merchant, and date”
- “Generate sample data for a project with tasks array, assignees, and status”
- The assistant creates sample data matching your description
- Review and accept the sample data in the Data tab
The generated sample data follows best practices with realistic values and proper structure for use with placeholders and directives.
Bulk creating blocks
The AI Template Assistant excels at creating multiple blocks at once, saving you time when building complex templates.
Use cases:
- Creating multiple sections for different data fields
- Building directive containers with child blocks
- Adding multiple buttons to an Actions block
- Generating table structures with columns
Example prompt: “Add 5 section blocks showing order details: order ID, customer name, items array, total, and status”
Reviewing and accepting changes
All changes from the AI Template Assistant are drafted — you maintain full control over what gets applied.
Side-by-side comparison
- When the assistant generates changes, a comparison view appears
- See your current template on the left and the proposed changes on the right
- Review each block addition, modification, or deletion
- Accept individual changes or accept all changes at once
Version control
Accepting changes creates a new version of your template, preserving your previous work. You can:
- Compare versions to see what changed
- Revert to a previous version if needed
- See version history in the template settings
See Template versioning for more details on managing versions.
Polishing existing templates
The AI Template Assistant is perfect for enhancing templates you’ve already built.
Redesigning for better structure
Ask the assistant to improve your template’s structure and design:
Example prompts:
- “Redesign this template for better structure and visual hierarchy”
- “Improve the layout and add better spacing between sections”
- “Reorganize the blocks to follow best practices”
Adding final touches
Use the assistant to add polish and flair:
Example prompts:
- “Add emojis and better formatting to make this more engaging”
- “Add a context block with timestamp and author information”
- “Improve the button labels and styling”
The assistant understands LithoBlocks design best practices and applies them to your template.
Best practices
Be specific in your requests
Good: “Create a header block with ‘Order Confirmation’, then a section showing order ID, customer name, and total with placeholders”
Less effective: “Make an order template”
Iterate and refine
- Start with a basic request
- Review the generated blocks
- Ask for refinements: “Add a divider and make the header more prominent”
- Continue iterating until you’re satisfied
Combine manual and AI work
- Use the assistant for bulk operations and initial structure
- Manually fine-tune specific blocks, placeholders, or configurations
- Use the assistant again for final polish
Review before accepting
Always review the side-by-side comparison before accepting changes, especially for complex templates or when modifying existing work.
Common use cases
Use case 1: Quick prototype
- Describe your template idea to the assistant
- Let it generate blocks and sample data
- Review and accept
- Test in preview
- Refine as needed
Use case 2: Template enhancement
- Open an existing template
- Ask the assistant to improve structure or add features
- Review changes side-by-side
- Accept changes to create a new version
- Compare versions to see improvements
Use case 3: Data-driven template
- Provide sample data or describe the data structure
- Ask the assistant to create a template that displays all relevant fields
- The assistant generates blocks with appropriate placeholders
- Review and adjust placeholders as needed
Next steps