repl_run_code
Run Python code with persistent variables across calls. Assign data to named variables for later reuse; use 'result' to return output to the caller.
Instructions
Execute Python code with a PERSISTENT namespace.
Variables you assign are STORED and available in subsequent calls.
Access them DIRECTLY by name (e.g. my_data, df).
The result variable is ONLY for returning output to the caller.
It does NOT persist between calls — use named variables instead.
Correct workflow::
Call 1: data = load_csv("input.csv"); result = f"loaded {len(data)} rows"
Call 2: filtered = [r for r in data if r["active"]]; result = len(filtered)Returns: JSON with execution result, new/modified variables, and namespace summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |