Skip to main content

st-agent — SAGE Remote Agent

Lightweight daemon that runs on destination servers. It connects to the SAGE platform via SSE, receives transfer instructions, and executes them using rsync/rclone.

Install

From wheel (air-gapped / no internet)

# On the build machine (has internet):
cd st-agent
pip install build
python -m build          # creates dist/st_agent-0.1.0-py3-none-any.whl

# Copy the wheel to the remote server, then:
pip install st_agent-0.1.0-py3-none-any.whl

From Git (direct)

pip install "git+https://github.com/sachin-techstax/sync_system.git#subdirectory=st-agent"

From source

git clone https://github.com/sachin-techstax/sync_system.git
cd sync_system/st-agent
pip install .

Prerequisites on remote server

  • Python 3.10+
  • rsync (for Linux-to-Linux transfers)
  • rclone (optional, for cloud transfers)
# Ubuntu/Debian
sudo apt install -y rsync python3 python3-pip

# RHEL/CentOS
sudo yum install -y rsync python3 python3-pip

Usage

1. Register with the platform

st-agent register \
  --url http://<platform-ip>:6212 \
  --api-key <your-api-key> \
  --name "server-prod-01"

This generates an RSA keypair, registers with the platform, and saves config to ~/.st-agent/.

2. Start the agent

st-agent start

The agent will:

  • Connect to the platform via SSE (Server-Sent Events)
  • Send heartbeats every 15 seconds
  • Execute transfer instructions (rsync, rclone)
  • Report progress back to the platform in real-time

3. Run as a systemd service (recommended)

sudo tee /etc/systemd/system/st-agent.service << 'EOF'
[Unit]
Description=SAGE Agent
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/st-agent start
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now st-agent
sudo systemctl status st-agent

4. Check status

st-agent status

Configuration

Config is stored in ~/.st-agent/config.json after registration. The agent also stores its RSA keypair in ~/.st-agent/.

Architecture

Platform (hub)                    Remote Server
┌──────────────┐    SSE stream    ┌──────────────┐
│  FastAPI      │ ───────────────▸│  st-agent     │
│  /api/agents  │                 │  daemon       │
│               │◂─── heartbeat ──│               │
│               │◂─── progress ───│  rsync/rclone │
└──────────────┘                  └──────────────┘

Metadata

Release files for st-agent 0.4.1

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

Source distribution (sdist)

Source distribution for st-agent 0.4.1
File Size Uploaded Provenance Actions
st_agent-0.4.1.tar.gz 11.9 kB Without provenance Details for st_agent-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for st-agent 0.4.1
File Interpreter ABI Platform Actions
st_agent-0.4.1-py3-none-any.whl Python 3 none any Details for st_agent-0.4.1-py3-none-any.whl

Total release size: 27.3 kB

Release files / st_agent-0.4.1.tar.gz

Download URL st_agent-0.4.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f7755cd8065b60aa80320110c806221d2e48354f65790478fb02c77e0e96bace
BLAKE2b-256 checksum
How to use checksums
dbfa6ba47597168bd08598658b2cafd5e0e1f5141dee739f4a2ef06ba5e15494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / st_agent-0.4.1-py3-none-any.whl

Download URL st_agent-0.4.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
07afb2eea46b89c5423fc7cc8a2804c7b441e6db0569bb9721e55d11452ff563
BLAKE2b-256 checksum
How to use checksums
faf05df92529fca3f3e3249b26c33e0fd450ab5862ff6737082e1139610cd65b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for st-agent 0.4.1

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.

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