> ## 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.

# Configuration

> AWS services, model selection, secrets, and explicit paid-capability gates.

`.env.example` is the complete checked-in configuration inventory. Copy it to a private `.env.local`; never commit credentials. Runtime environment validation lives in `src/lib/config.ts` and `agent/harmonia_agent/config.py`.

## Core services

| Variable                                                                                         | Purpose                                                        |
| ------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
| `AWS_REGION`                                                                                     | Primary AWS region, default `us-east-1`                        |
| `DYNAMODB_TABLE`                                                                                 | Native application records and transaction fences              |
| `S3_BUCKET`                                                                                      | Quarantine, manifests, large documents, and verified artifacts |
| `SQS_STAGE_QUEUE_URL`, `SQS_PRODUCTION_QUEUE_URL`, `SQS_DATA_QUEUE_URL`, `SQS_CONTROL_QUEUE_URL` | Durable worker transports                                      |
| `AGENTCORE_RUNTIME_ARN`                                                                          | Managed Strands cognition runtime                              |
| `AGENTCORE_MEMORY_ID`                                                                            | Workspace/brand-scoped approved memory records                 |
| `AGENTCORE_GATEWAY_URL`                                                                          | Authorized public search gateway                               |
| `BEDROCK_KNOWLEDGE_BASE_ID`, `BEDROCK_DATA_SOURCE_ID`                                            | Authorized private source indexing and retrieval               |
| `WEB_INTERNAL_URL`, `AGENT_SERVICE_URL`, `INTERNAL_API_TOKEN`                                    | Private authenticated service calls                            |
| `COGNITO_USER_POOL_ID`, `COGNITO_CLIENT_ID`, `COGNITO_DOMAIN`                                    | Cognito-backed sign-in                                         |
| `PUBLIC_BASE_URL`                                                                                | Exact HTTPS origin for OAuth and server sessions               |

`AWS_LOCAL_ENDPOINT` and `AWS_S3_LOCAL_ENDPOINT` are explicit loopback test endpoints. They are not cloud deployment settings. Cognito sign-in has no local authentication bypass.

## Models and costs

Intent, presentation, and status use Claude Haiku 4.5. Strategy, analysis, planning, writing, review, and production judgment use Claude Sonnet 4.6. Nova 2 Lite supplies visual observations and Transcribe supplies timed spoken evidence. Role overrides must identify actual available Bedrock model/profile IDs and be recorded in deployment evidence.

`BEDROCK_TEXT_PRICING_JSON` maps each exact configured model ID to numeric `input` and `output` prices in USD per million tokens. Missing prices fail closed. Private source indexing additionally requires `EMBEDDING_INPUT_USD_PER_MILLION` and `EMBEDDING_PRICING_VERSION`; its conservative reservation is not an observed provider bill. Set `TRANSCRIBE_COST_PER_SECOND_USD`, `NOVA_REEL_COST_PER_SECOND_USD`, and `ELEVENLABS_MUSIC_COST_PER_SECOND_USD` only from verified applicable pricing. Paid planner and Dream invocations also require bounded `PRODUCTION_PLANNER_MAX_COST_USD` and `DREAM_MAX_COST_USD` reservations.

`HARMONIA_ALLOW_PAID_AWS=false` is the default. Generated media additionally requires `GENERATIVE_MEDIA_ENABLED` and its provider capability checks. Resident autonomy requires explicit operator enablement and budget authority. Deployment authorization is separately controlled by `HARMONIA_ALLOW_PAID_DEPLOYMENT` in the deployment wrappers.

## Secrets

CDK injects service tokens and the connection-envelope key through Secrets Manager. `HARMONIA_INTEGRATION_SECRETS_JSON` contains supported deployment-wide connector credentials; `HARMONIA_PROVIDER_SETTINGS_JSON` contains the allow-listed nonsecret settings. Bootstrap code validates and expands these before importing application configuration. Neither blob can override the paid AWS gate.

Per-workspace OAuth grants are obtained afresh and encrypted server-side. Retain Google Drive, Calendar, YouTube, external GCS brand-library support, and official social APIs as isolated integrations. Internal assets use S3. Telegram remains allow-listed with webhook validation, replay protection, and nonce-bound decisions through the normal approval service.

## Evidence

Use the [evidence runbook](/evidence-runbook). Verify redacted evidence with:

```bash theme={null}
npm run verify:evidence -- /absolute/private/bundle.json
```

A passing local evidence validator establishes internal consistency only. It does not establish that provider calls or deployment occurred.
