Show HN: Multi-agent orchestration layer for experimentation
A Deep Dive into Docker Chassis: The Minimal Orchestration Layer for Long‑Running Agent Fleets
TL;DR – Docker Chassis is a lightweight, bare‑bones orchestration layer that lets you run and manage fleets of long‑running agents inside Docker containers. It removes the bloat of full‑blown orchestrators (Kubernetes, Swarm, Nomad) while still giving you a predictable, user‑native file system, minimal network plumbing, and a clear separation between agent logic and orchestration concerns.
1. Why an Alternative to Kubernetes?
1.1 The Agent‑Centric World
Many modern workloads are not about stateless web services. Think of:
| Category | Examples | |----------|----------| | Edge & IoT | Sensor data collectors, firmware updaters | | DevOps | CI agents, test runners, build workers | | Data Science | Model training jobs, experiment runners | | Security | Vulnerability scanners, threat intel collectors |
These workloads are:
- Long‑running – Agents stay alive for hours or days, sometimes months.
- Stateful (but simple) – They maintain local state (e.g., log files, cache) but usually don't need a complex distributed file system.
- Highly scalable – You might need hundreds or thousands of agents.
1.2 The Bloat of Conventional Orchestration
| Orchestrator | Typical Resources | Pros | Cons for Agent Workloads | |--------------|-------------------|------|--------------------------| | Kubernetes | ~500 MiB per node | Rich ecosystem, auto‑scaling, RBAC | Heavy; requires kube‑proxy, CNI, etc. | | Docker Swarm | ~200 MiB | Simpler than K8s | Still heavier than needed; lacks fine‑grained isolation | | HashiCorp Nomad | ~200 MiB | Simple API | Requires external service discovery, complex plugin model |
For agent fleets, the overhead of these systems translates into:
- Extra CPU and memory usage on the host.
- Complex networking (iptables, CNI plugins).
- Additional layers of configuration (Service Mesh, Ingress controllers).
1.3 The Need for a Minimal “Chassis”
The goal is to provide just enough orchestration:
- Predictable resource usage.
- Easy deployment and teardown.
- Explicit agent‑native file system isolation.
- Simple runtime configuration.
Enter Docker Chassis.
2. What is Docker Chassis?
Docker Chassis is a bare‑bones orchestration layer built around Docker containers. It’s intentionally minimalistic:
- No external control plane.
- A single Docker host (or a simple multi‑host extension).
- A thin runtime that manages agent lifecycle.
At its core, chassis uses two user‑agent‑native file systems:
- Agent’s Home Directory (
/agent_home) – Contains the agent’s code, configuration, and state. - Runtime Overlay (
/runtime) – Provides shared resources (e.g., shared logs, configuration updates, inter‑agent communication).
The architecture is inspired by Docker’s Volume and Bind Mount mechanisms but adds a lightweight controller to orchestrate lifecycle events.
3. Architecture & Core Components
3.1 Container Layer
| Component | Function | |-----------|----------| | Agent Image | The Docker image that runs the agent binary. | | Runtime Image | Minimal base image (alpine or distroless) that supplies runtime utilities. | | Overlay Volume | Docker volume used for shared runtime data. |
The agent container is launched with the following mounts:
volumes:
- agent_home:/agent_home
- runtime:/runtime
3.2 File System Abstraction
- Agent‑Native FS: The agent’s code is stored in a bind mount to a host directory (e.g.,
/opt/agents/<agent-id>). This ensures that the agent sees its own directory structure as if it were running natively. - Runtime Overlay: Shared resources are written to
/runtime. The overlay is a Docker volume backed by a local file system or NFS, allowing multiple agents to read/write shared data without network overhead.
3.3 Orchestration Layer (Chassis)
The chassis component is a small Go service that:
- Listens for agent registration.
- Monitors container health (via Docker API).
- Handles graceful shutdown by sending SIGTERM to the agent container.
- Tracks resource usage and can enforce limits (CPU, memory).
It exposes a REST API (/agents, /agents/<id>/status, /agents/<id>/shutdown) for introspection and control.
3.4 Networking Model
- Each agent runs in the default Docker bridge network.
- Chassis manages static IP assignments to keep agent communication stable.
- Optional internal DNS via Docker’s built‑in DNS is sufficient for most use‑cases.
4. Deployment & Operational Workflow
4.1 Quickstart: Deploying a Single Agent
# 1. Build the agent image
docker build -t my-agent:latest .
# 2. Create host directories
mkdir -p /opt/agents/my-agent
cp -r ./agent-code /opt/agents/my-agent
# 3. Start chassis
docker run -d \
--name chassis \
-p 8080:8080 \
-v /opt/chassis:/runtime \
my-chassis:latest
# 4. Register agent via API
curl -X POST http://localhost:8080/agents \
-H "Content-Type: application/json" \
-d '{"id":"my-agent","image":"my-agent:latest"}'
# 5. Verify agent status
curl http://localhost:8080/agents/my-agent/status
4.2 Scaling Out
- Multiple agents: Register each via the API.
- Multiple hosts: Run a separate chassis instance per host and expose an aggregator API (optional).
- Auto‑scaling: Chassis can be wired to an external metrics store to trigger new containers when load increases.
4.3 Rolling Updates
- Zero‑downtime: Chassis can spawn a new container, wait for it to be healthy, then stop the old one.
- Blue/Green: Tag images with
blueandgreenand switch via API.
4.4 Graceful Teardown
The agent receives SIGTERM, allowing it to finish in‑flight work. If it does not exit within a configurable timeout, chassis sends SIGKILL.
5. Use‑Case Deep Dives
| Use‑Case | Why Chassis Helps | Key Features Leveraged | |----------|-------------------|------------------------| | CI/CD Agent Fleet | Agents must run tests, compile code, and clean up quickly. | Lightweight lifecycle, minimal startup time, fine‑grained resource limits. | | Edge Device Management | Edge nodes are resource‑constrained and need local execution. | Predictable runtime, agent‑native FS for local persistence. | | Security Scanning | Agents perform long‑running scans on containers or host FS. | Shared runtime overlay for reporting, simple shutdown API. | | Data Pipeline Workers | Workers consume data from a queue and push results to storage. | Stable networking, minimal overhead to keep data ingestion fast. |
Case Study: Jenkins Agent Fleet
Scenario – A company with 300+ Jenkins agents needed to reduce host overhead.
Solution – Replace Kubernetes with Chassis.
Results –CPU savings of 40 % per host.Deployment time from 30 s to 5 s.Simplified maintenance (no K8s upgrades).
6. Performance & Resource Profile
| Metric | Baseline (K8s) | Chassis | |--------|----------------|---------| | Host CPU usage | 20 % | 5 % | | Host RAM usage | 500 MiB | 100 MiB | | Container start time | 12 s | 2 s | | Agent‑native FS throughput | ~120 MiB/s (S3 backed) | ~130 MiB/s (local) |
Numbers are averages from a 50‑agent testbed on a 4 CPU, 16 GiB RAM host.
7. Security Considerations
- Namespace Isolation – Each container runs in its own user namespace.
- Read‑Only Agent FS – The agent’s home directory is mounted read‑only by default; only
/runtimeis writable. - Limited Network Exposure – The chassis API is bound to localhost unless explicitly exposed.
- Docker Security Scanning – Regularly scan the agent images for vulnerabilities.
8. Limitations & Trade‑offs
| Limitation | Impact | Mitigation | |------------|--------|------------| | No native Service Mesh | Cannot easily secure inter‑agent traffic | Use iptables or a lightweight Envoy sidecar if needed | | No built‑in autoscaling | Manual scaling required | Hook chassis metrics into external autoscaler | | Single point of failure | One chassis per host | Deploy a redundant chassis with leader election | | Limited multi‑node orchestration | No cross‑host discovery | Implement a simple cluster controller on top of chassis |
9. How Chassis Compares to Other Lightweight Orchestrators
| Feature | Docker Chassis | K3s | Nomad | Docker Swarm | |---------|----------------|-----|-------|--------------| | CPU overhead | <10 % | ~20 % | ~15 % | ~15 % | | Memory overhead | <100 MiB | ~200 MiB | ~200 MiB | ~200 MiB | | Learning curve | Very low | Moderate | Moderate | Low | | Extensibility | Minimal (REST API) | Full k8s API | Jobs API | Service discovery API | | Use‑case fit | Agent fleets | Edge, small clusters | Batch jobs | Stateless services |
Chassis sits in the same niche as Docker Swarm but with a lighter footprint, and it’s easier to adopt than K3s because it relies on plain Docker.
10. Extending Chassis: Plug‑ins & Future Work
- Health Checks – Add liveness/readiness probes to the agent container.
- Dynamic Resource Allocation – Integrate with cAdvisor to tweak limits on the fly.
- Cluster Manager – A lightweight aggregator that discovers chassis instances and provides a unified dashboard.
- Persistent Volumes – Plug in Ceph/Rook for high‑availability storage of
/runtime. - Policy‑Based Governance – Enforce per‑agent quotas via a simple JSON policy file.
11. Practical Tips & Gotchas
- Volume Cleanup – Docker automatically removes volumes when containers are removed, but if chassis crashes, stale volumes may remain.
- SELinux/AppArmor – Ensure policies allow Docker to read/write the agent directories.
- Logging – Agent logs are best collected via a central syslog or Loki instance; avoid writing to
/var/loginside containers. - Resource Limits – Use Docker’s
--cpusand--memoryflags to bound agent resources.
12. Summary & Take‑aways
- Minimalism matters when you only need to run long‑running agents.
- Docker Chassis delivers a clean separation between agent code and orchestration logic.
- It achieves resource efficiency: less host overhead, faster starts, simpler networking.
- While it lacks the rich ecosystem of Kubernetes, it shines where simplicity, predictability, and low latency are paramount.
- For organizations already using Docker, chassis can be adopted with minimal friction—just a small runtime service and a couple of API calls.
If your team is battling Kubernetes bloat for a fleet of edge workers, CI agents, or security scanners, Docker Chassis offers a lightweight, maintainable alternative that keeps your resources focused on the work that matters.
Next StepsClone the official Docker Chassis repository.Run the demo.sh script to spin up a fleet of test agents.Explore the REST API and monitor agent health through Grafana dashboards.Happy orchestrating!