Documentation
Welcome to the .prompt documentation. Here you'll find everything you need to get started and master the language.
Quick Links
- Getting Started - Set up and write your first .prompt file
- Language Reference - Complete syntax guide
- Types - Type system documentation
- Control Flow - if/elif/else, case, vary
- Fragments - Static and dynamic composition
- Response Contracts - Output schema definition
- Versioning - Semantic versioning for prompts
- API Reference - HTTP API endpoints
The One Rule
@ means variable. Always. Only. Everywhere.
Structural keywords (like init, if, case, end) never use @.
Example
init do
@version: 1.0
@major: 1
params:
@name: str
@age: int
end init
Hello, @name! You are @age years old. This compiles to a simple greeting with the variables replaced at runtime.