Shell Execution
The exec tool lets the agent run shell commands on your system. This is how it installs packages, runs scripts, checks git status, and more.
Configuration
{
"tools": {
"exec": {
"timeout": 60,
"restrictToWorkspace": false
}
}
}Fields
| Field | Type | Default | Description |
|---|---|---|---|
timeout | number | 60 | Maximum seconds a command can run before being killed |
restrictToWorkspace | bool | false | If true, block commands that access paths outside the workspace |
Workspace restriction
When restrictToWorkspace is true, the agent can only run commands that operate within the workspace directory. This is useful if you want to sandbox the agent and prevent it from modifying system files.
Timeout
Commands that exceed the timeout are killed automatically. Increase this for long-running operations like builds or large downloads.
What the agent can do
With shell access, the agent can:
- Run scripts and programs
- Install packages (
pip install,npm install, etc.) - Use git (
git status,git diff,git commit) - Check system info (
uname,df,ps) - Compile and run code
- Anything you could do in a terminal
Security considerations
Shell access is powerful. Use allowFrom on your chat channels to restrict who can trigger commands, and consider restrictToWorkspace: true if you want to limit the blast radius. See Security for more.