Skip to main content

Workspace Lifecycle Management

Workspace lifecycle management in Aileron is not only about provisioning containers. It is the mechanism that lets enterprises provide standardized, ready-to-use agent environments to users without requiring manual local setup.

Lifecycle States

┌──────────┐
│ creating │ ← POST /workspaces
└────┬─────┘

┌────▼─────┐
│ running │ ← Container/Pod ready
└────┬─────┘

┌─────────┼─────────┐
│ │ │
┌────▼──┐ ┌───▼──────┐ ┌──▼──────┐
│stopped│ │restarting│ │deleting │
└───────┘ └──────────┘ └─────────┘

Supported Provisioners

ProvisionerDescription
dockerCreate containers using Docker (default for local dev)
kubernetesCreate Pods and related resources using Kubernetes

Each workspace chooses its provisioner at creation time, depending on whether the organization is optimizing for local setup or production infrastructure.

Creating a Workspace

Use the frontend UI or call the API directly:

curl -X POST http://localhost:3001/api/v1/workspaces \
-H "Content-Type: application/json" \
-d '{
"name": "my-workspace",
"provisioner": "docker"
}'

Container Composition

Each workspace includes the following containers/services:

ServiceDescription
workspace-runtimeMain execution environment (FastAPI + Claude Code)
workspace-terminalIn-browser terminal
workspace-chromeHeadless Chrome (browser preview)
workspace-canvas (optional)Canvas renderer

Firewall Configuration

Each workspace can configure:

SettingDescription
workspace_firewall_network_access_enabledEnable workspace network access
workspace_firewall_domain_access_modeDomain access mode (allowlist / deny)
workspace_firewall_allowed_domainsList of domains the workspace may reach
browser_firewall_network_access_enabledEnable browser network access
browser_firewall_domain_access_modeBrowser domain access mode
browser_firewall_allowed_domainsList of domains the browser may reach
note

In Kubernetes mode, firewall policies are implemented via Cilium NetworkPolicy. The system's default allowedDomains are merged with workspace-specific settings during the reconcile phase to produce the final effective policy.

Lifecycle Operations

Stop Workspace

Stops the workspace container; data is preserved.

Start (Restart) Workspace

Starts a previously stopped workspace.

Delete Workspace

Deletes the workspace and all associated resources. Docker and Kubernetes modes expose a consistent operation from the frontend UI.

Restart Individual Services

The following services can be restarted individually:

  • runtime
  • browser
  • canvas

Kubernetes Workspace Resources

In Kubernetes mode, the workspace-operator reconciles the following resources for each workspace:

  • Runtime Pod / Deployment
  • Browser Pod / Deployment
  • Canvas Pod / Deployment (optional)
  • Services
  • PersistentVolumeClaim (PVC)
  • Cilium NetworkPolicy (firewall)
  • Workspace Custom Resource (CR)