Objective
Create a basic agent that can execute shell scripts and command-line tasks.
Features
- Execute bash/shell commands
- Handle stdin/stdout/stderr
- Set working directory
- Environment variable management
- Timeout handling
Example Tasks It Can Handle
{
"type": "shell_command",
"content": "Run backup script",
"properties": {
"command": "./backup.sh",
"working_dir": "/home/user/scripts",
"timeout": 300,
"env": {
"BACKUP_DIR": "/mnt/backup"
}
}
}
Safety Considerations
Implementation Steps
- Create ScriptExecutorAgent class
- Implement command parsing
- Add process management
- Handle output capture
- Add safety checks
- Write comprehensive tests
Success Criteria
- Can execute allowed commands safely
- Properly captures output
- Handles errors gracefully
- Respects timeouts
- Clear capability reporting
Related to: Core Agent Base Class
Objective
Create a basic agent that can execute shell scripts and command-line tasks.
Features
Example Tasks It Can Handle
{ "type": "shell_command", "content": "Run backup script", "properties": { "command": "./backup.sh", "working_dir": "/home/user/scripts", "timeout": 300, "env": { "BACKUP_DIR": "/mnt/backup" } } }Safety Considerations
Implementation Steps
Success Criteria
Related to: Core Agent Base Class