Skip to main content

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​

CapabilityBehavior
Python executionExecutes code in one persistent Python 3 kernel per interpreter process
Calculations and data analysisThe image includes NumPy, pandas with spreadsheet support, SciPy, and scikit-learn
VisualizationCollects display output from libraries including Plotly, Matplotlib, and seaborn
File exchangeUploads, downloads, and lists files in the configured working directory
Session reuseCore 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.

  1. Request the tool. The model selects the predefined py_interpreter tool. Quick Apps obtains or opens a Core interpreter session.
  2. Prepare files. Quick Apps transfers the attachments named by the tool into the session.
  3. Execute. Core forwards Python to the session's execution endpoint and returns stdout, stderr, result, and display data.
  4. Return the result. Quick Apps processes the outputs and attachments for the conversation, then the model continues its answer.
  5. 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​

ComponentResponsibility
DIAL CoreAuthentication, role checks, session metadata, expiry, and transfers to or from DIAL file storage
App ControllerStarts and removes interpreter workloads in Kubernetes
Interpreter imageRuns the HTTP API and Python kernel
Knative ServingRequired when Core's sessionProxyUrl is unset and sessions use the deployment API
Session proxyRequired when sessionProxyUrl is set; Core creates plain session pods and sends interpreter requests through the proxy
Quick Apps BackendExposes 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_ID checks request routing; it does not establish user authorization or a complete sandbox.