ShellTool
org.llm4s.toolapi.builtin.shell.ShellTool
object ShellTool
Tool for executing shell commands.
IMPORTANT: This tool requires an explicit allowlist of commands for safety. It will not execute any command that is not in the allowlist.
Features:
- Command allowlist for security
- Configurable working directory
- Timeout support
- Output size limits
Attributes
- Example
-
{ import org.llm4s.toolapi.builtin.shell._ // Read-only shell (safe commands) val readOnlyShell = ShellTool.create(ShellConfig.readOnly()) // Development shell (common dev tools) val devShell = ShellTool.create(ShellConfig.development( workingDirectory = Some("/home/user/project") )) val tools = new ToolRegistry(Seq(devShell)) agent.run("List files in the current directory", tools)}
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ShellTool.type
Members list
In this article