How It Works
| Mode | What happens |
|---|---|
| Execute | Reagent writes and runs Lua code immediately in REAPER. You see the result but not the code. This is what happens behind the scenes for most requests. |
| Create | Reagent generates the code and presents it for review. You decide when to run it, save it, or discard it. |

API Search
When writing scripts, Reagent uses a built-in semantic search over the full ReaScript API documentation. Instead of guessing function names, it searches by describing what it needs to do — like “how to add an effect plugin to a track” or “get item fade length” — and gets back the correct function signatures, parameters, and usage notes. This means Reagent writes scripts using verified API calls rather than memorized function names, reducing errors and ensuring compatibility with your version of REAPER. You can also use this directly:The Script Panel
When Reagent creates a script, it appears in a dedicated panel with controls for managing it.
Reviewing Code
The panel displays the full Lua source code with syntax highlighting. Read through it, verify the logic, and decide what to do next.Running
Click the Play button to execute the script in REAPER immediately. You’ll see a spinner while it runs, then a checkmark on success or an error indicator if something went wrong.Copying
Click the Copy button to copy the full script to your clipboard.Saving

.lua file and register it as a REAPER action. All scripts generated from Reagent are saved under the Scripts/reagent/ folder in your REAPER resource directory. On first save:
- A name field appears, pre-filled based on the script’s purpose (e.g.,
Reagent: Toggle SFX Mutes) - Adjust the name if you like, then confirm
- The file is saved and registered—it shows up in REAPER’s Action List as
Script: <name>.lua - REAPER opens a shortcut dialog so you can assign a keyboard shortcut to your new script