# Code execution

Runs Python or JavaScript code in the sandbox.

## Configuration

Prefer deterministic transforms and small outputs. Enable internet only when the workflow truly needs it.

## Runtime output

The node writes its main result to `last_output` and, when structured, to `last_output_parsed`. Downstream nodes can reference named outputs through `{outputs.<node_id>.parsed}`.

Workflow values are provided as **environment variables**, not language globals. In Python, read them through `os.environ`:

```python
import json
import os

data = {
    "name": "modou",
    "age": 19,
    "input": os.environ.get("WORKFLOW_INPUT", ""),
}
print(json.dumps(data, ensure_ascii=False))
```

JavaScript uses `process.env.WORKFLOW_INPUT`. Other available variables include `WORKFLOW_LAST_OUTPUT`, `WORKFLOW_FILES_JSON`, and `WORKFLOW_FILES_INDEX_PATH` when supported by the active sandbox provider.

## Example workflow

Use the workflow card below to create a working example in the editor. It uses safe sample data and avoids external side effects unless the node itself is an outbound integration.

---

*Source: https://agentbuilder.systalink.sn/docs/node-code-execution — human documentation.*
*Other language: [/docs-md/fr/node-code-execution.md](/docs-md/fr/node-code-execution.md).*
*Machine-readable index: [/llms.txt](/llms.txt).*
