Safe and reliable system command execution for AI agents.
echo '{"command": "ls -la"}' | node scripts/dist/index.js
node scripts/dist/index.js --server --port 8080
curl -X POST http://localhost:8080/exec -H "Content-Type: application/json" -d '{"command": "ls -la"}'
| Capability | Description |
|---|---|
| ------------ | ------------- |
| Sync Execution | Execute command with timeout, wait for result |
| Background Execution | Start long tasks, get PID, query later |
| Watch Window | Confirm service startup before returning |
| 8KB Ring Buffer | Head-Tail dual buffer prevents OOM |
| Process Management | Query status, get logs, terminate processes |
| Multi-Agent Sharing | HTTP service allows multiple agents to share state |
Execute a command:
{
"command": "required - system command",
"workingDir": "optional - working directory",
"timeoutSeconds": "optional - default 30",
"runInBackground": "optional - default false",
"watchDurationSeconds": "optional - for service startup",
"env": "optional - custom environment variables"
}
Query process status.
Get process output logs.
Terminate a process.
List all background processes.
| Status | Meaning |
|---|---|
| -------- | --------- |
success | Command completed, exit code 0 |
failed | Command failed, non-zero exit |
timeout | Command killed after timeout |
killed | Process manually terminated |
running | Background process active |
See references/AGENT_GUIDE.md for detailed usage guide and examples.
MIT
共 1 个版本