DIAL Code Interpreter
DIAL Code Interpreter executes Python in a Jupyter kernel for calculations, data analysis, and visualizations. Quick Apps uses it as a tool through DIAL Core's session API. This reference covers 0.2.0 for platform engineers familiar with App Controller and Core configuration.
Capabilities
| Capability | Behavior |
|---|---|
| Python execution | Executes code in one persistent Python 3 kernel per interpreter process |
| Calculations and data analysis | The image includes NumPy, pandas with spreadsheet support, SciPy, and scikit-learn |
| Visualization | Collects display output from libraries including Plotly, Matplotlib, and seaborn |
| File exchange | Uploads, downloads, and lists files in the configured working directory |
| Session reuse | Core and Quick Apps reuse the selected session across tool calls until it is closed or expires |
The dependencies are declared in pyproject.toml. The interpreter implementation starts python3 through jupyter_client. The service serializes execution calls with a lock; separate sessions require separate interpreter processes.
This service executes tool-supplied code in a session. It does not build or deploy a Code App; that workflow uses App Builder Python and App Controller's image and deployment operations.
How Quick Apps reaches the interpreter
Quick Apps Backend calls DIAL Core. App Controller manages the interpreter workload. The optional proxy is selected by Core's codeInterpreter.sessionProxyUrl setting.
- Request the tool. The model selects the predefined
py_interpretertool. Quick Apps obtains or opens a Core interpreter session. - Prepare files. Quick Apps transfers the attachments named by the tool into the session.
- Execute. Core forwards Python to the session's execution endpoint and returns stdout, stderr, result, and display data.
- Return the result. Quick Apps processes the outputs and attachments for the conversation, then the model continues its answer.
- Expire idle work. Core tracks session use and deletes expired workloads. The kernel's variables and session files are temporary.
Sources: Quick Apps tool, Core workload selection, and session expiry.
Dependencies and deployment modes
| Component | Responsibility |
|---|---|
| DIAL Core | Authentication, role checks, session metadata, expiry, and transfers to or from DIAL file storage |
| App Controller | Starts and removes interpreter workloads in Kubernetes |
| Interpreter image | Runs the HTTP API and Python kernel |
| Knative Serving | Required when Core's sessionProxyUrl is unset and sessions use the deployment API |
| Session proxy | Required when sessionProxyUrl is set; Core creates plain session pods and sends interpreter requests through the proxy |
| Quick Apps Backend | Exposes the Python execution tool to an agent; not required for direct use of Core's session API |
The interpreter can run alone for internal diagnostics, but its four operation endpoints do not implement Core's public session API. Quick Apps expects that public API; pointing it directly at the interpreter container does not supply session management.
Image and health
The image is epam/ai-dial-code-interpreter:0.2.0. It runs as UID 1001, listens on port 8080, and uses /mnt/data as its working directory. GET /health returns {"status":"HEALTHY"}. See the Dockerfile and health endpoint.
The DIAL 1.38 to 1.48 platform releases pin 0.2.0.
The DIAL platform chart 8.1.0 does not deploy this session infrastructure as a chart dependency. Core is configured with the interpreter image and the App Controller endpoint; see Configuration.
Warning
The service executes arbitrary Python and can access resources available to its container. Keep interpreter endpoints private and apply workload resource limits, network restrictions, and filesystem permissions.
SESSION_IDchecks request routing; it does not establish user authorization or a complete sandbox.