AS AgentScopeAPI 手册 / API Reference

SandboxAware

public interface SandboxAware
源码Source io/agentscope/harness/agent/sandbox/SandboxAware.java:27–32

定义沙箱 Aware契约的接口。位于 io.agentscope.harness.agent.sandbox 包。核心成员包括 setSandbox、getSandbox。

Marks a filesystem that can have its backing Sandbox injected at runtime.

Implemented by SandboxBackedFilesystem so io.agentscope.harness.agent.middleware.SandboxLifecycleMiddleware can set the active sandbox for each call and clear it afterward.

方法摘要Method Summary

方法Method说明Description
public void setSandbox(Sandbox sandbox)
设置沙箱。
Sets the sandbox.
public Sandbox getSandbox()
获取沙箱。
Returns the sandbox.

方法详情Method Detail

setSandbox

public void setSandbox(Sandbox sandbox)

设置沙箱。

Sets the sandbox.

参数Parameters
名称Name类型Type说明Description
sandboxSandbox沙箱(类型 `Sandbox`)。The sandbox.
源码Source io/agentscope/harness/agent/sandbox/SandboxAware.java:29

getSandbox

public Sandbox getSandbox()

获取沙箱。

Returns the sandbox.

返回Returns Sandbox
返回沙箱。Returns sandbox.
源码Source io/agentscope/harness/agent/sandbox/SandboxAware.java:31
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.