Learning SQRT
SQRT is a declarative policy language for defining tool access control rules. This tutorial series teaches you SQRT from the ground up.
Tutorials
- Metadata - Introduction to values and metadata in SQRT
- Basic Types - Type domains: bool, int, float, str, datetime
- Set Operations - Sets, unions, intersections, aggregations
- Predicates - Boolean expressions and comparisons
- Tool Policies - Check rules, meta updates, shorthand syntax
Quick Reference
Check Rules
tool "my_tool" {
must deny when condition; // Hard block
should allow when condition; // Soft allow
should deny always; // Default fallback
}
Meta Updates
Shorthand Syntax
tool "my_tool" -> @tags |= {"tagged"};
tool "my_tool" [10] -> session @tags |= {"priority"} when @result.tags overlaps {"important"};