Skip to main content
An environment is where a simulated customer calls from: a noise bed (an office, a coffee shop, a car), the level it plays at underneath the customer’s voice, and the phone line they are on. Every customer flow variant runs in exactly one environment, so the same conversation can be tested from a quiet line and from a noisy street without changing anything else. Environments are a project-level catalogue, shared across flows, the same way personas are. They work in both authoring modes:
  • In an Improv flow, the happy path and each edge case carry their own Environment chip.
  • In a Scripted flow, every path derived from the graph is a variant with the same chip in the right-hand rail, and Add variant for path runs the same path again in a different environment.

Roark presets

Every project sees one sound preset per noise bed, all on a clear line and playing at the default level. The Environment panel lists them under Sound: Four more presets, listed under Bad lines, pair a place with a degraded phone line: Cell edge, Car on Bluetooth, Spotty Wi-Fi call and Breaking up one way. See Phone network conditions.
The silent preset used to be called Quiet line. Config files that still use the old name resolve to Quiet room.
Presets are read-only. You cannot rename, re-level or delete them, and they keep their level on every deploy. Everything else about an environment, you own.

Noise level

The level is how loud the bed plays relative to the customer’s voice. In the flow editor it is the Level slider, from 0% to 100%, labelled Faint, Under the voice or As loud as the voice as you drag it; over the API it is backgroundNoiseVolume, a gain from 0 to 1.
  • 10% is the default and what every preset plays at. Roark first normalises each noise asset to a fixed loudness, then applies the level, so 10% lands roughly 20 dB under phone speech: clearly audible in the background without competing with the caller.
  • 100% plays the noise as loud as the customer. Use it to find out where your agent’s endpointing and transcription break down, not as a realistic call.
  • The level is a linear gain, not a perceptual scale. 50% is close to speech level, not half as loud as 100%.

Phone line

Beside its sound, an environment sets the phone line the customer is on: Clear by default, or one of Minor loss, Cell edge, Poor, One way or Custom, each dropping a share of the call’s audio in one or both directions. The line only applies to agents reached on a phone endpoint. See Phone network conditions for what each line loses and how to set your own.

Setting the environment in the flow editor

Each variant carries a Persona · Environment · Variables chip strip: under the customer setup in an Improv flow, and on each path’s variant card in the rail of a Scripted flow. The Environment chip opens a panel that lists the Roark presets under Sound and Bad lines and, once you have some, Your environments.
1

Pick an environment

Click a preset. Its settings appear below: the Sound section with the noise bed and its Level, and the Phone line section.
2

Tune it

Change the bed, drag Level, or pick a different line. Presets keep their settings, so a changed preset becomes your own environment: the panel offers Save as with a name filled in for you, such as “Office (30% noise)” or “Office (10% noise, cell edge line)”. Overwrite the name if you want, then click Use for this variant. Roark creates a project environment with those settings and binds the variant to it. The preset itself is untouched. Save as new saves the environment without binding the variant to it.
3

Reuse or adjust it later

Your environments appear under Your environments on every variant in the project. Pick one and the same panel lets you rename it, change its settings or delete it. If you tune a preset to settings you have already saved, the panel offers Use it instead of creating a duplicate.
A flow's happy path with the Environment chip open: the Roark presets with Office selected, and the Noise level slider at the default 10%
A few rules the editor enforces:
  • Edge cases inherit the happy path’s environment until you pick one for them; the chip reads “Office (inherited)”. Choose Inherit to go back to inheriting.
  • A change to one of your environments applies everywhere it is picked. It is a shared row, not a per-variant copy. To give one variant a different level, save a second environment.
  • An environment in use cannot be deleted. Point the variants that use it at another environment first; the panel tells you how many there are.
  • Runs keep what they were built with. Roark snapshots the environment when a run is created, so editing or deleting it later never changes a run already in flight or its report.
Two edge cases with the same persona and brief but different environments are a quick way to compare how your agent copes with the same customer in a quiet room and a noisy one. In the Add edge case menu, From an environment creates one in a single click.

Config as code

In an Improv flow defined as YAML, the happy path and any edge case reference an environment by its display name, exactly as it appears in the panel:
The name has to exist in the project before the config is applied. Presets always do; create your own environments in the editor or over the API first. A Scripted flow in YAML describes the graph only. Its variants are derived from the paths when the config is applied and start on the Quiet room preset, so set their environments in the editor afterwards.

API

Manage environments programmatically to keep them alongside your test suite or to set up a project from a script. Full request and response schemas are in the API reference.
  • List environments: GET /v1/simulation/environment returns your environments and the Roark presets
  • Get an environment: GET /v1/simulation/environment/{environmentId}
  • Create an environment: POST /v1/simulation/environment
  • Update an environment: PUT /v1/simulation/environment/{environmentId}
  • Delete an environment: DELETE /v1/simulation/environment/{environmentId}
Create one with a bed and a level. backgroundNoiseVolume is optional and defaults to 0.1. lineQuality is optional too and defaults to CLEAR; see Phone network conditions for lineQuality and lineCustom:
The response is the environment you can now reference from a customer flow variant’s environmentId:
Updates change only the fields you send:
backgroundNoise accepts NONE, LIBRARY, OFFICE, COFFEE_SHOP, CITY, DRIVING, TRAIN, AIRPORT, CHILDREN_PLAYING, CRYING_BABY, THUNDERSTORM or CONSTRUCTION. Errors to handle: Deleting is a soft delete: the environment disappears from lists and cannot be picked for new runs, but runs already built keep their snapshot of it.