AI-SystemAssist is a lightweight HTTP server designed specifically for AI agents and LLMs. It allows agents to execute real shell commands on a machine and receive structured, machine-readable output.
Whether you're building autonomous agents, giving LLMs tool-use capabilities, or just want a simple way for scripts to run commands remotely, AI-SystemAssist provides a secure and easy-to-use interface.
pip install AI-SystemAssist
Requires Python 3.11 or higher.
ai-systemassist
The server will start on http://127.0.0.1:8765 and generate a token.
curl -X POST -d 'whoami' \ -H "X-Agent-Token: YOUR_TOKEN" \ http://127.0.0.1:8765/execute
Run the server using the installed CLI:
ai-systemassist
By default it binds to 127.0.0.1:8765 and generates a random auth token.
| Flag | Description |
|---|---|
| --host | Host to bind to (default: 127.0.0.1) |
| --port, -p | Port to listen on (default: 8765) |
| --token | Auth token (generates one if omitted) |
| --allow-cors | Enable CORS headers (for local dev) |
AI_SYSTEMASSIST_TOKEN
Auth token (recommended for production)
AI_SYSTEMASSIST_HOST
Host interface
AI_SYSTEMASSIST_PORT
Port number
To execute commands with root/admin privileges, start the server with sudo:
sudo AI_SYSTEMASSIST_TOKEN="your-token" ai-systemassist
Every request to /execute must include a token using one of these methods:
curl -X POST -d 'ls -la /tmp' \
-H "X-Agent-Token: YOUR_TOKEN" \
http://127.0.0.1:8765/execute
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Agent-Token: YOUR_TOKEN" \
-d '{"command": "apt update", "timeout": 60, "cwd": "/tmp"}' \
http://127.0.0.1:8765/execute
curl "http://127.0.0.1:8765/execute?token=YOUR_TOKEN&cmd=uptime"
{
"command": "the command that was executed",
"success": true,
"returncode": 0,
"stdout": "standard output here\n",
"stderr": "",
"duration": 0.034
}
sudo only when necessaryAI-SystemAssist was designed to be used directly by LLM agents via simple HTTP calls. Agents can:
ls, df, psX-Agent-Token header.sudo for root operations.