Skip to main content

AI-SystemAssist

A tiny, easy-to-use HTTP server that lets AI agents (or humans with curl/wget) send shell commands to be executed on the machine and receive the output back.

Intended use: Give an LLM / agent the ability to run commands on a machine over HTTP and get results.

⚠️ SECURITY WARNING

  • This server executes arbitrary shell commands.
  • Run it only on machines you control.
  • Default binding is 127.0.0.1 (localhost only).
  • Always use a strong auth token.
  • To execute commands as root/admin, start the server with sudo.
  • Do not expose this on the public internet without strong additional protections (VPN, firewall, TLS reverse proxy, etc.).

Installation

From the source directory (development):

pip install -e .

Or build & install:

pip install .

Quick Start

# Start the server (will generate a token if none provided)
sudo ai-systemassist

# Or with explicit token and options
AI_SYSTEMASSIST_TOKEN=my-super-secret-token ai-systemassist --host 127.0.0.1 --port 8765

Environment variables (also supported):

  • AI_SYSTEMASSIST_TOKEN
  • AI_SYSTEMASSIST_HOST
  • AI_SYSTEMASSIST_PORT

Usage from curl / wget (very easy)

1. With generated or provided token

TOKEN="your-token-here"

# Simple - raw POST body is treated as the command
curl -X POST -d 'whoami && id' \
  -H "X-Agent-Token: $TOKEN" \
  http://127.0.0.1:8765/execute

# JSON body (recommended for complex cases)
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-Agent-Token: $TOKEN" \
  -d '{"command": "ls -la /", "timeout": 30}' \
  http://127.0.0.1:8765/execute

# Query param (quick and dirty - visible in logs)
curl "http://127.0.0.1:8765/execute?token=$TOKEN&cmd=uptime"

2. Example response

{
  "command": "whoami && id",
  "success": true,
  "returncode": 0,
  "stdout": "root\nuid=0(root) gid=0(root) groups=0(root)\n",
  "stderr": "",
  "duration": 0.012
}

Using wget

wget -qO- --post-data='ls -l' \
  --header="X-Agent-Token: $TOKEN" \
  http://127.0.0.1:8765/execute

Endpoints

Endpoint Method Description
/execute POST Run a command. Auth required.
/execute GET Same as POST (useful for simple queries)
/health GET Basic health + version info
/ GET API information + examples

Request formats supported on /execute

  • JSON: { "command": "ls", "timeout": 30, "cwd": "/tmp" }
  • Form: command=ls or cmd=ls
  • Raw body: echo hello | cat
  • Query params: ?cmd=ls&token=...

Auth can be sent as:

  • Header: X-Agent-Token: xxx
  • Header: Authorization: Bearer xxx
  • Header: X-Auth-Token: xxx
  • Query: ?token=xxx

Running as Admin / Root

sudo ai-systemassist --token "super-secret"
# or
sudo -E ai-systemassist   # preserves env vars including AI_SYSTEMASSIST_TOKEN

All commands will then run as root.

Configuration / CLI

ai-systemassist --help

Options:

  • --host, --port
  • --token
  • --allow-cors

Python usage (advanced)

from ai_systemassist.server import create_app, run_server

app = create_app(auth_token="mytoken")
# then run with your own WSGI server if desired (gunicorn, waitress, etc.)

Development

pip install -e ".[dev]"

For AI Agents

See AGENTS.md for detailed instructions written specifically for AI agents and LLMs on how to use this tool effectively (authentication, request formats, response handling, best practices, and safety guidelines).

License

MIT

Metadata

Release files for AI-SystemAssist 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AI-SystemAssist 0.2.0
File Size Uploaded Provenance
ai_systemassist-0.2.0.tar.gz 7.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for AI-SystemAssist 0.2.0
File Interpreter ABI Platform
ai_systemassist-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / ai_systemassist-0.2.0.tar.gz

Download URL ai_systemassist-0.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
32324136da54a0837cdafba0a99da0f6ff17528a4ca6532616460df7302f4381
BLAKE2b-256 checksum
How to use checksums
ba984ddd70f4caa32b4d81f09e9d1776905f2adc9871d8fd1f59cec376671f36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / ai_systemassist-0.2.0-py3-none-any.whl

Download URL ai_systemassist-0.2.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdc3d31c65327f4db408dbe6f56e7523e714e11bab9e94ed47242d296a9b1f1f
BLAKE2b-256 checksum
How to use checksums
881319120440a9d1a699fee1d647e9479ddb70a2d076a71dc04b86cd0d0602af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for AI-SystemAssist 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page