Code Interpreter
Description
The Code Interpreter tool lets the agent run Python code in-chat and display the resulting graphs, charts, tables, and other visualizations instantly. Itâs ideal for math, statistics, data analysis, and any scenario where seeing the data makes concepts clearerâsuch as integrals, functions, distributions, or real-world datasetsâdirectly alongside the explanation.
Target Audience
User
Features
In-Chat Graphs & Visualizations
Ask the agent to plot functions, integrals, histograms, bar charts, scatterplots, and more. Visuals appear directly below the AIâs response.
Python Sandbox Execution
The agent safely runs Python code behind the scenes, enabling calculations, filtering, aggregation, and visualization without leaving the chat.
Automatic Task Restatement
Before executing, the agent restates your request (e.g., âPlot the integral of x² from 1 to 100â) so you can confirm it understood correctly.
Immediate, Context-Aware Explanations
After rendering a visualization, the agent explains what youâre seeingâhighlighting trends, key values, comparisons, or anomalies.
File-Based Data Analysis
Upload spreadsheets or datasets (CSV, Excel, etc.) and ask the agent to:
- Analyze the data
- Generate charts
- Summarize patterns
- Extract specific records
Privacy-Aware Processing
When datasets contain sensitive information, the agent follows privacy guardrailsâautomatically anonymizing or omitting restricted fields when generating outputs.
Downloadable Results
For certain requests, the agent can generate CSV outputs you can download and review outside the platform.
How to Use (step by step)
Verify the Tool Is Enabled
In the agent sidebar, confirm Code Interpreter is toggled On.
Enter Your Request
Type a prompt in the chat, such as:
âPlot the integral of x² from 1 to 100.â
Agentic OS Restates the Task
The AI echoes your request to confirm understanding, for example:
âSure â plotting ⍠x² dx from 1 to 100.â
View the Generated Output
The agent runs the code and displays the visualization directly in the chat.
Review the Explanation
Beneath the output, the agent explains what the graph or table represents and why it matters.
Iterate or Refine
You can ask follow-up prompts such as:
âAdd gridlines.â
âZoom into x = 1 to 10.â
âOverlay y = xÂł for comparison.â
The agent updates the visualization accordingly.
Working with Uploaded Data (Advanced Example)
Upload a Dataset
Use the file upload option to provide a dataset, such as a spreadsheet containing incident reports, lab results, or survey data.
Ask a Visualization Question
For example:
âShow me a graph of the campuses with the most incidents reported.â
The agent will:
- Analyze the uploaded data
- Aggregate values as needed
- Render a chart (e.g., bar graph)
- Explain what the chart shows
Sensitive fields are anonymized automatically if required.
Ask for Filtered Records
You can also request specific subsets of the data, for example:
âShow me all records involving hydrochloric acid.â
In this case, the agent may:
- Provide a short executive summary
- Generate a CSV file containing only the relevant records
- Include a download link so you can open the data externally
Pedagogical Use Cases
Calculus Visualization
Plot definite or indefinite integrals, derivatives, and Riemann sums to see area under curves and slope behavior.
Function Exploration
Compare multiple functions (e.g., y = sin x vs. y = cos x) on the same axes to study amplitude, period, and phase shifts.
Statistics & Data Analysis
Upload datasets and generate histograms, box plots, bar charts, or scatterplots to analyze distributions and correlations.
Physics & Engineering Labs
Graph experimental data (e.g., projectile motion or lab incident frequency) and fit trend lines or models to validate hypotheses.
Data Literacy & Real-World Analysis
Explore real institutional or research datasetsâsummarizing trends, identifying outliers, and extracting specific records.
Quick Concept Checks
Replicate textbook graphs or lab figures to verify understanding or test âwhat-ifâ scenarios.
With Code Interpreter enabled, you can move seamlessly from raw data or abstract equations to clear visuals, summaries, and downloadable resultsâall inside Agentic OS.