-
Notifications
You must be signed in to change notification settings - Fork 0
Agent.md
Aldwin MOUTARLIER edited this page Oct 20, 2025
·
3 revisions
The Orion agent is a lightweight Node.js daemon responsible for executing workloads on each machine.
- Maintain a persistent WebSocket connection with the control plane.
- Advertise node identity, labels, and capabilities.
- Spawn service processes using Node.js, Bun, or Deno.
- Watch child processes and perform restarts according to policy.
- Report heartbeats (CPU, memory, status) and execution logs.
- Agent connects and sends a
hellopayload. - Scheduler assigns a replica; control plane emits a
launchcommand. - Agent resolves the service definition (path, entry/command, env, ports).
- Child process starts; stdout/stderr are streamed to the agent logger.
- Failures trigger retries with exponential backoff (configurable roadmap).
- On graceful shutdown, agent cleans up child processes before exiting.
-
env: environment variables injected before spawn. -
ports: exposes named ports; future releases will integrate with DNS and service discovery. -
hooks: plugin-driven callbacks to enrich the lifecycle (metrics, alerts, etc.).
- Agents run locally via
scripts/dev.shand connect to the control plane on localhost. - Logs appear in the terminal running the agent and will surface in dashboard/CLI streaming commands.
- Sandboxed execution (Firecracker, containers) for untrusted workloads.
- Resource quotas and cgroup integration on Linux hosts.
- Secure zero-trust channels with mutual TLS.