No API keys. Deterministic pipeline for dev and CI.
LLM_MODE=mock
Live AI
Claude extraction
Real multimodal extraction and matching reasoning.
LLM_MODE=live + ANTHROPIC_API_KEY
Observability
LangSmith traces
Agent pipeline visibility for demo and debugging.
LANGSMITH_API_KEY + LANGSMITH_TRACING=true
Environment files
File
Used by
Purpose
backend/.env
Local Python, hybrid dev
Full backend configuration (overrides repo root)
backend/.env.example
Template
Copy to .env — safe to commit
frontend-novapay/.env
NovaPay Vite dev
Port 5173
frontend-admin/.env
Admin app Vite dev
Port 5174
frontend-tenant-mgmt/.env
Mgmt app Vite dev
Port 5175
.env (repo root)
Docker Compose; hybrid backend
Compose substitution for all backend services + VITE_API_KEY NovaPay build arg
Never commit .env files containing secrets. They are listed in .gitignore.
Quick reference — all variables
Copy backend/.env.example to backend/.env and fill in values as needed.
LLM
Variable
Default
Description
ANTHROPIC_API_KEY
(empty)
Anthropic API key — required when LLM_MODE=live
LLM_MODE
mock
mock = deterministic in-process responses; live = real Claude calls
SONNET_MODEL
claude-sonnet-4-6
Model for ingestion (PDF), matching, report, bank statement (PDF)
HAIKU_MODEL
claude-haiku-4-5-20251001
Model for ingestion (Excel/CSV), bank statement (text/CSV)
OPUS_MODEL
claude-opus-4-7
Model for ingestion (images/scans — vision)
INGESTION_CONCURRENCY
3
Max parallel proof-extraction LLM calls (ThreadPoolExecutor)
INGESTION_MAX_RETRIES
3
Legacy per-document retry count; live mode uses LLM_MAX_RETRIES in LLMService
MATCHING_CONCURRENCY
3
Max parallel match-reasoning LLM calls (same executor pattern as ingestion)
LLM_MAX_RETRIES
5
Retries on Anthropic HTTP 429 across all pipeline LLM calls
LLM_RETRY_BASE_SECONDS
2.0
Initial backoff base for rate-limit retries
LLM_RETRY_TPM_BASE_SECONDS
30.0
Longer backoff from the third retry onward (output TPM windows)
Rate limits: Anthropic enforces per-model output TPM (e.g. 8,000 output tokens/minute on Sonnet for lower tiers). If jobs fail at the report stage after a large matching burst, lower INGESTION_CONCURRENCY and MATCHING_CONCURRENCY (try 2), or raise your org tier. After retries are exhausted on the report call only, ARIA falls back to a deterministic summary narrative so the job can still complete.
Observability (LangSmith)
Variable
Default
Description
LANGSMITH_API_KEY
(empty)
LangSmith API key for agent tracing
LANGSMITH_PROJECT
aria
Project name in LangSmith UI
LANGSMITH_TRACING
false
Set true to enable trace export (backend/.env.example recommends true for demos)
LANGSMITH_ENDPOINT
https://api.smith.langchain.com
LangSmith API base URL (EU/self-hosted overrides)
Database
Variable
Default
Description
DATABASE_URL
sqlite+aiosqlite:///./aria.db
Async SQLAlchemy URL
Examples:
# Docker / local PostgresDATABASE_URL=postgresql+asyncpg://aria:aria@localhost:5432/aria
# Zero-infra SQLiteDATABASE_URL=sqlite+aiosqlite:///./aria.db
Redis / Celery
Variable
Default
Description
REDIS_URL
redis://localhost:6379/0
General Redis connection
CELERY_BROKER_URL
redis://localhost:6379/1
Celery message broker
CELERY_RESULT_BACKEND
redis://localhost:6379/2
Celery result store
CELERY_TASK_ALWAYS_EAGER
(unset)
Set 1 to run tasks inline (tests)
Object storage (S3 / MinIO)
Variable
Default
Description
S3_ENDPOINT
http://localhost:9000
S3-compatible endpoint
S3_ACCESS_KEY
ariaadmin
Access key (matches Docker MinIO)
S3_SECRET_KEY
ariaadmin
Secret key
S3_BUCKET
aria-documents
Bucket name (auto-created on first upload)
S3_REGION
us-east-1
AWS region (required by boto3)
S3_PRESIGN_TTL_SECONDS
900
Presigned URL expiry (15 min)
S3_SERVER_SIDE_ENCRYPTION
(unset)
Set AES256 on AWS S3; leave unset for Docker MinIO
The root .env file is read by Docker Compose for ${VAR} substitution. All backend services (api, worker, beat) share a common environment block defined in docker-compose.yml (x-backend-environment), including:
The api service additionally receives DEFAULT_ADMIN_EMAIL, DEFAULT_ADMIN_PASSWORD, and CORS_ORIGINS. Docker-internal URLs (DATABASE_URL, REDIS_URL, S3_ENDPOINT, etc.) are fixed in compose for container networking.
NovaPay:VITE_API_KEY from root .env is passed as a Docker build arg to frontend-novapay. Rebuild that service after creating a tenant API key:
docker compose up --build frontend-novapay
Copy .env.example → .env at the repo root to get started. For hybrid development, put the full configuration in backend/.env and run the API/worker locally.
Confidence thresholds (hard requirements)
These values drive routing logic and should not be lowered in production without review:
Level
Threshold
Action
Field flag
< 0.70
Flagged in ingestion prompts when field confidence is low
Extraction escalation
< 0.50 (record avg)
Skip normalisation and matching; report still generated
Match uncertain
0.50 – 0.74
Review queue; never auto-confirm
Match confident
≥ 0.75
Auto-match allowed
Match failed
< 0.50 (all candidates)
Exception report
See Architecture for how these map to agent routing.