Expand description
LLM-callable tools for spawning and interacting with sandboxed commands.
These tools are the primary interface for an LLM agent to execute commands:
RunCommandTool— spawn a command, optionally wait for completionOpenShellTool— open an interactive PTY session for HITLShellWriteTool— send input to a PTY sessionShellReadTool— read available output from a PTY sessionShellExpectTool— wait for a regex pattern (likeexpect(1))ShellExpectCasesTool— wait for one of N patterns (switch/case)ShellBatchTool— run a send/expect sequence in one callShellSignalTool— send an OS signal to a shell session
§goexpect compatibility
All expect operations are backed by expectrl, providing:
- Full regex matching with capture groups
- Multi-pattern switch/case via
expectrl::Any - Configurable timeouts (0 = dump buffer, default = 30s)
- Cross-platform PTY support (Linux + macOS)
Structs§
- Open
Shell Tool - LLM tool: open an interactive PTY shell session backed by expectrl.
- RunCommand
Tool - LLM tool: run a command inside the sandbox.
- Shell
Batch Tool - LLM tool: run a sequence of send/expect steps in one call.
- Shell
Expect Cases Tool - LLM tool: wait for one of several regex patterns (switch/case).
- Shell
Expect Tool - LLM tool: wait for a regex pattern in PTY output.
- Shell
Read Tool - LLM tool: non-blocking read of available PTY output.
- Shell
Signal Tool - LLM tool: send an OS signal to a shell session’s process.
- Shell
Write Tool - LLM tool: send input to a PTY session via expectrl.