The agent is the worker component of Serverless Fabric. It receives function deployments from Flux (the control plane) over gRPC, executes them natively under cgroups v2 memory limits, and reports node metrics back for autoscaling decisions.
Each agent runs as root to manage cgroups. Functions are deployed to /home/flux-runner/apps/ and execute as the unprivileged flux-runner system user.
Download the latest release from GitHub Releases:
sudo dpkg -i flux-agent_*.debThe package creates the flux-runner user, installs a systemd service, and places an example config at /etc/flux-agent/agent.yaml.example.
sudo useradd -r -m -s /bin/bash flux-runnerCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o flux-agent .
sudo install -Dm755 flux-agent /usr/local/bin/flux-agentCopy example.agent.yaml to agent.yaml and edit:
agent_id: agent-1
port: 50051
max_concurrency: 10
redis_addr: redis://localhost:6379When agents are provisioned by Flux, mTLS certificates are automatically generated and uploaded during SSH bootstrap — no manual cert setup is needed.
# Directly
sudo ./flux-agent
# Or via systemd (after .deb install)
sudo cp /etc/flux-agent/agent.yaml.example /etc/flux-agent/agent.yaml
# edit agent.yaml
sudo systemctl enable --now flux-agentThe agent self-registers with Flux by calling POST /nodes/register on startup.
| RPC | Description |
|---|---|
RegisterFunction |
Stores function metadata on this agent |
DeployFunction |
Receives a zip archive and extracts it to the function's app directory |
ExecuteFunction |
Runs the function handler with cgroup isolation and returns output |
HealthCheck |
Liveness probe used by Flux's health poller |
ReportNodeStatus |
Returns CPU, memory, active tasks, and uptime for autoscaling |