> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrun.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environments

> Bundle a browser profile and persistent file storage into a reusable container for your automation sessions

An environment is a named container that bundles a **browser profile** (cookies, local storage, extensions, cached credentials), **persistent file storage**, and optional **triggers** for scheduled automation. Pass `environmentId` when starting a session and it loads that browser state and makes those files available — no re-authentication, no re-uploading.

***

## Why Environments Matter

| Without an environment                     | With an environment                                     |
| ------------------------------------------ | ------------------------------------------------------- |
| Every session starts from a blank browser  | Sessions inherit saved login state and site preferences |
| You log in every time                      | Log in once, reuse across all future sessions           |
| Files must be uploaded on every run        | Files persist and are available to any session          |
| No shared state between tasks              | Browser data and files carry over until you delete them |
| Recurring tasks require your own scheduler | Triggers run automatically on a schedule you define     |

***

## What's Inside

### Browser Profile

Stores Chrome data — cookies, local storage, IndexedDB, extensions, cached credentials — and carries it from one session to the next. Log in once and every subsequent session on the same environment skips authentication.

See [Browser Profiles](/environments/profiles) for details on how profiles work, including how to [sync from your local Chrome](/environments/profiles#sync-from-local-chrome).

### File Storage

Files attached to an environment stay until you explicitly delete them. Any session running under that environment can access those files without re-uploading. Useful for reference documents, configuration files, templates, or any asset your automation uses repeatedly.

See [File Uploads](/environments/file-uploads) for persistent and temporary upload modes.

### Triggers

Schedule browser automation tasks that run automatically on a recurring basis under this environment. Each trigger inherits the environment's browser profile and files, so scheduled tasks can access logged-in sessions and stored data without extra setup. Results are delivered via webhook, bot notification, or both.

See [Triggers](/environments/triggers) for schedule types, delivery modes, and the full API reference.

***

## Lifecycle

```
Create → Upload profile data (optional) → Upload files (optional) → Use in sessions → Delete
```

1. **Create** an environment with a name and optional description.
2. **Upload** browser profile data (`.tar.gz`) if you have existing state to restore, or [sync](/environments/profiles#sync-from-local-chrome) from your local Chrome.
3. **Upload** any files sessions need to access.
4. **Use** the environment by passing `environmentId` when starting a session or task. The session loads the profile and has access to all stored files.
5. **Delete** when no longer needed. This removes the profile and all attached files.

***

## Quick Example

Create an environment, then run a task with it:

```bash theme={null}
# Create the environment
curl -X POST https://connect.webrun.ai/environments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-environment"}'

# Use it in a task
curl -X POST https://connect.webrun.ai/start/run-task \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Go to my dashboard and export the monthly report",
    "environmentId": "<ENV_ID>"
  }'
```

***

## Limits

| Resource                    | Limit             |
| --------------------------- | ----------------- |
| Environments per user       | 20                |
| Browser profile upload size | 500 MB            |
| Accepted profile format     | `.tar.gz`, `.tgz` |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Environments API" icon="code" href="/environments/environments-api">
    Create, list, and delete environments; upload profiles and manage files
  </Card>

  <Card title="Triggers" icon="bolt" href="/environments/triggers">
    Schedule recurring browser automation tasks under an environment
  </Card>

  <Card title="Browser Profiles" icon="user-gear" href="/environments/profiles">
    How browser profiles work, sync from local Chrome
  </Card>

  <Card title="File Uploads" icon="file-arrow-up" href="/environments/file-uploads">
    Persistent and temporary file upload modes
  </Card>
</CardGroup>
