Skip to main content

foundry-code

Python code execution via Azure AI Foundry Responses API with code_interpreter tool. Data analysis, charts, and math in a managed sandbox.

Source facts

Repository
Azure/kars
Last source activity
April 29, 2026 at 21:44
Detected SKILL.md language
English
Stars
43
Forks
12

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
foundry-code
description
Python code execution via Azure AI Foundry Responses API with code_interpreter tool. Data analysis, charts, and math in a managed sandbox.
metadata
{"openclaw":{"requires":{"env":"[Truncated]"},"primaryEnv":"FOUNDRY_PROJECT_ENDPOINT"}}
# Foundry Code — Code Interpreter (Responses API) You have access to Python code execution via the Foundry Responses API `code_interpreter` tool. Use this for data analysis, chart generation, complex math, and file processing. No Foundry hosted agent needed — uses direct Responses API. ## Why use this instead of local bash/python The local sandbox has restricted packages. Foundry code_interpreter runs server-side with pre-installed data science libraries (pandas, numpy, matplotlib, scipy, etc.) and can generate visualizations. ## Endpoint All requests: `http://localhost:8443` with `?api-version=2025-11-15-preview`. Auth is automatic. ## Operations ### Run Python code ```bash curl -s -X POST 'http://localhost:8443/openai/responses?api-version=2025-11-15-preview' \ -H 'Content-Type: application/json' \ -d '{"model":"gpt-4.1","input":"Calculate the first 20 Fibonacci numbers and show them.","tools":[{"type":"code_interpreter","container":{"type":"auto"}}],"store":false}' ``` The model will write and execute Python code, returning both the code and its output. ### Data analysis ```bash curl -s -X POST 'http://localhost:8443/openai/responses?api-version=2025-11-15-preview' \ -H 'Content-Type: application/json' \ -d '{"model":"gpt-4.1","input":"Generate 100 random data points, compute mean/median/std, and tell me if normally distributed.","tools":[{"type":"code_interpreter","container":{"type":"auto"}}],"store":false}' ``` ## When to use - User asks for data analysis: "analyze this", "show statistics" - Charts or visualizations: "plot the trend", "create a chart" - Complex math: "solve this equation", "calculate correlation" - Anything requiring Python runtime ## When NOT to use - For simple shell commands (use local bash) - For web searches (use foundry-web-search) - For document Q&A (use foundry-knowledge) - For remembering preferences (use foundry-memory)
View on GitHub