Class ShellExecuteTool

java.lang.Object
io.agentscope.harness.agent.tool.ShellExecuteTool

public class ShellExecuteTool extends Object
Shell execution tool backed by a AbstractSandboxFilesystem.
  • Field Details

  • Constructor Details

  • Method Details

    • execute

      @Tool(description="Execute a shell command. Use for git, npm, build, test, and other terminal operations. Returns combined output and exit code. If a dedicated tool exists (e.g., read_file, write_file), you MUST use it instead of shell commands.") public String execute(io.agentscope.core.agent.RuntimeContext runtimeContext, @ToolParam(name="command",description="Shell command to execute") String command, @ToolParam(name="working_directory",description="Working directory (relative to workspace root, optional)",required=false) String workingDirectory, @ToolParam(name="timeout",description="Timeout in seconds (default: 30)",required=false) Integer timeout)
      Parameters:
      runtimeContext - per-call agent runtime injected by the framework (not an LLM argument); may be null when no merged context is available