Package io.agentscope.harness.agent.tool
Class ShellExecuteTool
java.lang.Object
io.agentscope.harness.agent.tool.ShellExecuteTool
Shell execution tool backed by a
AbstractSandboxFilesystem.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRegistered tool name (derived from theexecute(io.agentscope.core.agent.RuntimeContext, java.lang.String, java.lang.String, java.lang.Integer)method name). -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NAME
Registered tool name (derived from theexecute(io.agentscope.core.agent.RuntimeContext, java.lang.String, java.lang.String, java.lang.Integer)method name).- See Also:
-
-
Constructor Details
-
ShellExecuteTool
-
-
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 benullwhen no merged context is available
-