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 摘要。