Skip to content

Agent Workspaces 🟑 BETA

An agent workspace is a per-user Incus VM managed by botagent, with one folder per conversation and a sandboxed execution service.

Developer guide map

Architectural Overview

botagent owns agent_sessions, agent_conversation_folders, org_api_keys and sandbox_runs. All Incus calls go through SafeCommand; the crate's API handles sessions, files, VM status and sandbox execution.

Component Responsibility
api/sessions.rs Current session and agent mode
api/vm.rs VM status, conversation switch and execution
api/files.rs Files inside the VM
api/sandbox.rs Sandboxed code execution
runtime_state.rs Why an agent backend is unavailable

The Agent UI

The UI opens a socket only after authentication has resolved, then reads the agent mode and VM status from the agent API. It shows the reason returned by agent_backend_unavailable rather than a generic failure.

Incus Sandbox execution

Workspace images are described by profiles: base, office (the default, with document libraries and a headless browser), media and data (opt-in). The office image is built with scripts/build_vm_image.sh --profile office so a cold container needs no package download.

Verified runtime (AI OS, Chapter 13)

The runtime state exposed at /api/product uses the stable code agent_runtime_state plus agent_backend_unavailable when the backend cannot run. Conflict gates are applied in chat. See Chapter 13: AI OS and Agent mode.

Limits

  • No VM is created without a resolved user and a configured Incus executable (AGENT_INCUS_BIN).
  • Snapshot counts and idle timeouts are service settings, not values documented here.
  • A failed safety check blocks execution; the VM is not a bypass of consent.

See Also