ShellVerificationTool¶
This docs was updated at: 2026-03-21
com.paragon.harness.tools.ShellVerificationTool · Class
Extends FunctionTool<ShellVerificationTool.TriggerRequest>
A FunctionTool that runs a fixed shell command and returns the result.
Security model: The command is fixed at construction time by the developer. The agent can only trigger execution — it cannot modify the command. This prevents prompt injection attacks.
Example: let the agent run the project's test suite:
ShellVerificationTool testTool = ShellVerificationTool.builder()
.name("run_tests")
.description("Run the project test suite and return results")
.command("mvn", "test", "-q")
.workingDir(Path.of("/my/project"))
.timeoutSeconds(120)
.build();
Agent agent = Agent.builder()
.addTool(testTool)
.build();
See Also
VerificationResult
Since: 1.0
Methods¶
runCommand¶
Runs the configured command and returns the result. Can also be called programmatically.
Returns
the verification result
builder¶
Returns a new builder.
name¶
Sets the tool name (as seen by the LLM).
description¶
Sets the tool description.
command¶
Sets the command as a vararg of tokens (no shell expansion).
command¶
Sets the command as a list.
workingDir¶
Sets the working directory for the command.
timeoutSeconds¶
Sets the command timeout in seconds (default: 60).
build¶
Builds the tool.