Why Scripts?
Instead of using the LLM to process data step by step, agents can write code to process data. This has massive impact on:| Benefit | Description |
|---|---|
| Speed | Code executes instantly vs. LLM token-by-token processing |
| Cost | One script execution vs. thousands of LLM calls |
| Reliability | Deterministic code vs. probabilistic LLM outputs |
How It Works
1
Agent identifies repetitive task
When an agent sees it needs to process data repeatedly, it can write a script.
2
Agent writes the code
The agent generates code to handle the task.
3
Script is saved
The script is stored and can be called whenever needed.
4
Agent executes on demand
Future runs use the saved script instead of LLM processing.
Example Use Cases
Data Import
Data Import
Import data from a spreadsheet and store in a database. Instead of processing each row with the LLM, a script handles the transformation.
Financial Calculations
Financial Calculations
Complex calculations (interest rates, tax computations, currency conversions) are best done by code, not LLM calls.
Data Transformation
Data Transformation
Convert between formats, clean data, or merge datasets efficiently.
Batch Processing
Batch Processing
Process hundreds or thousands of records quickly and consistently.
Scripts are particularly useful when:
- Processing large volumes of data
- Performing precise calculations
- Transforming data between formats
- Executing the same logic repeatedly
Script Management
- Scripts are versioned alongside agent instructions
- You can view, edit, and test scripts manually
- Agents can update scripts as requirements change

