Skip to main content

Overview

An Environment is where AI SRE agents actually execute actions. Every tool call the agent makes, including running commands, reading and writing files, running Skills, and connecting to MCP services, happens inside an Environment. AI SRE provides two types of Environments:

Cloud Sandbox

A Flashduty-managed temporary container that works out of the box with no install. When no self-hosted Runner is online and usable, sessions use the cloud Sandbox.

Self-hosted Runner

A persistent process deployed on your own machine (BYOC, Bring Your Own Compute). It connects out to AI SRE and lets the agent execute inside your network boundary.
If you don’t pick an environment, the system picks one for each new session in this order. First, it uses an online self-hosted Runner of the team bound to the session. If there is none, it uses an online Shared-scope (account-level) Runner. If neither exists, it uses the cloud Sandbox. The choice is fixed when the session’s first message is sent and does not change afterward; see Selecting an environment in a session. You can also pin the session manually from the environment selector in the chat input: force the cloud Sandbox, or pin a specific Runner.
The console record is called an Environment. The process running on your machine is called a Runner. One self-hosted Environment maps to one Runner process; cloud Sandbox instances are managed by the system per session.

Cloud sandbox

The cloud Sandbox is a temporary execution container managed by Flashduty. It is best for quick starts, demos, and investigations that do not need access to your private network. You do not install a process or maintain a machine. Use the cloud Sandbox when:
  • you have not deployed a Runner yet and want to try AI SRE first;
  • the investigation only needs Flashduty data, public services, or public documentation;
  • the task is one-off and lightweight, so it does not justify a persistent machine;
  • you want to force execution into the managed environment instead of using an existing Runner in the account.
The cloud Sandbox cannot reach your VPC, dedicated line, private databases, private APIs, or jump hosts. When an investigation needs direct access to those resources, use a self-hosted Runner and place execution on a machine that can reach the target.
For lifecycle, data location, and egress, see Sandbox.

Cloud environment templates

A cloud environment template is a reusable, predefined configuration for the Flashduty-managed cloud Sandbox: network access, environment variables, and a setup script. If a session’s cloud Sandbox has no template bound, it starts with the system default configuration; once a template is bound, new Sandboxes start with that template’s configuration. Go to AI SRE → Customize → Environments → Cloud to view, create, edit, or delete cloud environment templates.

Create a cloud environment template

Environment variables are visible in plaintext to everyone who uses this cloud environment template — do not put secrets or credentials here.
Platform-reserved environment variable names. The platform injects the following variables; saving a template that sets any of them is rejected: FLASHDUTY_APP_KEY, FLASHDUTY_BASE_URL, FLASHDUTY_DOCS_URL, FLASHDUTY_CONSOLE_URL, PATH, HOME, and the GitHub (GH_TOKEN*, GIT_CONFIG_*) and GitLab (GITLAB_*, GLAB_*) authentication and host variables. FLASHDUTY_CONSOLE_URL is the console address. The agent expands it into clickable links when it cites incidents, alerts, channels, and schedules; when no console address is configured it is not injected, and the agent cites resources by ID in prose instead. It holds no secret, so the agent can read it. Even if a same-named variable is set some other way, the platform’s value is used when commands run (on both the cloud Sandbox and self-hosted Runners). Use template environment variables only for non-sensitive business configuration; for secrets, use MCP member authorization or the relevant App integration. The setup script runs inside a fresh sandbox (Ubuntu 24.04, running as root), before the agent starts — typically used to apt install packages the agent needs.

Delete a cloud environment template

Deleting a cloud environment template does not affect sessions currently using it — bound sessions fall back to the system default configuration and keep working. New Sandboxes created afterward use the system default configuration.
Cloud environment templates configure the cloud Sandbox only. Network access for a self-hosted Runner is governed by your own machine and firewall; see Self-hosted Runner below.

Self-hosted Runner

A self-hosted Runner is a flashduty-runner process that you deploy on your own machine. It keeps a persistent connection to AI SRE. When it receives work, it runs commands, reads and writes files, executes Skills, and connects to MCP services that are reachable from that machine. The value of a self-hosted Runner comes from where execution happens:
The Runner runs on your machine, so it can access whatever that machine can reach: VPCs, intranets, dedicated lines, Kubernetes clusters, cloud-provider CLIs, databases, or jump hosts.
Command output, logs, temporary files, and tool results primarily stay inside your network boundary. The agent can read and analyze them, while the execution surface remains constrained by your OS account, filesystem permissions, and network policy.
You decide which OS user runs the Runner, which directories it can access, and which CLI credentials it has. You also decide whether to load the permission configuration on this page to narrow the command surface.
Network access for a self-hosted Runner is governed by your machine and firewall, so the self-hosted environment form has no network-access setting.

Create and connect

Go to AI SRE → Customize → Environments → Self-hosted and create a self-hosted environment. The form asks for: After creation, the setup guide opens with this Environment’s Token, install command, upgrade command, and uninstall command. The key button on a list row, or the “Setup guide” entry for a pending row, opens the same modal.

Installation methods

The setup guide automatically fills in the real TOKEN and URL. The examples below use placeholders; use the command generated by the console.
Run as root / sudo on the target machine:
The script installs the binary, creates a systemd service, and writes /etc/flashduty-runner/env. The same command works for fresh installs and upgrades; if the latest version is already installed, it skips automatically.
Both connect-url and install_script_url are issued dynamically by the platform rather than being fixed addresses. Private or air-gapped deployments can replace the install-script distribution source with an internal mirror, but the mirror must serve install.sh, releases/latest, and releases/download/<version>/... release assets.

Connect to a private endpoint with a self-signed certificate

By default, Runner verifies the certificate chain and hostname of its control WebSocket. If a private deployment uses a self-signed certificate, prefer adding its CA to the trust store of the Runner host or container. Disable verification only when you cannot install the CA and the endpoint is inside a trusted private network.
Edit /etc/flashduty-runner/env and add the private endpoint and TLS setting:
Restart Runner so it loads the new environment variables:
When enabled, Runner no longer verifies the certificate chain or hostname of the control WebSocket, so an attacker could impersonate the control endpoint. This setting affects only the Runner-to-AI-SRE control WebSocket. It does not change TLS settings for MCP, A2A, or other HTTPS requests made during task execution. Runner logs an explicit warning at startup when verification is disabled.

Linux service user

Linux (systemd) installs run as an auto-created flashduty user by default. That user has no sudo access. The systemd unit enables hardening such as NoNewPrivileges=true, ProtectSystem=strict, and PrivateTmp=true, and only grants write access to the Runner state directory. The Runner might need kubeconfig, cloud CLI credentials, or Docker group access from an existing user. In that case, enter a “Linux service user” in the setup guide, or add RUN_AS manually:
RUN_AS is equivalent to the install script’s --run-as <user> flag. The user must already exist on the system. This makes the systemd service run as that user and relaxes the home-directory protection for that user accordingly.
Only set RUN_AS when the Runner truly needs that user’s local credentials or group membership. Otherwise, prefer the default flashduty user.

Token, upgrades, and uninstall

The Token is the only credential a Runner uses to connect to AI SRE. It is written into the install command or environment variables. View it only when installing, upgrading, or debugging the connection, and do not share it. If you suspect a leak, delete the Environment and create a new one. After the Runner starts, it continuously sends heartbeats. List statuses mean: Degraded appears and clears on its own, with nothing to reset. It appears when the Runner’s tasks pile up or keep timing out, and returns to Online once the backlog clears and tasks complete normally.
When you see Degraded, first check CPU, memory, and disk load on the Runner’s host, and whether a long-running task is monopolizing the executor. It doesn’t block the session, but staying in this state for a while means that host can’t keep up with its current task volume.
When a newer version is available, the Runner downloads, verifies, and replaces itself. Re-running the install command also upgrades manually. Uninstall commands are also in the setup guide, and differ by installation method:
  • Linux (systemd) / manual install: the install script’s --uninstall flag (removes the service while preserving config) and --purge flag (removes config and data).
  • Docker install: uninstall with a container command; the install script’s flags don’t apply. docker rm -f flashduty-runner removes the container and keeps the /var/flashduty/workspace data. docker rm -f flashduty-runner && rm -rf /var/flashduty/workspace removes everything, including the workspace data.

Permission configuration

By default, Runner uses an allow-all rule — the same trust model as running the AI model directly in your own shell:
To narrow which commands the Runner may execute, create a YAML file on the Runner machine. Point the Runner to it with the --permission-config flag or the FLASHDUTY_RUNNER_PERMISSION_CONFIG environment variable. Permission configuration is a local Runner file; it is not edited in the console form. For a Linux (systemd) install, add this to /etc/flashduty-runner/env:
Then restart the service:
For manual mode, pass the flag directly:
Permission configuration loads at Runner startup. Restart the Runner after editing the YAML file.
The rules file’s top-level key is permission, mapping glob patterns to allow/deny:
Rule semantics:
  • Leaving --permission-config / FLASHDUTY_RUNNER_PERMISSION_CONFIG unset is the default and is equivalent to allowing all commands;
  • rules apply everywhere a command can appear: pipelines (cmd1 | cmd2), $(...)/backtick command substitution, process substitution, arithmetic expansion, and write-redirect targets. So the rules gate echo x > /etc/passwd the same way as running a command. Read redirects alone aren’t blocked;
  • commands are matched after shell normalization, so spacing differences do not affect matching;
  • the most specific rule wins: the pattern with the longest literal prefix before its first * is tried first. The catch-all "*" is always tried last, and the first matching rule applies;
  • the file is loaded once, at Runner startup — edit the rules and restart the Runner for changes to take effect; there is no hot reload;
  • the flag/env var might be set while the file is missing, malformed, or has no rules under the permission key. In that case the Runner refuses to start (fails closed) instead of silently allowing every command. Pointing the Runner at a permission config is a deliberate request to restrict it, so a broken config surfaces as an error instead of a silent security gap.
Equivalent to not setting --permission-config at all, but lets you carve out explicit exceptions:
Suitable when the Runner runs in an isolated VM/container with limited blast radius, or when fast incident response matters more than restricting permissions.
Allow only read-only commands — suitable when the Runner should observe but never modify state:

File-system boundary

Permission configuration governs commands; the agent’s file read/write tools follow their own path semantics, matching bash:
  • Relative paths are confined to the workspace root with symlink-escape protection — through a relative path the agent can only read and write files inside the workspace.
  • Absolute paths are passed through to the host filesystem by design, matching bash.
So the permission configuration file doesn’t set the file-access boundary. The boundary is the OS user that runs the Runner, plus deployment isolation: the systemd user and directory protections, or Docker mounts and the container boundary.

Selecting an environment in a session

The environment selector at the bottom of the chat input decides where a new session executes:
A session’s environment is fixed when its first message is sent and does not change if you switch the selector later. To change environments, start a new session.
When you open a past session, the selector shows its environment and status read-only. If the bound Runner is offline or deleted, the session cannot send messages; restore the Runner or start a new session.

A child session’s environment

A dispatched subagent brings its own child session, whose execution-environment rules differ from the root session’s:
  • Shares the parent’s environment by default: the child session uses the same sandbox / workspace as the parent and can see its files.
  • Gets its own environment when dispatched elsewhere: if AI SRE sends the subtask to another self-hosted Runner or the cloud (see Agents), the child session gets its own sandbox or Runner directory. It can’t see the parent’s files.
  • The child session panel shows the environment read-only: you cannot switch environments in a child session.
  • An A2A child session shows no runtime environment: the remote agent executes in its own environment, and the platform does not choose that location.

Scope

Self-hosted Environments use two scopes, Shared and Team, chosen at creation and fixed afterward. For who can see, edit, and create them, see Scope and permissions.
When the system auto-selects a Runner, or a session pins a Runner by ID, it uses only Shared-scope Runners or Runners of the current member’s teams.

Troubleshooting

When troubleshooting Runner issues, start with the Status and Last heartbeat columns in the self-hosted environment list.
Offline means the Runner connected before, but AI SRE has not received a heartbeat for about 90 seconds. Check whether the systemd service or process is running, whether the machine is sleeping or offline, and whether outbound traffic to AI SRE is blocked by a firewall. After process and network recovery, the Runner reconnects automatically; any A2A delegation still in progress then carries on (the Runner retains and replays what it has already produced) rather than failing or rerunning the whole round.
Pending means this Environment has never connected successfully. Confirm that the install command completed, the Token belongs to this Environment, and the URL is reachable from the target machine. If you configured permissions, also confirm that the file exists and the YAML parses.
The private endpoint’s certificate is not trusted by Runner. Prefer adding the CA that issued the certificate to the trust store of the Runner host or container. If the endpoint uses a self-signed certificate inside a trusted private network, you can instead explicitly enable FLASHDUTY_RUNNER_INSECURE_SKIP_TLS_VERIFY as described above. Restart the service for a systemd deployment, recreate the container with the new environment variable for Docker, or restart the process for a manual deployment.
If a session is pinned to an offline Runner, AI SRE does not silently move it to another environment. Restore that Runner, or start a new session and choose Auto or cloud Sandbox. If the Runner is online but the task fails, the likely issue is network or permissions between the Runner and the target resource.
Fastest split: Offline / Pending points to the Runner-to-AI-SRE connection; Online but execution fails points to network, credentials, or permissions between the Runner and the target resource.

Sandbox

Learn the cloud Sandbox lifecycle, data location, and egress.

Console Chat

View the Environment, team, and resources invoked by the agent that are bound to a session.

MCP (External Tools)

MCP connections are established inside the selected environment at agent runtime.

Skills

Skills execute inside the selected Environment.