Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build and deploy AI applications on Azure AI Foundry using Microsoft's model catalog and AI services
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
foundry-agent/create/references/tool-code-interpreter.md
1# Tool — Code Interpreter23Enables agents to write and run Python in a sandboxed environment. Supports data analysis, chart generation, and file processing. Has [additional charges](https://azure.microsoft.com/pricing/details/cognitive-services/openai-service/) beyond token-based fees.45> Sessions: 1-hour active / 30-min idle timeout. Each conversation = separate billable session.67> ⚠️ When Code Interpreter is used through a toolbox in a **hosted agent**, user isolation isn't supported — all users in the same project share one container context.89## Prompt-agent SDK class1011`CodeInterpreterTool` — see [tool-mcp.md](tool-mcp.md) for the general prompt-agent tool-wiring pattern; Code Interpreter takes no constructor arguments.1213## Toolbox shape1415```json16{ "type": "code_interpreter" }17```1819No other fields. Only one `code_interpreter` per toolbox version (unnamed tool).2021## References2223- [Code Interpreter tool documentation](https://learn.microsoft.com/azure/foundry/agents/how-to/tools/code-interpreter)24- [agent-tools.md](agent-tools.md) — tool index25- [toolbox-reference.md](toolbox-reference.md) — endpoint, auth, and MCP protocol details26