Skip to main content

Node execution agent for llm-port cluster-managed runtimes.

Project description

llm_port_node_agent

llm_port_node_agent is the host-side execution bridge for llm-port node clusters.

It does not perform cluster scheduling. The backend remains authoritative for:

  • desired state
  • placement and routing policy
  • GPU-aware filtering and load-balancing

The agent responsibilities are:

  • enroll with one-time token
  • maintain authenticated outbound stream
  • execute node commands (Docker runtime lifecycle)
  • report heartbeat, inventory, command timeline, and events

Quick Start

  1. Create token in backend admin:
    • POST /api/admin/system/nodes/enrollment-tokens
  2. Set environment variables on node host:
    • LLM_PORT_NODE_AGENT_BACKEND_URL
    • LLM_PORT_NODE_AGENT_ENROLLMENT_TOKEN
    • LLM_PORT_NODE_AGENT_AGENT_ID
    • LLM_PORT_NODE_AGENT_HOST
  3. Start service:
    • llmport-agent (foreground, for testing)
    • llmport-agent start (install as systemd service)

Commands

Command Description
llmport-agent Run in foreground (test connectivity, Ctrl+C to stop)
llmport-agent start Install and start as a systemd service (picks up LLM_PORT_NODE_AGENT_* env vars)
llmport-agent stop Stop and disable the systemd service
llmport-agent status Show systemd service status

Environment Variables

  • LLM_PORT_NODE_AGENT_BACKEND_URL default http://127.0.0.1:8000
  • LLM_PORT_NODE_AGENT_AGENT_ID default hostname
  • LLM_PORT_NODE_AGENT_HOST default hostname
  • LLM_PORT_NODE_AGENT_ADVERTISE_HOST default LLM_PORT_NODE_AGENT_HOST
  • LLM_PORT_NODE_AGENT_ADVERTISE_SCHEME default http (allowed: http, https)
  • LLM_PORT_NODE_AGENT_ENROLLMENT_TOKEN one-time token for initial enrollment
  • LLM_PORT_NODE_AGENT_STATE_PATH default /var/lib/llmport-agent/state.json
  • LLM_PORT_NODE_AGENT_HEARTBEAT_INTERVAL_SEC default 15
  • LLM_PORT_NODE_AGENT_INVENTORY_INTERVAL_SEC default 60
  • LLM_PORT_NODE_AGENT_RECONNECT_MIN_SEC default 2
  • LLM_PORT_NODE_AGENT_RECONNECT_MAX_SEC default 30
  • LLM_PORT_NODE_AGENT_REQUEST_TIMEOUT_SEC default 20
  • LLM_PORT_NODE_AGENT_VERIFY_TLS default true
  • LLM_PORT_NODE_AGENT_LOKI_URL Loki push endpoint (e.g. http://10.0.0.1:3100). When set, the agent collects system logs (journald on Linux, Event Log on Windows) and pushes them to Loki with labels {job="node-agent", host="<hostname>", level="..."}.
  • LLM_PORT_NODE_AGENT_LOG_BATCH_SIZE default 100 — max log lines per collection cycle
  • LLM_PORT_NODE_AGENT_LOG_FLUSH_INTERVAL_SEC default 5 — seconds between log collection cycles

Binary Installation (no Python required)

Pre-built standalone binaries are available on the GitHub Releases page for Linux (x86_64), Windows (x86_64), and macOS (universal).

Linux

curl -fLO https://github.com/llm-port/llm-port-node-agent/releases/latest/download/llmport-agent-linux-x86_64
sudo install -m 0755 llmport-agent-linux-x86_64 /usr/local/bin/llmport-agent

Then install the systemd service (see below) or run directly:

export LLM_PORT_NODE_AGENT_BACKEND_URL=http://your-backend:8000
export LLM_PORT_NODE_AGENT_ENROLLMENT_TOKEN=tok_xxx

# Test connectivity first (foreground, Ctrl+C to stop)
llmport-agent

# Once working, install as a service
llmport-agent start

Windows

Download llmport-agent-windows-x86_64.exe from the releases page and run:

$env:LLM_PORT_NODE_AGENT_BACKEND_URL = "http://your-backend:8000"
$env:LLM_PORT_NODE_AGENT_ENROLLMENT_TOKEN = "tok_xxx"
.\llmport-agent-windows-x86_64.exe

macOS

curl -fLO https://github.com/llm-port/llm-port-node-agent/releases/latest/download/llmport-agent-macos-universal
chmod +x llmport-agent-macos-universal
export LLM_PORT_NODE_AGENT_BACKEND_URL=http://your-backend:8000
export LLM_PORT_NODE_AGENT_ENROLLMENT_TOKEN=tok_xxx
./llmport-agent-macos-universal

Via CLI

llmport node agent deploy --backend-url http://your-backend:8000

The CLI auto-detects pre-built binaries in the workspace dist/ directories and uses them instead of cloning + setting up a Python venv.

Systemd

A unit file template is available at:

  • deploy/systemd/llmport-agent.service

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llmport_agent-0.1.6.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llmport_agent-0.1.6-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

Details for the file llmport_agent-0.1.6.tar.gz.

File metadata

  • Download URL: llmport_agent-0.1.6.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for llmport_agent-0.1.6.tar.gz
Algorithm Hash digest
SHA256 6e69634576a11c72d0ae27f0cddf9e05cff78a8e9ca98c8961add7c6f3bdd0e8
MD5 7b7bf688e4ae11abdd5f0e8b2c054400
BLAKE2b-256 3fc307b48eaa9db5fcd3ccca61f081a55c7fc9e1f4d35d9d1c218ebd338d5ff4

See more details on using hashes here.

File details

Details for the file llmport_agent-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: llmport_agent-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 70.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for llmport_agent-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6c5755b872f99c589d1e2a42d89e4a321a21cf72aaa565b82faf188eb3e50c1d
MD5 aa9f1f942360d56cc6dcaebee2ce620f
BLAKE2b-256 1469dafd04bb4f365e3aa8498ad273626015537940bbfc60ccc4993fec9fd6f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page