# Environment variables & sizing

How agents are configured: encrypted env vars and secrets, how changes reach a running agent, and how resources are sized. Creation options live in the [quickstart](/content/docs/quickstart/index.html) and the [CLI reference](/content/docs/cli#maritime-create/index.html).

## Environment variables

Managed from the agent's **Settings** tab in the [dashboard](/content/dashboard/index.html) or from the CLI. Variables are **secret by default**: stored encrypted at rest, injected only into that agent's VM, and always masked in the UI. Uncheck Secret (or pass `--no-secret`) for plain config values you want readable.

```bash
# Set one or more (secret + encrypted by default)
maritime env set my-agent OPENAI_API_KEY=sk-... ANOTHER=value

# Plain, non-secret config
maritime env set my-agent LOG_LEVEL=debug --no-secret

# Bulk import from a .env file (or stdin), then hot-reload
maritime env import my-agent ./prod.env --reload

# List (secret values stay masked) / pull to a local .env / remove
maritime env list my-agent
maritime env pull my-agent .env
maritime env remove my-agent LOG_LEVEL
```

*Recording: Sets STRIPE_API_KEY as an encrypted secret and LOG_LEVEL as plain text, lists both (the secret stays masked), pulls them into a local .env file, then removes the secret.*

### When changes take effect

Env changes apply on the agent's next boot unless you push them into the running container with `--reload` (or `maritime env reload my-agent`). Config saved while an agent is asleep is applied on the next wake.

### Programmatic access

Reading and writing env vars from code needs an API key with the `secrets` scope: see the [SDK](/content/docs/sdk/agents#secrets/index.html) or `maritime env` in the [CLI](/content/docs/cli/index.html).

## Triggers

Cron schedules, webhooks, and channel triggers wake sleeping agents automatically and have their own page: [Triggers & schedules](/content/docs/triggers/index.html). List an agent's triggers from the terminal with `maritime triggers list <agent>`.

## Resource sizing

Every agent starts with the same base allocation: **2 GB RAM, 5 GB SSD**, auto-sleep when idle. Agents that need more can be sized up to 8 GB RAM and 100 GB SSD at creation or later from the agent's settings. A bigger machine costs $1 a month per 2 GB of memory, awake or asleep, and disk past 5 GB costs $0.08 per GB-month (see [Billing & plans](/content/docs/billing#rates/index.html)). Templates with special needs are sized up by the platform on their own. Create and resize both return 400 outside 512 MB to 8 GB RAM or 1 to 100 GB SSD.

For hand-tuning a single agent, the CLI supports per-agent overrides:

```
maritime create acme-bot --ram 2048 --cpu 1.5 --idle 600 --disk 20
```

`--ram` (MB), `--cpu` (vCPUs), `--idle` (seconds before auto-sleep), `--disk` (GB); the full table is in the [CLI reference](/content/docs/cli#maritime-create/index.html).
