Overview
Weavers are ephemeral Kubernetes pods that provide isolated execution environments for Loom agents. Each weaver runs a containerized instance of the Loom CLI with network isolation, resource limits, and audit logging.Loom uses k3s (lightweight Kubernetes) for weaver provisioning. The server communicates with the k3s API to create, manage, and cleanup weaver pods.
Architecture
k3s Installation
Loom uses k3s for Kubernetes. The NixOS module handles installation and configuration.NixOS Configuration
configuration.nix
Namespace Setup
The k3s module automatically creates theloom-weavers namespace:
Image Pull Secrets
For private container registries (e.g., GitHub Container Registry):1
Generate a GitHub Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens
- Create a token with
read:packagesscope - Save the token to a file:
/run/secrets/github-token
2
Enable ghcr.io secret in NixOS
configuration.nix
3
Verify the secret exists
Weaver Configuration
Configure the weaver provisioner in loom-server:configuration.nix
Environment Variables
Alternatively, configure via environment variables:Weaver Images
Weavers run container images with the Loom CLI pre-installed.Building a Weaver Image
Use the provided Dockerfile:docker/Dockerfile.weaver
Building with Nix
Pushing to Registry
Managing Weavers
CLI Commands
Kubernetes Commands
Troubleshooting
ErrImagePull - Image not found
ErrImagePull - Image not found
The container image doesn’t exist or is private.Check:
- Verify image exists:
docker pull ghcr.io/your-org/weaver:latest - Check image pull secret:
kubectl get secret ghcr-secret -n loom-weavers - Verify secret is configured in weaver settings
Pod immediately exits (Succeeded status)
Pod immediately exits (Succeeded status)
The container has no long-running entrypoint.Weaver images must run a persistent process. The default entrypoint script keeps the container alive:Verify your entrypoint doesn’t exit immediately.
weaver-entrypoint.sh
Namespace not found
Namespace not found
The Or wait for the NixOS service to create it (runs after k3s starts).
loom-weavers namespace doesn’t exist.Create it:Permission denied accessing kubeconfig
Permission denied accessing kubeconfig
The loom-server user needs read access to The NixOS module handles this automatically via the
/etc/rancher/k3s/k3s.yaml.Fix permissions:loom-k3s group.Audit Sidecar
Weavers include an optional eBPF audit sidecar for monitoring system calls, network activity, and file access.Configuration
configuration.nix
Viewing Audit Logs
Resource Limits
Set resource limits on weaver pods:Next Steps
Server Configuration
Complete environment variable reference
Database Migrations
Manage SQLite schema changes