Status: Accepted (documented from implementation)
Applies to: deployments running the agent layer (AI bundled or AI separate topologies)
Related: Agents
The data_analysis_agent lets the LLM author Python to analyse fetched CSV data (statistics, correlation, anomaly detection). Executing model-generated code with full interpreter access would be a remote-code-execution risk.
User/LLM-generated analysis code is compiled and run under RestrictedPython rather than a bare exec:
from RestrictedPython import compile_restricted, safe_globals, limited_builtins plus guarded builtins — pulse_multi_agents:pulse_manager/sub_agents/data_analysis_agent/agent.py:19-21compile_restricted(code, '<string>', 'exec') before execution, into a curated namespace (e.g. numpy) — pulse_multi_agents:pulse_manager/sub_agents/data_analysis_agent/agent.py:1413 and the surrounding execution blockThe analysis agent operates only on CSV files produced by meta_data_agent; it does not fetch data itself (see agents.md).
pulse_multi_agents:pulse_manager/sub_agents/data_analysis_agent/agent.py:19-21, :1413Last updated: 2026-06-02 from pulse_multi_agents@e278054