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.7.tar.gz (72.2 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.7-py3-none-any.whl (70.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llmport_agent-0.1.7.tar.gz
  • Upload date:
  • Size: 72.2 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.7.tar.gz
Algorithm Hash digest
SHA256 de850fb91a4a077a2b67af603c13630d0450804fbaf3ca3c925de7a72bbc0493
MD5 ae04ee8fb2f111b9e1b4d5bcb1db304b
BLAKE2b-256 1b3ff40095a849b986bd506c323d11b4bb8178e62f03dab9df1ef9077bb988db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llmport_agent-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0a99b9f7cd3d365739c83828b6d508569299abbab9184506502ed9a7e56bf8d9
MD5 c987234576a3d8a4bb6def30530f3a44
BLAKE2b-256 00a4327e7ea991b58ba5a33999bb4bed3ce9791c156eaa028d6f0ba6fd62c1eb

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