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

# Environment variable reference

> Index of Harmonia configuration domains and the source files that validate them.

Use `.env.example` as the value-level template and [Configuration](/configuration) for setup instructions. `src/lib/config.ts` validates web and budget configuration; `agent/harmonia_agent/config.py` validates worker settings.

| Domain                      | Purpose                                     | Typical requirement              |
| --------------------------- | ------------------------------------------- | -------------------------------- |
| Cognito and DynamoDB        | Operator sessions and durable tenant data   | Required outside local emulators |
| AWS                         | Account, region, S3, SQS, ECS Fargate       | Required for cloud runtime       |
| Amazon Bedrock / Transcribe | Agent and media model access                | Required for real model calls    |
| Internal service auth       | Web-to-worker and scheduler authentication  | Required in every environment    |
| X                           | OAuth and official API publishing/read-back | Only when X is enabled           |
| Telegram                    | Bot webhook and allow-listed chat           | Only when Telegram is enabled    |
| Google Calendar             | OAuth client and redirect configuration     | Only for explicit calendar sync  |
| Budgets and models          | Catalog, ceilings, approval thresholds      | Required for paid operations     |

Secrets belong in server-side environment injection or Secrets Manager. Never expose them through `NEXT_PUBLIC_*`, documentation, logs, or evidence artifacts.

| Variable                     | Default   | Consumer                         | Purpose                                                                                                                                        |
| ---------------------------- | --------- | -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `SQS_STAGE_QUEUE_URL`        | unset     | Web and worker                   | Job-stage wake transport.                                                                                                                      |
| `SQS_DATA_QUEUE_URL`         | unset     | Data-plane dispatcher and worker | Source normalization work.                                                                                                                     |
| `SQS_PRODUCTION_QUEUE_URL`   | unset     | Production dispatcher and worker | Approved production-operation wakes.                                                                                                           |
| `SQS_CONTROL_QUEUE_URL`      | unset     | EventBridge and worker           | Tick, recovery, resident cycles.                                                                                                               |
| `HARMONIA_TIME_ORIGIN`       | host time | Next.js server                   | Optional ISO-8601 UTC origin for replayable server time.                                                                                       |
| `HARMONIA_TIME_SPEED`        | `1`       | Next.js server                   | Positive multiplier relative to the configured origin.                                                                                         |
| `STRATEGIST_TIMEOUT_SECONDS` | `300`     | Strands worker                   | Ryan's bounded strategy invocation timeout. Other roles accept the corresponding `<ROLE>_TIMEOUT_SECONDS` variable and default to 120 seconds. |

CDK provisions all four queues and their dead-letter queues. Consumers are enabled only in the configured worker environment; native delivery is repeatable and database claims govern idempotency.
