agentscope-ai / agentscope-ai/agentscope-runtime-java

[Feature Request] Support Sandbox Snapshots for Stateful Multi-Turn Code Execution

未關閉
#76 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Java
星號
184
分支
38
PR 合併指標
30 天內沒有已合併 PR

描述

### Description

Currently, each tool invocation that uses the sandbox (e.g., code interpreter) starts from a **clean or fixed initial state**. This forces users to:

- Re-declare variables, re-import libraries, or re-upload data in every turn
- Avoid multi-step coding workflows (e.g., “load data → plot → refine”)
- Work around state loss with brittle workarounds (e.g., concatenating all code into one block)

To enable **interactive, stateful programming sessions** (like Jupyter Notebook), we propose adding **sandbox snapshot support**:

> After a successful code execution, the sandbox can **save its current runtime state** (e.g., Python globals, installed packages, file system changes).
> Subsequent calls can **resume from that snapshot**, preserving context across turns.

This is especially valuable for:

- Data analysis agents
- Long-running agent workflows with iterative coding

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。