How a tenant runs on mycelia

A tenant is a group of people with their own AI agents, apps and git repo, fenced off from every other tenant.

Open the diagram: beep-boop →A tenant with two static games. Tap a box for what it is, filter lines with the chips, drag and pinch to move around.

Gleam · in the browser

A typed language that compiles to JavaScript. The tenant's page is a Lustre app (Elm-style UI) that talks to mycelia over one WebSocket.

Elixir · inside mycelia

  • Runs on the BEAM, a VM built for staying up: millions of tiny isolated processes that share nothing.
  • A GenServer is a process that holds state (Host owns a pod, Agent holds a chat).
  • A Supervisor restarts what crashes: one spore failing never touches another, or another tenant's.

Kubernetes · on the clusters

  • You declare what should exist; controllers keep it so. Each box's tag is its object type.
  • Pod: a running container. Job: a one-off run. Deployment: keep N pods of an image alive.
  • Namespaces fence tenants apart, with quotas, network rules and the gVisor sandbox.

What happens when a member asks an agent to ship

  1. They type on the tenant's page; SporeChannel passes it to the spore's Agent.
  2. The spore's Host starts its pod on the tenant cluster, or finds it still running; the Agent relays the prompt to it.
  3. The agent writes code, git pushes to the tenant's repo, and runs deploy <folder>.
  4. mycelia's Deployer starts an image build Job, then rolls out the app; Traefik serves it at <project>.<tenant>.pinwheel.fan.
  5. If anything crashes along the way, its supervisor (Elixir) or controller (Kubernetes) puts it back.