Ren

Machines

environments.yaml declares your organization’s machines, and each space’s space.yaml picks the ones it runs on. The CLI and its messages call a machine an environment template.

Declare a machine

The key is the machine’s name. Under it, say which provider runs the machine and how to configure it:

environments.yaml
Node build:
  description: Node 22 with the GitHub CLI.
  provider: e2b
  config:
    cpuCount: 4
    memoryMiB: 4096
    packages:
      apt: [gh]
      npm: [pnpm]
    buildCommands:
      - corepack enable
FieldDefaultWhat it sets
providerRequiredWhere the machine runs
configRequiredThe provider’s settings, such as size, packages and build commands
sessionsPerEnvironment8How many chats run on one machine before Ren starts another, from 1 to 100
networkingunrestrictedThe hosts the machine can reach. See Network access.

Provider config

Each provider has its own config. To see the providers you can use and the config each one takes, run:

ren environment provider list

The examples on this page use e2b.

Network access

A machine can reach any host unless you limit it. A limited machine needs all three of these fields:

environments.yaml
Node build:
  provider: e2b
  config:
    cpuCount: 2
    memoryMiB: 2048
    packages: {}
    buildCommands: []
  networking:
    type: limited
    allowPackageManagers: true
    allowMcpServers: true
    allowedHosts:
      - github.com
      - "*.githubusercontent.com"
FieldAllows
allowPackageManagersnpm, PyPI, the Debian and Ubuntu mirrors and the Go module proxy
allowMcpServersThe MCP servers of the space’s apps
allowedHostsHost names such as api.example.com, or *.example.com for subdomains

A limited machine can always reach the hosts that the space’s secrets are for.

Assign machines to a space

A space has a brain, which runs the agent, and a hand, which runs its file and shell tools. Most often you want the machine you declared for the hand, so the tools find the packages you installed on it. Make the hand remote and name the machine:

spaces/engineering/space.yaml
name: Engineering
hand:
  placement: remote
  environment: Node build

To run the brain on it too, name the machine and its provider. ren environment provider brains lists the providers that can run brains.

spaces/engineering/space.yaml
name: Engineering
brain:
  provider: e2b
  environment: Node build

Spaces → Runtime covers the other runtime keys, and when a change takes effect.

Builds

A provider such as e2b has to build an image for each new machine, and again whenever its config changes. A space can’t move to a machine until its first build is ready, so adding one takes two applies:

  1. Add the machine to environments.yaml and run ren infra apply. Leave space.yaml unchanged.
  2. Run ren environment template list until the machine’s buildStatus is ready.
  3. Name the machine in space.yaml and run ren infra apply again.

If a build fails, ren environment template get shows its log in buildError. Fix the config and apply again.

Remove a machine

Deleting a machine from environments.yaml archives it, along with its running machines and their files. Move every space off it first. To see which spaces still use it:

ren environment template affected-spaces tpl_01JX4M2T9V8K3N6P5Q7R2S4W1Y