> ## Documentation Index
> Fetch the complete documentation index at: https://ppio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Python Code Interpreter 示例

我们基于 [PPIO LLM API](/model/overview) 和 Agent Sandbox 实现一个简单的 Python Code Interpreter，其能将自然语言描述转换为可执行的 Python 代码，并在安全的沙箱环境中运行，最终返回经过 LLM 总结后的执行结果。

该示例实现了以下功能特性：

* **AI 代码生成**：使用 PPIO LLM API（本示例基于 DeepSeek V3.2）基于自然语言生成 Python 代码；
* **安全执行**：使用 PPIO Agent Sandbox 在隔离环境中运行 AI 生成的代码；
* **自动调试**：代码执行出错时，自动分析错误并尝试修复；

通过本示例，为您展示了如何在实际场景下使用 PPIO 的 Agent Sandbox 和 LLM API 服务。

您可以在这里 [https://github.com/ppinfralab/PPIO-collab/tree/main/examples/python-code-interpreter](https://github.com/ppinfralab/PPIO-collab/tree/main/examples/python-code-interpreter) 找到完整文档和代码。
