Open in TheBrain

V. 15.0.100

AI Scripting

Create reusable AI instruction templates and trigger them instantly from toolbar buttons or directly within the chat interface. Build anything from quick prompts to sophisticated workflows with conditional logic.

Two Ways to Build Scripts
Dynamic Parameters

Collect input before your script runs. Choose from two parameter types:

Conditional Logic

Make your scripts adapt based on your input with IF/ELSE IF/ELSE blocks. Combine conditions with AND/OR logic, and use the live preview to see exactly which instructions will run for different parameter combinations.

Built-in Variables

Insert context automatically with variables like {ActiveThought}, {ActiveThoughtId}, and {BrainName}. Your scripts stay dynamic and relevant to what you're working on.