smolagents-audit/docs/source/en/reference/python_executors.md
2026-05-29 07:03:46 +02:00

37 lines
1.1 KiB
Markdown

# Python code executors
Python executors are responsible for running the code generated by code agents in a controlled environment.
Since agents dynamically generate and execute Python code to accomplish tasks, choosing the right executor is critical
for both functionality and security.
To learn more about code execution and its risks, make sure to read the [Secure code execution](../tutorials/secure_code_execution)
tutorial. This reference contains the API docs for the underlying classes: the base `PythonExecutor` interface and all
available executor implementations.
## Python executor
[[autodoc]] smolagents.local_python_executor.PythonExecutor
## Local Python executor
[[autodoc]] smolagents.local_python_executor.LocalPythonExecutor
## Remote Python executors
[[autodoc]] smolagents.remote_executors.RemotePythonExecutor
### BlaxelExecutor
[[autodoc]] smolagents.remote_executors.BlaxelExecutor
### E2BExecutor
[[autodoc]] smolagents.remote_executors.E2BExecutor
### ModalExecutor
[[autodoc]] smolagents.remote_executors.ModalExecutor
### DockerExecutor
[[autodoc]] smolagents.remote_executors.DockerExecutor