What is ScripterAgent?
ScripterAgent executes off-device Python code for tasks that don’t require device interaction. It’s triggered by ManagerAgent when API calls, file operations, or data processing are needed. ScripterAgent enables:- API calls: REST APIs, webhooks, database queries
- File operations: Reading, writing, parsing files
- Data processing: JSON/CSV parsing, transformations, filtering
How It Works
ManagerAgent delegates tasks to ScripterAgent by providing full context and a high-level task description. ScripterAgent is a ReAct agent that follows a think-execute-observe loop:- Receives task from Manager with full context
- Thinks and generates Python code to make progress
- Executes the code and observes the output
- Repeats steps 2-3 until task is complete
- Returns message to Manager summarizing the results
Examples
API Calls
Manager delegates:{'temp': 62, 'description': 'Partly cloudy', 'humidity': 65}
ScripterAgent (Final):
Webhook Notifications
Manager delegates:Webhook response: 200
ScripterAgent (Final):
File Operations
Manager delegates:Total contacts: 150
Sample: {'name': 'John', 'city': 'New York', 'email': '...'}
ScripterAgent (Iteration 2):
Filtered 23 contacts from New York
ScripterAgent (Final):
Configuration
allowed_modules
can be imported.
Key Points
- ReAct agent: Think-execute-observe loop until task complete
- Off-device only: No device interactions
- State persistence: Variables persist across iterations (Jupyter-style)
- Completion signal: Returns message without code when done
- Safe by default: Restricted imports/builtins