Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
1574 lines (1506 loc) · 95.9 KB
/
Copy path.env.example
File metadata and controls
1574 lines (1506 loc) · 95.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# =============================================================================
# AgentSwarms configuration
# =============================================================================
# Three tiers, in order:
#
# 1. REQUIRED — the app will not run correctly without these.
# 2. RECOMMENDED — it runs, but a core capability is missing or degraded.
# 3. OPTIONAL — everything else. Sensible defaults; skip the lot.
#
# Only section 1 is needed for a first run. Full walkthrough: docs/INSTALL.md
# Every row/timeout/concurrency cap and what it bounds: docs/SCALE_AND_LIMITS.md
# =============================================================================
#
# Every service ships with every install — there are no compose profiles — and
# the values below already point at them (qdrant, valkey, lakehouse-catalog,
# minio, spark-connect). Replace any of them with a managed equivalent; leave
# them as they are for the bundled ones.
# `scripts/setup.sh --dev` rewrites them to 127.0.0.1 for an app run on the host.
# =============================================================================
# 1. REQUIRED
# =============================================================================
# ── Supabase: your database, auth and file storage ───────────────────────────
# Supabase Cloud: Project → Settings → API.
# Self-hosted Supabase (full data residency / air-gap): see
# docs/DEPLOYMENT.md § "Self-hosted Supabase".
#
# NOTE: the Supabase *Project ID* is deliberately NOT here. Nothing at runtime
# reads it — the CLI takes it as a flag: `supabase link --project-ref <id>`.
SUPABASE_URL=""
SUPABASE_PUBLISHABLE_KEY=""
SUPABASE_SERVICE_ROLE_KEY=""
# The same URL and PUBLISHABLE key again, VITE_-prefixed. Vite only inlines
# vars starting with VITE_ into the browser bundle, and the two halves of the
# app (server routes/functions vs. the React client) each need their own copy.
#
# NEVER put the service-role key behind a VITE_ prefix — that ships a
# database-bypassing secret to every visitor's browser.
VITE_SUPABASE_URL=""
VITE_SUPABASE_PUBLISHABLE_KEY=""
# One image, any environment: every browser setting (VITE_*) also has a
# PUBLIC_ name that the server reads when it STARTS and hands to the page, so
# changing it takes a restart, not a rebuild. Per setting, PUBLIC_ wins, then
# VITE_ in the server's environment, then VITE_ baked in at build (only
# `npm run build` on the host bakes any: the Docker image is built with none,
# R469). Leave the PUBLIC_ names empty and nothing changes: Compose hands this
# file to the running server. A value that fails its check is ignored, with a
# warning naming it; a service-role or sb_secret_ key is always refused, and
# the build stops if VITE_SUPABASE_PUBLISHABLE_KEY is one.
# Details: docs/DEPLOYMENT.md § "Browser settings at runtime".
PUBLIC_SUPABASE_URL=""
PUBLIC_SUPABASE_PUBLISHABLE_KEY=""
# ── Which release ────────────────────────────────────────────────────────────
# Empty: Compose builds every image from this checkout (`docker compose up -d
# --build`). A version (1.7.0): Compose runs that release's published, signed
# images instead; `docker compose pull && docker compose up -d --no-build`.
# To go back, set the previous version and run the same two commands. Never
# pass --build with a version set: it would build this checkout under the
# release's name. docs/DEPLOYMENT.md, "Upgrades".
AGENTSWARMS_VERSION=""
# Where those images come from; your mirror's path for an air-gapped install.
AGENTSWARMS_REGISTRY="" # default ghcr.io/agentswarms-fyi
# Supabase Realtime: live updates for the approvals inbox. Hosted and
# self-hosted Supabase run it; leave this empty. On a plain PostgreSQL such as
# Amazon RDS it cannot run (it needs a true superuser), so set "off" there and
# the inbox checks every 15 seconds instead. With it on, the inbox also falls
# back to checking when its connection fails.
VITE_SUPABASE_REALTIME="" # on
PUBLIC_SUPABASE_REALTIME="" # the same, read at runtime (wins when set)
# ── Operator account ─────────────────────────────────────────────────────────
# The email allowed into the instance admin dashboard. BOTH must be set and
# they must MATCH — the server enforces access, the client decides what to
# render. Use the address you will sign up with.
ADMIN_EMAIL=""
VITE_ADMIN_EMAIL=""
PUBLIC_ADMIN_EMAIL="" # runtime alternative to VITE_ADMIN_EMAIL (wins when set)
# ── Encryption key for stored credentials ────────────────────────────────────
# Encrypts every credential at rest: LLM provider and gateway keys, n8n tokens,
# MCP bearer tokens, warehouse connections, Secrets Manager, Data Catalog
# bucket keys. Generate once:
#
# openssl rand -hex 32
#
# Required before anyone connects a provider or a warehouse. Rotating it does
# not re-encrypt anything — saved credentials become unreadable and must be
# re-entered. Back it up separately from your database: a database backup
# without this key cannot restore credentials.
PROVIDER_CREDS_SECRET=""
# Previous credential keys, comma-separated, accepted for DECRYPTION only.
# Set this while rotating: move the outgoing secret here, put the new one in
# PROVIDER_CREDS_SECRET, restart, then run Admin -> IAM -> Settings ->
# "Re-encrypt to current key". Remove this once nothing is left on the old key.
# See SECURITY.md#rotating-the-credential-key.
PROVIDER_CREDS_SECRET_OLD=""
# External key provider (envelope encryption). Leave KMS_PROVIDER unset (env)
# and credentials are encrypted under PROVIDER_CREDS_SECRET as above. With
# "vault", a random data key is wrapped by a Vault Transit key that never
# leaves Vault, unwrapped once per process start; the app holds a permission
# to decrypt, not the key. Set the VAULT_* lines, restart, create the data key
# on Admin -> IAM -> Settings -> Credential encryption key, THEN set the
# provider to "vault" and restart; the existing re-encrypt sweep moves the
# rows. A process that cannot unwrap the data key refuses to start.
# "aws" is the same with an AWS KMS key; the app signs as its own role (IRSA,
# ECS task role, EKS Pod Identity, instance profile) or the AWS_* keys.
# "azure" is the same with an Azure Key Vault or Managed HSM key; the app
# signs in as its own managed or workload identity, or the AZURE_* variables.
# "gcp" is the same with a Cloud KMS key; the app signs in as its service
# account on the metadata server, or through GOOGLE_APPLICATION_CREDENTIALS.
# "oci" is the same with an OCI Vault key; the app signs as its instance or
# resource principal, or with an API key from an OCI config file.
KMS_PROVIDER="" # env (default) | vault | aws | azure | gcp | oci
KMS_KEY_REF="" # vault: transit/keys/<name>; aws: arn:aws:kms:<region>:<account>:key/<id>; azure: https://<vault>.vault.azure.net/keys/<name>; gcp: projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>; oci: ocid1.key.oc1.<region>.<vault>.<id>
VAULT_ADDR="" # e.g. https://vault.internal:8200
VAULT_TOKEN="" # or VAULT_TOKEN_FILE (a mounted secret), or VAULT_K8S_ROLE
VAULT_TOKEN_FILE=""
VAULT_K8S_ROLE="" # Kubernetes auth: the Vault role bound to this pod's service account
VAULT_K8S_MOUNT="" # kubernetes — the auth method's mount path
VAULT_K8S_JWT_FILE="" # the service-account token sent to Vault; default /var/run/secrets/kubernetes.io/serviceaccount/token
VAULT_NAMESPACE="" # Vault Enterprise namespaces only
# AWS KMS (KMS_KEY_REF above). The identity: nothing to set under a role;
# outside AWS, AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY. The full list,
# and the key policy to give the role, in docs/KEY_MANAGEMENT.md#aws-kms.
AWS_REGION="" # only when KMS_KEY_REF is an alias or key id, not an ARN
AWS_USE_FIPS_ENDPOINT="" # true: kms-fips.<region>.amazonaws.com
AWS_ENDPOINT_URL_KMS="" # a KMS VPC endpoint's DNS name, or an emulator
# The AWS CLI's name for the region, read only when AWS_REGION is empty: for
# a KMS key named by alias or key id, for the ECS sandbox backend, and for
# the lakehouse's own AWS credential chain (after LAKEHOUSE_S3_REGION, then
# us-east-1). No default for KMS and ECS: without a region they fail with an
# error that names AWS_REGION.
# AWS_DEFAULT_REGION=
# One endpoint for every AWS API the app calls: KMS, STS (web identity
# sign-in), and the ECS sandbox backend's ECS and CloudWatch Logs calls. A
# service's own variable wins: AWS_ENDPOINT_URL_KMS, AWS_ENDPOINT_URL_STS,
# AWS_ENDPOINT_URL_ECS, AWS_ENDPOINT_URL_LOGS. Meant for an emulator that
# answers every service on one address; a VPC endpoint serves one service,
# so use the per-service names for those. An origin only (scheme, host,
# port): KMS refuses a path. Unset, each service's regional AWS endpoint.
# AWS_ENDPOINT_URL=
KMS_REQUIRE_PRIVATE="" # true: refuse a KMS / STS / Key Vault / Cloud KMS / OCI Vault call that would go to a public address
# Azure Key Vault (KMS_KEY_REF above). The identity: nothing to set under a
# system-assigned managed identity; AZURE_CLIENT_ID alone picks a
# user-assigned one; AKS workload identity sets its own variables. Outside
# Azure, a service principal: AZURE_TENANT_ID + AZURE_CLIENT_ID, and
# AZURE_CLIENT_CERTIFICATE_PATH (a PEM with the key and the certificate) or
# AZURE_CLIENT_SECRET. AZURE_AUTHORITY_HOST for a sovereign cloud. The full
# list, and the role to grant, in docs/KEY_MANAGEMENT.md#azure-key-vault.
# Google Cloud KMS (KMS_KEY_REF above). The identity: nothing to set on
# Compute Engine, GKE with workload identity or Cloud Run (the metadata
# server; GCE_METADATA_HOST moves it). Elsewhere GOOGLE_APPLICATION_CREDENTIALS,
# a workload identity federation (external_account) file, or a service
# account key. The full list, and the role to grant, in
# docs/KEY_MANAGEMENT.md#google-cloud-kms.
GCP_KMS_ENDPOINT="" # a regional, Private Service Connect (cloudkms-<ep>.p.googleapis.com) or emulator endpoint
# OCI Vault (KMS_KEY_REF above, the key's OCID). The identity: nothing to set
# on an instance in a dynamic group (the instance principal;
# OCI_METADATA_BASE_URL and OCI_FEDERATION_ENDPOINT move its two calls); where
# OCI provides a resource principal, OCI_RESOURCE_PRINCIPAL_VERSION (2.2) and
# its token and key; elsewhere OCI_CONFIG_FILE, the file `oci setup config`
# writes (OCI_CONFIG_PROFILE, default DEFAULT). OCI_AUTH names one of
# api_key, instance_principal, resource_principal. The full list, and the
# policy to write, in docs/KEY_MANAGEMENT.md#oci-vault.
OCI_KMS_CRYPTO_ENDPOINT="" # the vault's Cryptographic Endpoint: https://<vault>-crypto.kms.<region>.oraclecloud.com
OCI_KMS_MANAGEMENT_ENDPOINT="" # only for the key's details on the card; taken from the crypto endpoint when it is Oracle's name
# Every user's credentials are under their own key, and a customer key (Admin →
# IAM → Settings → Customer keys) can wrap its members' keys. How long a process
# keeps one unwrapped: an erased, destroyed or revoked key stops working within
# this long everywhere. 0 keeps none (every read of a customer member's value
# calls their KMS).
DATA_KEY_CACHE_SECONDS="" # default 300
# The documents chat generates and the copies of uploaded datasets are stored
# encrypted under their owner's user key (docs/KEY_MANAGEMENT.md, Stored
# files). The largest document the app keeps, and how many files stored before
# that one hourly pass encrypts (the card's Encrypt stored files has no limit).
CHAT_DOC_MAX_BYTES="" # default 52428800 (50 MB)
STORED_FILES_PER_PASS="" # default 25
# What agents remember about each user (long-term memory, conversation
# summaries, scratchpads) is encrypted the same way since R445: how many values
# kept before that one hourly pass encrypts (the button has no limit).
MEMORY_SEAL_PER_PASS="" # default 1000
# Agent Chat history (every message and conversation title) is encrypted the
# same way since R446: how many values kept before that one hourly pass
# encrypts (the button has no limit).
CHAT_SEAL_PER_PASS="" # default 2000
# Model call traces (prompts, requests, replies, tool calls) are encrypted the
# same way since R448, and swarm run traces since R449: how many kept before
# that one hourly pass encrypts, of each (the button has no limit).
TRACE_SEAL_PER_PASS="" # default 2000
# Approval requests and notifications are encrypted the same way since R450: how
# many values kept before that one hourly pass encrypts (the button has no limit).
INBOX_SEAL_PER_PASS="" # default 2000
# =============================================================================
# 2. RECOMMENDED
# =============================================================================
# ── Default LLM provider (OpenRouter) ────────────────────────────────────────
# Without it the app still runs, but every user must connect their own provider
# key under /integrations before any agent, swarm or notebook can call a model.
# When set it is the app-wide zero-config default; a user's own saved key always
# takes precedence. No per-user caps are applied — you own the key and the bill.
# Get one at https://openrouter.ai/keys
OPENROUTER_API_KEY=""
# The default model is NOT set here: a superadmin sets it under Admin ->
# Developer runtime -> AI services -> Default model, and everything without a
# model of its own (or whose own can't run for the person) uses it.
# OPENROUTER_DEFAULT_MODEL is no longer read.
# Override if you route OpenRouter through a proxy/gateway.
OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"
# ── Knowledge Base embeddings ────────────────────────────────────────────────
# There is no embeddings key here on purpose. Vector search (RAG) runs on
# whichever model provider is connected under /integrations, and OPENROUTER_API_KEY
# above covers it with no per-user setup -- OpenRouter does serve /embeddings
# (an earlier version of this file claimed otherwise, which is what made an
# OpenAI account look mandatory). Connect nothing and documents still work, via
# keyword search.
#
# What one answer reads from a knowledge base (docs/KNOWLEDGE_BASES.md → What
# the model reads). Each cited document carries its best few chunks in reading
# order; the turn is capped as a whole. Raise the budget for a large-window
# model and questions that span documents; lower it for a small model.
# KB_CHUNKS_PER_DOCUMENT=3
# KB_CITATION_CHARS_PER_CHUNK=1600
# KB_GROUNDING_MAX_CHARS=12000
#
# Below this best cosine similarity, with no keyword hit, a turn is not
# grounded at all (the model is told the search found nothing) — so "what is
# the weather" stops carrying five documents it must ignore. Measured with
# text-embedding-3-small: document questions 0.38–0.75, off-topic 0.10–0.32.
# Other embedding models score differently; 0 disables the floor.
# KB_MIN_SIMILARITY=0.3
#
# A sync claims its source; a second press of Sync now, or a scheduled pass,
# is told one is already running (R313). A sync that died leaves its claim,
# which another may take once the source has not changed for this long.
# KB_SYNC_LEASE_MINUTES=60
#
# A catalog crawl claims its source the same way (R315): a second Crawl now,
# or a scheduled pass, is told one is running, and a crawl that died leaves a
# claim another may take once the source has not changed for this long.
# CATALOG_CRAWL_LEASE_MINUTES=60
# Objects one bucket crawl lists. A listing that stops here removes nothing,
# and says so; narrow the source with a prefix before raising this.
# CATALOG_MAX_OBJECTS=50000
# ── Where knowledge-base vectors are searched ────────────────────────────────
# Without VECTOR_STORE: pgvector, in the Supabase Postgres you already run.
# Nothing extra to back up, and the permission check is the row-level security
# already protecting the chunks. VECTOR_STORE="pgvector" keeps it that way, and
# the installers leave a value you set alone.
#
# Qdrant ships with every install and is the default here. The reason is
# CAPACITY, not availability: an HNSW index wants RAM, and by default it wants
# it from the same instance serving traces, audit, BI and every OLTP query.
# Qdrant is a place to put the index that scales on its own. It does NOT make
# retrieval survive a Postgres outage -- every hit is hydrated from kb_chunks --
# but it does mean losing the INDEX costs only speed: every vector is also a
# column on its chunk row, and retrieval searches that copy while Qdrant is
# down. Qdrant holds VECTORS AND TWO IDS; the chunk text, the documents and the
# permissions stay in Postgres, and the app fills the index from them by itself
# (a new or lost volume, or an install just switched to it), searching Postgres
# for a collection until the index has all of it (R417).
#
# ONE QDRANT NODE IS NOT HIGH AVAILABILITY. For that, run a Qdrant cluster and
# set QDRANT_REPLICATION to at least 2; the admin page reports the replication
# the collection actually has, not the one you asked for.
#
# THIS IS A DEFAULT, NOT A DECISION FOR THE WHOLE DEPLOYMENT. Each knowledge
# base can pick its own index in RAG Settings -> Retrieval -> Vector index, and
# only the ones that picked nothing follow the value below. Changing a
# collection's index moves the vectors it already has; nothing is re-embedded.
#
VECTOR_STORE="qdrant"
QDRANT_URL="http://qdrant:6333"
# QDRANT_API_KEY=
# QDRANT_COLLECTION=agentswarms_kb_chunks
# QDRANT_REPLICATION=1
# QDRANT_SHARDS=1
# How long retrieval trusts a collection's last count of the index (seconds;
# 0 trusts the index without counting), and how often the scheduler checks
# every collection on it (minutes; 0 turns the sweep off).
# VECTOR_INDEX_CHECK_SECONDS=300
# VECTOR_INDEX_SYNC_MINUTES=10
#
# The bundled Qdrant takes an API key. The installers generate one and set
# BOTH of these to it: the first is what the bundled server demands, the second
# is what the app sends. Two settings because most deployments point at a
# Qdrant this project did not start. Without a key, anything on the compose
# network reads every knowledge base's vectors, spark-connect included, where
# Spark pipelines' Python UDFs run (VA-41). Leave both unset rather than empty:
# Qdrant reads an EMPTY key as "auth is on, and the key is empty", and then
# rejects every request.
#
# QDRANT__SERVICE__API_KEY=some-long-random-string
# QDRANT_API_KEY=some-long-random-string
# ── Online feature store ─────────────────────────────────────────────────────
# Where a feature view's latest row per key is SERVED from. Unset means every
# lookup reads the lakehouse, which is what happened before this existed:
# correct, and measured at ~130 ms at best against ~2 ms here, because the
# access check ahead of a governed statement is a round trip to Postgres.
#
# Nothing in the store is a source of truth. A miss, a stale entry, a server
# that does not answer -- every one of them falls back to the lakehouse and
# answers correctly. Losing this service costs latency and nothing else.
#
# Compose starts a single valkey. Valkey rather than Redis because Redis moved
# to RSALv2/SSPL; the protocol is the same, so FEATURE_STORE_URL can point at
# either, or at a managed one (put its password in the URL:
# redis://:PASSWORD@host:6379). rediss:// is TLS, for a store with in-transit
# encryption (ElastiCache among them): the certificate is always verified, and
# a private CA goes in NODE_EXTRA_CA_CERTS.
#
# VALKEY_PASSWORD: the bundled valkey requires it and the app sends it. The
# installers generate it. Empty means no password, which leaves every user's
# online features open to anything on the compose network (VA-41).
#
FEATURE_STORE_URL="redis://valkey:6379"
VALKEY_PASSWORD=""
# FEATURE_STORE_STALE_MINUTES=60 # per-view setting overrides this
# FEATURE_STORE_MAX_KEYS=500000 # keys one refresh will write
# FEATURE_STORE_MAXMEMORY=256mb # what the bundled server is given
# ── Public URL ───────────────────────────────────────────────────────────────
# Used in outbound email links and as the default origin for scheduled work.
# Change it to your real https:// origin in production, or emailed links point
# at localhost.
SITE_URL="http://localhost:8080"
# =============================================================================
# 3. OPTIONAL
# =============================================================================
# ── Agent web tools (search + browse) ────────────────────────────────────────
# Powers web_search + web_browse workspace-wide. Get a key at
# https://firecrawl.dev
# • WITHOUT a key, web_search still runs but falls back to DuckDuckGo's free
# Instant Answer API — entity summaries only, so results are thin/empty for
# ordinary queries.
# • WITHOUT a key, web_browse still works via the built-in fetcher: it strips
# page chrome and converts to markdown, but does NOT run JavaScript, so a
# client-rendered app returns an empty shell — reported as thin rather than
# passed off as content. A key adds JavaScript rendering. The same applies
# to adding a URL as a knowledge-base source.
# You do NOT have to set this here — two UI alternatives exist:
# • Connect Firecrawl on the Integrations page (encrypted, no restart).
# • Give one agent its own key in the agent editor's web tools
# (Brave / SerpAPI / Tavily for search; ScrapingBee or custom Firecrawl).
# Resolution order: per-agent key → this var → the Integrations connector.
FIRECRAWL_API_KEY=""
# ── Web analytics for YOUR deployment (both default to off) ──────────────────
# When set, public pages show a consent banner and load Google Analytics / Tag
# Manager with YOUR ids after the visitor accepts. Left unset, no banner is
# shown and no analytics request is ever made — which is what the "no
# telemetry" statement on /architecture and /security describes.
VITE_GA_ID=""
VITE_GTM_ID=""
# The same, read at runtime (win when set). Letters, digits and dashes only.
PUBLIC_GA_ID=""
PUBLIC_GTM_ID=""
# ── JS sandbox for headless custom code ──────────────────────────────────────
# Function nodes and custom components run user-authored JavaScript. On the
# canvas that runs in the browser; for DEPLOYED (API-key) and SCHEDULED runs it
# runs in a separate hardened container so it never shares a process with your
# service-role key.
#
# docker compose --profile sandbox up -d --build
#
# Inside Compose the app already defaults to http://js-sandbox:8091, so leave
# this empty. Set it only when the app runs on the HOST (npm run dev), where the
# service is published on loopback:
# JS_SANDBOX_URL="http://127.0.0.1:8091"
#
# Unset = custom code stays canvas-only, and deployed runs say so rather than
# failing mysteriously. Details: docs/DEPLOYMENT.md § "JS sandbox".
JS_SANDBOX_URL=""
# Ceilings enforced BY the sandbox (a caller cannot raise them).
JS_SANDBOX_MAX_TIMEOUT_MS="5000"
JS_SANDBOX_MAX_CONCURRENT="4"
JS_SANDBOX_MEM_MB="128"
# Largest /run request the sandbox accepts (code + context), in bytes.
JS_SANDBOX_MAX_BODY_BYTES="1000000"
# ── BI widget snapshot size ──────────────────────────────────────────────────
# Rows kept in a BI widget's cached snapshot (default 500, ceiling 100000).
# The snapshot is what shared links, public embeds and offline views render,
# and it lives inside the dashboard row — so raising it trades storage and
# dashboard load time for how much raw data a browser-side sum can see. An
# aggregated widget (agg_pushdown) needs far less than 500; a widget summing
# RAW rows is capped here and reports `truncated` when it hits it.
# PUBLIC_BI_SNAPSHOT_ROWS_CAP is read when the app starts (change it, restart);
# VITE_BI_SNAPSHOT_ROWS_CAP is baked in at BUILD time (change it, rebuild). The
# PUBLIC_ one wins when set; the browser and the scheduled refresh read the
# same value either way. Details: docs/SCALE_AND_LIMITS.md
VITE_BI_SNAPSHOT_ROWS_CAP=""
PUBLIC_BI_SNAPSHOT_ROWS_CAP=""
# Street tiles under BI point maps (optional). Unset (default): a point map
# draws its points on a plain background, no viewer's browser asks a third
# party for anything, and the dashboard's owner sees how to add streets. Set a
# tile server's URL template, with {z}, {x} and {y}, to draw streets under the
# points: every viewer's browser then fetches tiles from that server, so it
# learns which areas they look at (and the site's address, never the page's).
# Pick one whose terms allow your use. The OpenStreetMap Foundation's
# (https://tile.openstreetmap.org/{z}/{x}/{y}.png) suits light use with its
# credit shown and blocks heavy use without notice; with many viewers, run your
# own or use a tile provider. The attribution is the credit that server
# requires, shown in the map's corner.
# PUBLIC_MAP_TILES_URL="https://tiles.example.com/{z}/{x}/{y}.png"
# PUBLIC_MAP_TILES_ATTRIBUTION="© OpenStreetMap contributors"
# PUBLIC_ is read when the app starts; VITE_ is baked in at build time.
VITE_MAP_TILES_URL=""
PUBLIC_MAP_TILES_URL=""
VITE_MAP_TILES_ATTRIBUTION=""
PUBLIC_MAP_TILES_ATTRIBUTION=""
# ── Outbound email (all optional) ────────────────────────────────────────────
# Transactional emails (welcome, budget alerts, certificates) are best-effort:
# with none of these set, sends are skipped and logged — the app works fine.
# Auth emails (confirmation, password reset) are sent by Supabase itself and
# are configured in your Supabase dashboard, not here.
#
# NO ACCOUNT IS REQUIRED for either option. SMTP is built in, so any relay you
# already have works with no third party involved. Pick whichever you have.
#
# Option A — any SMTP server. Set these four and you are done: a corporate
# relay, SES, a provider's free tier, or a machine you run. Port 587 with
# STARTTLS is the usual choice; 465 turns on implicit TLS automatically.
SMTP_HOST=""
SMTP_PORT="587"
SMTP_USER=""
SMTP_PASS=""
SMTP_SECURE="false"
#
# Option B — Resend (https://resend.com; a hosted HTTP API, for deployments
# with no relay to point at). Takes precedence when both are set.
# The key alone is NOT enough: add your domain in Resend, publish the SPF/DKIM
# DNS records it gives you, verify it, then set EMAIL_FROM to an address on that
# domain. Until a domain is verified Resend sends only from onboarding@resend.dev
# and delivers only to the account owner's own address — fine for a smoke test,
# useless for real users. See docs/INSTALL.md.
RESEND_API_KEY=""
# From address for all outbound mail: 'AgentSwarms <noreply@your-domain.com>'.
# MUST be on a domain verified with your provider. Left empty it falls back to
# noreply@example.com, which Resend rejects — every app email then fails while
# the app looks healthy. Check the email_send_log table if mail stops arriving.
EMAIL_FROM=""
# (SITE_URL is declared once, in section 2 — email links use it too.)
#
# Who a scheduled report (BI → Reports → Schedule) may be sent to. Always:
# people with an account on this install. Add domains, comma-separated, to
# allow addresses there too: "example.com" is that domain only,
# ".example.com" also its subdomains, and "*" allows any address. Empty keeps
# reports inside the install — a report carries the data its owner can read,
# so sending it outside is a decision for the operator, not each author.
REPORT_EMAIL_DOMAINS=""
# ── Internal self-calls (deployed swarms, scheduled runs, workflows) ─────────
# Headless swarm runs (deployed, scheduled, and a workflow's Swarm step)
# execute their LLM nodes by calling this app's OWN /api/chat over HTTP,
# authenticated with an internal shared secret.
#
# The origin for those self-calls is resolved ONLY from configuration —
# PUBLIC_APP_URL, then SITE_URL, then http://127.0.0.1 on PORT, the port
# `node server.mjs` listens on (default 8080; see HOST and PORT below). It is
# never taken from the incoming request's Host header, which a caller controls
# and which would otherwise leak the secret below to an attacker's server.
#
# Leave PUBLIC_APP_URL empty for normal single-container/VM deploys (the
# loopback fallback works). Set it when the app can't reach itself on localhost
# from inside its own container (e.g. some PaaS / split ingress setups).
PUBLIC_APP_URL=""
# Shared secret for those internal self-calls and the JS sandbox. RECOMMENDED:
# any long random string (scripts/setup.sh generates one). If unset, the app and
# the sandbox both DERIVE a secret from the service-role key (an HMAC; R463), so
# it still works with no setting and the key itself never goes into a request
# header. A secret of its own lets you rotate it without rotating the key.
INTERNAL_RUN_SECRET=""
# ── Deployed-swarm limits (POST /api/swarm/run) ──────────────────────────────
# A swarm run can make many model calls and hold a worker for minutes, so each
# API key is bounded. Counters are per app instance: behind a load balancer with
# N instances the effective ceiling is N x these values (enforce a hard global
# limit at your ingress/CDN if you need one).
#
# Requests per minute per API key (default 30).
SWARM_RUN_RATE_LIMIT_PER_MIN=""
# Simultaneous in-flight runs per API key (default 5).
SWARM_RUN_MAX_CONCURRENT=""
# Whole-run wall-clock budget in ms, shared by nested Execute-Swarm nodes
# (default 600000 = 10 minutes). Raise it for long foreach/loop swarms.
SWARM_RUN_TIMEOUT_MS=""
# How often a run the server executes checks whether it was cancelled from
# Recent runs, in ms (default 2000). A cancelled run stops before its next
# node and aborts the model call in flight (R309).
SWARM_CANCEL_POLL_MS=""
# ── Outbound fetch safety (HTTP nodes, web_browse, provider tests, MCP) ───────
# Everything that fetches a URL chosen by a user or the MODEL from inside your
# network goes through one guard: swarm HTTP nodes, the web_browse tool, the
# "Test connection" button on the Integrations page (Ollama / vLLM / n8n and any
# custom base_url), the n8n webhook, and MCP server probe/tool calls.
#
# Cloud instance metadata and link-local addresses (169.254.169.254 and the rest
# of 169.254.0.0/16, IPv6 link-local) are ALWAYS refused — they can hand out the
# host's IAM credentials and nothing legitimately fetches them. Ordinary private
# networks (localhost, RFC1918, in-cluster) are ALLOWED BY DEFAULT, because
# self-hosted model servers, MCP servers and n8n live there. Every redirect hop
# is re-validated so a public URL can't 302 into a blocked range.
#
# Set BLOCK_PRIVATE_NETWORK_FETCH=true to ALSO refuse ordinary private/internal
# targets — recommended for untrusted multi-tenant installs or public embeds,
# where web_browse is model-driven and could be steered at your internal network.
# (metadata stays blocked either way.)
BLOCK_PRIVATE_NETWORK_FETCH=""
# Legacy: forces the permissive behaviour even if BLOCK_… is set. You normally
# don't need this now that private networks are allowed by default.
ALLOW_PRIVATE_NETWORK_FETCH=""
# Signs the post-turn webhook an agent sends to its n8n workflow, which
# carries the prompt and the reply. When set, each delivery carries
# X-AgentSwarms-Timestamp (milliseconds since the epoch) and
# X-AgentSwarms-Signature: v1=<hex HMAC-SHA256 of "<timestamp>.<raw body>">,
# so the receiver can check where it came from and reject replays. Unset, the
# webhooks go unsigned. Any long random string (`openssl rand -hex 32`); give
# the receiver the same value.
# WEBHOOK_SIGNING_SECRET=
# ── HTTP security headers (server.mjs) ───────────────────────────────────────
# Every response carries X-Content-Type-Options: nosniff, Referrer-Policy:
# strict-origin-when-cross-origin and a Content-Security-Policy. App pages may
# be framed only by the app itself (frame-ancestors 'self', X-Frame-Options:
# SAMEORIGIN); the embed pages (/embed/...) and published dashboards
# (/share/bi/...) may be framed anywhere unless EMBED_FRAME_ANCESTORS narrows
# them. HSTS is sent when the browser came over HTTPS (directly, or through a
# proxy that sends X-Forwarded-Proto: https).
SECURITY_HEADERS="" # on; "off" when a proxy in front sets them
# The enforced policy. Default: object-src 'none'; base-uri 'self';
# form-action 'self'; script-src 'self' 'nonce-{nonce}'. Scripts run only from
# this origin, plus the inline ones the app renders with that response's
# nonce: no 'unsafe-inline', no eval. In a policy you write, {nonce} is
# replaced by each response's nonce; keep 'nonce-{nonce}' in any script-src,
# or the page's own hydration scripts are refused. frame-ancestors is set per
# page and is ignored here. Two worker scripts carry their own script-src
# whatever you set: DuckDB's engine ('self' 'wasm-unsafe-eval') and the swarm
# function node's sandbox (default-src 'none'; script-src 'unsafe-eval').
# To go back to no script-src (an inline tag your proxy injects, say), set
# "object-src 'none'; base-uri 'self'; form-action 'self'".
CONTENT_SECURITY_POLICY=""
# A policy to TRIAL: the browser reports what it would block and blocks
# nothing. {nonce} works here too, e.g.
# "script-src 'self' 'nonce-{nonce}'; report-uri https://csp.example.com/r"
CONTENT_SECURITY_POLICY_REPORT_ONLY=""
# Who may frame the embed and share pages, e.g.
# "https://www.example.com https://help.example.com"
EMBED_FRAME_ANCESTORS=""
HSTS_MAX_AGE="" # 15552000 (180 days); 0 sends no HSTS
HSTS_INCLUDE_SUBDOMAINS="" # false
# The Permissions-Policy header on every response. The default denies, for
# every origin, browser features the app never uses (camera, microphone,
# geolocation, payment, USB, motion sensors, screen capture), so neither an
# injected script nor a widget framed on an embed page can reach them. Set
# your own list to change it. Keep the line commented out for the default:
# an empty value sends no Permissions-Policy header at all.
# PERMISSIONS_POLICY="accelerometer=(), camera=(), display-capture=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()"
# ── Audit trail ──────────────────────────────────────────────────────────────
# Retention is set per-instance in the DB (iam_settings.audit_retention_days,
# default 365). Before deleting expired rows the purge writes them to stdout as
# NDJSON lines prefixed `audit-archive`, so any log shipper keeps a copy after
# the database copy is gone.
#
# Set to 0/false to skip that — e.g. if you already pull the trail via
# GET /api/audit/export (NDJSON, superadmin bearer token, ?stream=audit|traces|runs
# with optional &since=&until=), which is the better route for SIEM ingestion.
AUDIT_ARCHIVE_ON_PURGE=""
# ── Prometheus / OpenMetrics scrape endpoint ─────────────────────────────────
# GET /api/metrics exposes fleet-level operational gauges (run/trace volume,
# error mix, month-to-date spend, active users) in the Prometheus text
# exposition format, for Prometheus / Grafana Agent / the Datadog OpenMetrics
# check. It aggregates ALL tenants, so it is DISABLED unless you set a token:
# leave this empty and the endpoint returns 404. When set, scrapers must send
# `Authorization: Bearer <this>`. Generate one with e.g. `openssl rand -hex 32`.
# The payload is cached ~15s per instance, so scrape as often as you like.
METRICS_TOKEN=""
# ── OpenTelemetry trace export (OTLP/HTTP) ───────────────────────────────────
# Stream multi-agent runs and LLM calls to any OTLP collector — the Datadog
# Agent's OTLP receiver, Grafana Tempo, Jaeger, or otelcol — as distributed
# traces. DISABLED unless an endpoint is set. A background job on the scheduler
# pass reads newly-finished swarm runs (root span + a child span per node, so
# you get the full waterfall) and execution traces (one span per LLM call, with
# OpenTelemetry GenAI `gen_ai.*` attributes) and POSTs them. It's fully
# decoupled from the request path, so it can never slow or break a live call,
# and only span METADATA is sent (model, tokens, cost, status, timing, node
# graph) — never prompt/response text — so it carries no user content.
#
# Base collector endpoint; the exporter appends /v1/traces. e.g. an in-cluster
# collector: http://otel-collector:4318 (or the Datadog Agent: http://datadog-agent:4318)
OTEL_EXPORTER_OTLP_ENDPOINT=""
# Optional: full traces URL instead of the base above (takes precedence).
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=""
# Optional: extra headers as comma-separated key=value pairs — e.g. an API key
# for a hosted collector: "dd-api-key=xxxxx" or "authorization=Bearer xxxxx".
OTEL_EXPORTER_OTLP_HEADERS=""
# Optional: service.name on the exported resource (default "agentswarms").
OTEL_SERVICE_NAME=""
# Persist prompt/response bodies in traces (default true). Set to false for
# regulated tenants that cannot keep user content at rest: traces and swarm-run
# steps then store the full operational skeleton — model, provider, tokens,
# cost, latency, status, node graph, tool-call shape — but drop the prompt,
# response, node input/output and chain-of-thought text. Applies at write time
# only (not retroactive); pair with trace_retention_days for older rows.
PERSIST_PROMPT_BODIES=""
# ── Local SQL engine (uploaded datasets, prep flows, BI, semantic models) ────
# SQL over LOCAL datasets — everything you upload, plus prep flows, BI widgets,
# semantic models and the agents' sql_query tool — runs in-process. You need
# NONE of this to run the app.
#
# Leave EMPTY. The default is DuckDB, a columnar engine with real SQL: CTEs,
# window functions, subqueries and proper JOINs.
#
# Set to `alasql` ONLY as an escape hatch, if the native module will not install
# on your platform. AlaSQL is a JS interpreter with no window functions, no
# CTEs and no subqueries, so the semantic layer's period-over-period comparisons
# do not work on it. Any other value is treated as the default, so a typo cannot
# silently downgrade your engine.
#
# Behaviour differences are small but real and are written down rather than
# discovered — see docs/TESTING.md. The two notable ones: DuckDB sorts NULLs
# last in both directions, and it rejects backtick-quoted identifiers.
LOCAL_ENGINE=""
# Per-query ceilings for DuckDB, shown with their defaults. Ignored when you
# have opted out with LOCAL_ENGINE=alasql; leave blank to keep the default.
LOCAL_ENGINE_MEMORY_MB="" # 512
LOCAL_ENGINE_THREADS="" # 2
LOCAL_ENGINE_TIMEOUT_MS="" # 30000
#
# Columnar mirror: DuckDB can read a dataset from a cached Parquet copy instead
# of its rows, which makes a large dataset's repeat queries much faster (8 ms
# against 20 ms on 5,000 rows, and the gap widens with size). On by default;
# set to 0 to disable. The mirror is a strict cache — it is used only while it
# is newer than the data, and NEVER for a SHARED dataset, because a mirror
# holds unmasked rows and a stale one would serve a revoked grantee. Shared
# datasets always read their rows directly, which is correct and fast enough.
PARQUET_MIRROR=""
# Smallest dataset worth mirroring, and the cache's disk budget.
PARQUET_MIN_ROWS="" # 5000
PARQUET_CACHE_MAX_BYTES="" # 2 GiB
# Largest dataset `auto` will mirror. Above this a dataset stays on direct
# query rather than letting one table consume the whole budget. A dataset set
# explicitly to `import` ignores this — an explicit choice outranks a heuristic.
PARQUET_MAX_ROWS="" # 5000000
#
# How many bytes of mirrors ONE WORKSPACE may hold. Blank or 0 = unlimited,
# which is the default and means nothing is ever evicted for capacity.
#
# Distinct from PARQUET_CACHE_MAX_BYTES above: that bounds one node's scratch
# directory and evicts by file age; this bounds how much of a workspace's data
# is materialised at all and evicts by last USE, keeping datasets pinned to
# `import` until every `auto` one has gone. Eviction only ever removes a cache
# — an evicted dataset still answers the same question from its rows, more
# slowly — and the owner is told which datasets went.
MIRROR_BUDGET_BYTES="" # unlimited
# Defaults to a subdirectory of the system temp dir. Set this to keep the cache
# on a specific volume, or to survive restarts on a host with a volatile /tmp.
#
# NOTE: this is also the ONLY directory the local SQL engine may touch. It is
# passed to DuckDB's allowed_directories, so user- and model-authored SQL can
# read the mirror and nothing else on the host. See SECURITY.md.
PARQUET_CACHE_DIR=""
# Largest ORC object read from a bucket, in bytes. Default 268435456 (256 MB).
# ORC is the one format DuckDB cannot stream from object storage — read_orc
# opens local paths only — so the whole file is downloaded first. A partial
# download is unreadable (the footer is at the end), so a file over this
# ceiling is refused with its size rather than fetched and then failed.
ORC_MAX_DOWNLOAD_BYTES="" # 268435456
# Dataset uploads: the largest file accepted, in bytes (default 100 MB), and
# the most rows. Going over either refuses the upload; a subset is never
# imported. CSV, TSV and NDJSON stream in batches, but JSON arrays and .xlsx
# are read whole, so the byte cap is also their memory cost. Past these, a
# database connection serves the data better than a bigger file.
# UPLOAD_MAX_BYTES=104857600
# UPLOAD_MAX_ROWS=500000
# Data-prep flows run on the server over the full data. The rows loaded from
# each source table, and the rows written to the output dataset. Hitting
# either is reported on the flow (which source, how many rows), never
# silently. Rows are held in memory during a run, so raise these with the
# app's memory in mind.
# PREP_SOURCE_ROWS_CAP=500000
# PREP_OUTPUT_ROWS_CAP=250000
# Rows one uploaded dataset may contribute when the server runs SQL over a
# user's datasets without a current Parquet mirror: scheduled dashboard
# refreshes, data alerts and semantic-model queries among them. A dataset
# shared with the user never uses a mirror, so this always applies to it.
# Only the datasets a query names are loaded. A query that reads one over the
# cap fails rather than answer from its first rows; queries that do not read
# it are unaffected. Turn PARQUET_MIRROR on, or raise this and the app's
# memory with it.
# BI_LOCAL_ROWS_PER_TABLE_CAP=20000
# Data quality checks run after each prep refresh and on the scheduler. How
# often a dataset with enabled checks is re-checked, in minutes (also how
# soon a freshness SLA can alert); the rows one check reads (a capped read
# says so in its result, and suites of only row-count and load-time checks
# read no rows); and how many results are kept per dataset, newest first.
# DATA_QUALITY_INTERVAL_MINUTES=60
# DATA_QUALITY_ROW_CAP=200000
# DATA_QUALITY_KEEP_RESULTS=500
# Before anything overwrites a dataset (a re-upload, a prep run or refresh, a
# restore) its rows are copied as a version you can restore. A dataset with
# more rows than the cap gets a version with metadata only, marked as not
# restorable; 0 keeps metadata only for every dataset. Each version is a full
# copy, so raise the cap with storage in mind. The keep count is versions kept
# per dataset. An empty value is the default, for both.
# DATASET_VERSION_ROW_CAP=20000
# DATASET_VERSION_KEEP=5
# ── External data connections (warehouses + app sources) ─────────────────────
# NONE of this is required. The defaults are the recommended settings; these
# exist for tuning against a specific warehouse or network. Full explanations,
# including how the numbers were measured, are in docs/DEPLOYMENT.md.
# Per-query ceilings and concurrency for every warehouse query the app makes.
WAREHOUSE_MAX_ROWS="" # 1000 — default rows returned
WAREHOUSE_ABS_MAX_ROWS="" # 5000 — hard ceiling, no caller exceeds
WAREHOUSE_QUERY_TIMEOUT_MS="" # 60000
WAREHOUSE_MAX_CONCURRENT="" # 8 — in flight per instance
WAREHOUSE_MAX_CONCURRENT_PER_USER="" # 3
WAREHOUSE_QUEUE_TIMEOUT_MS="" # 30000 — wait for a slot before failing
# What a query cost, in Query history. Engines that bill by the data a query
# reads are priced at their on-demand list price unless set here (a negotiated
# rate, another region); the price used is kept with each query. Other engines
# show what was read and no amount.
QUERY_COST_ATHENA_USD_PER_TB="" # 5 — dollars per TB scanned
QUERY_COST_BIGQUERY_USD_PER_TIB="" # 6.25 — dollars per TiB billed
# Connection pooling for PostgreSQL/MySQL-family connections. Measured on a
# local Postgres, opening a connection was 92% of a SELECT 1 (24.9ms of
# 27.1ms); pooling took the driver from 30.7ms to 2.9ms per query. Reproduce
# with `npx vite-node scripts/bench-pool.ts`. Set WAREHOUSE_POOL=off to go
# back to a connection per query.
#
# SIZING: sockets held ≈ WAREHOUSE_POOL_MAX x WAREHOUSE_POOL_MAX_KEYS x
# replicas. Check that against your database's max_connections.
WAREHOUSE_POOL="" # on
WAREHOUSE_POOL_MAX="" # 4 — sockets per credential set
WAREHOUSE_POOL_IDLE_MS="" # 30000 — before an idle socket closes
WAREHOUSE_POOL_TTL_MS="" # 300000 — before a whole pool is dropped
WAREHOUSE_POOL_MAX_KEYS="" # 64 — distinct credential sets held
# Outbound HTTP for warehouse APIs and app sources (Stripe, Sheets, CRMs).
#
# PROXY: if your network has no direct egress, set these and the connectors
# will use them. Without it the product cannot reach Snowflake or Stripe from
# inside such a network, and it looks like a timeout rather than a setting.
# NO_PROXY takes a comma-separated bypass list: `*` bypasses everything,
# `internal.corp` matches that host and its subdomains, `db.corp:5432` only
# that port. Lower-case spellings are accepted too.
HTTPS_PROXY=""
HTTP_PROXY=""
NO_PROXY=""
# One proxy for every scheme, used where the scheme's own variable is empty
# or unset: an https target takes HTTPS_PROXY, then https_proxy, then this,
# then all_proxy (an http target the same with HTTP_PROXY), and an empty
# NO_PROXY gives way to no_proxy the same way. NO_PROXY applies to it too.
# ALL_PROXY=
# PRIVATE CONNECTIVITY FOR MODEL PROVIDERS. The proxy above also covers every
# LLM provider call. Each provider integration can be set to "Require a private
# network path": its calls are refused unless the endpoint resolves to a private
# address here or goes through the proxy, so a missing private DNS zone fails
# loudly instead of sending traffic over the internet. This sets the switch's
# starting value for NEW integrations only; it never changes an existing one.
GENAI_REQUIRE_PRIVATE=""
# RETRIES on transient failures (408/429/502/503/504 and transport errors),
# with exponential backoff, full jitter, and Retry-After honoured when sent.
CONNECTOR_MAX_RETRIES="" # 2 (max 5; 0 disables)
CONNECTOR_RETRY_BASE_MS="" # 400
CONNECTOR_RETRY_MAX_MS="" # 8000 — caps any single wait
# 500 is NOT retried by default: it usually means the query reached the
# backend and failed there, so a retry pays for the same scan twice. Turn on
# for a provider that returns 500 for throttling.
CONNECTOR_RETRY_500="" # off
# Scheduled re-validation of connection credentials, using the product's own
# probes (a SELECT 1 through the real driver; the same stream listing the
# "test" button makes). Advisory only — nothing is auto-disabled, and a
# failure notifies once per transition rather than every pass.
CONNECTION_HEALTH_HOURS="" # 12 (0 disables)
# The same for Integrations credentials: LLM provider keys, the LLM
# gateway, n8n and Firecrawl are re-tested this often, in hours (decimals
# work), with the same test their save runs. A key that starts or stops
# failing gets a badge, an in-app notification and an audit event; nothing is
# disabled. At most 10 checks a pass. 0, off, false or no turns it off.
# INTEGRATION_HEALTH_HOURS=6
# Age at which a credential is badged as old in the Integrations UI. Measured
# from when the secret was last entered, so re-saving resets it and a health
# check does not. Nothing expires.
CREDENTIAL_MAX_AGE_DAYS="" # 90
# ── Budget enforcement ───────────────────────────────────────────────────────
# /budgets stores a monthly_cap_usd per user, but by default it only drives
# threshold ALERT emails — spend is never actually blocked.
#
# Set to true to make the cap a hard stop: once month-to-date spend reaches it,
# model calls return 402 until the next month or the cap is raised. Off by
# default because monthly_cap_usd defaults to a very small value, so enabling
# it on an existing instance whose caps were never meant to bite would start
# refusing calls immediately. Review your caps, then turn this on.
ENFORCE_BUDGET_CAP=""
# ── Scheduling & horizontal scaling ──────────────────────────────────────────
# AgentSwarms runs a lightweight in-process scheduler on a 60s tick: BI
# refreshes, data alerts, scheduled reports, swarm schedules, catalog crawls,
# and notebook-kernel reaping. On a SINGLE instance you need nothing here.
#
# Token so an EXTERNAL scheduler can drive the same work by POSTing to
# /api/bi/cron with `Authorization: Bearer <this>`. Recommended once you run
# more than one instance.
BI_CRON_TOKEN=""
# The same token lets that scheduler refresh the AI Model Catalog from AIMLAPI by
# POSTing to /api/public/hooks/refresh-model-registry (a superadmin's session
# works too). At most this many refreshes run a minute; extra calls get 429.
MODEL_REGISTRY_SYNC_PER_MIN="" # 2
# Models the AI Model Catalog page loads, read in pages of 1,000 (a value under
# 1000 counts as 1000). Past it the page says it shows the first N of M
# models, and its filters and search cover only those. Raise it once the
# registry outgrows it.
# MODEL_REGISTRY_MAX_ROWS=5000
# Set to 1 on the replicas that should NOT run the in-process scheduler, e.g.
# the web tier when analytics nodes run it, or every replica when ONE external
# cron hits /api/bi/cron (see docs/DEPLOYMENT.md). A cross-instance lease
# already makes it safe to run on many, so this is hygiene, not correctness.
# Leave empty for single-instance and local runs.
DISABLE_INPROCESS_SCHEDULER=""
# That lease: how long a pass may hold it before another replica can take over.
# It is renewed while the pass runs, so this is only how long a crashed holder
# blocks scheduled work. Minimum 30 s.
SCHEDULER_LEASE_TTL_MS="" # 120000 (2 min)
# Where the production server listens. Read by `node server.mjs`, which the
# Docker image and `npm start` run; `npm run dev` listens on 8080 from
# vite.config.ts instead. Defaults 0.0.0.0 (every IPv4 interface) and 8080.
# Inside a container keep HOST as it is; on a bare host, 127.0.0.1 leaves the
# app reachable only through a reverse proxy on the same machine. Under
# Compose leave PORT alone too: the port mapping and the health check both
# name 8080. Elsewhere, such as a platform that sets PORT for you, the app's
# calls to its own /api/chat follow PORT unless PUBLIC_APP_URL or SITE_URL
# is set, as notebook kernels' default callback address does. Do not set
# PORT for `npm run dev`: Vite stays on 8080, and those calls would go to the
# port PORT names.
# HOST=0.0.0.0
# PORT=8080
# How many worker processes `node server.mjs` runs. Unset: one per CPU the
# process may use, which in a container is its CPU quota rounded down (at
# least 1), and 1 on an analytics node (APP_ROLE below). 0 or 1 runs one
# process with no cluster, which suits many one-core containers; a number
# caps it, for a noisy neighbour. Each worker has its own lakehouse engine
# and catalog sessions, so LAKEHOUSE_MEMORY_LIMIT and
# LAKEHOUSE_CATALOG_CONNECTIONS count once per worker. The startup log gives
# the count ("forking N workers", or "single process"). deploy/aws and the
# Helm chart set it per tier.
# WEB_CONCURRENCY=
# `analytics` keeps this node out of the request path: /api/health/ready
# answers 503 for good while /api/health stays 200, so a load balancer that
# checks readiness stops sending it traffic and nothing restarts it. It still
# runs scheduled work (unless DISABLE_INPROCESS_SCHEDULER is set) and answers
# requests sent to it directly, and WEB_CONCURRENCY defaults to 1 there. Use
# it for nodes sized for heavy lakehouse queries. Any other value is `web`.
# On Kubernetes give an analytics Deployment no readiness probe, or its
# rollout never completes. docs/DEPLOYMENT.md, "Analytics-only nodes".
# APP_ROLE=web
# ── Shutdown and connection timing (behind a load balancer) ──────────────────
# See docs/DEPLOYMENT.md "Shutdown and connection timing". The defaults suit an
# AWS ALB or a Kubernetes Service; change them only to match yours.
# After SIGTERM, how long open requests (a chat reply mid-stream) get to finish.
DRAIN_TIMEOUT_MS="" # 25000
# Keep accepting this long after SIGTERM while readiness already answers 503.
DRAIN_DELAY_MS="" # 0
# Idle keep-alive window: keep it ABOVE your load balancer's idle timeout.
HTTP_KEEPALIVE_TIMEOUT_MS="" # 75000
# A quiet streamed reply gets a `: ka` comment this often (0 = off).
SSE_HEARTBEAT_MS="" # 15000
# Behind a proxy that gives up on a first byte (CloudFront: 60 s), a chat turn
# not answered by then sends its headers first and its answer, or its error, as
# events. Off when empty; deploy/aws sets 45000 behind CloudFront (R481).
EARLY_HEADERS_AFTER_MS=""
# ── Server-side PowerPoint renderer (optional, Node/Docker only) ──────────────
# By default, PPT/Word/Excel are generated IN THE BROWSER (pptxgenjs) — works on
# every deploy, nothing to configure. Optionally run the `docgen` container (python-pptx → NATIVE editable charts/tables, and the
# slide images Deep mode's review reads; the review itself runs in the app, as the user) and point the app at it:
#
# docker compose --profile docgen up -d --build
#
# You can leave this EMPTY: the app probes http://docgen:8099 (compose network)
# and http://localhost:8099 (published loopback port) and uses whichever answers,
# so both of these work without configuration:
#
# Docker stack (app in a container) → reached as http://docgen:8099
# Local dev server (npm run dev) → reached as http://localhost:8099
#
# Set it only when the renderer runs somewhere else (another host, another port).
# A value that doesn't answer is not fatal — the probe falls back to the two
# names above, so a stale setting can't silently disable Deep mode.
#
# "Deep" mode uses the service and falls back to the in-browser generator if it
# is unreachable — which produces a file IDENTICAL to "Browser · fast". The
# composer greys out Deep and says why when it can't be reached
# (GET /api/docgen/status).
DOCGEN_SERVICE_URL=""
# Optional shared bearer token between the app and the docgen container (set the
# same value on both). Leave empty for a private in-network service.
DOCGEN_TOKEN=""
# ── Developer workspace: server-side Python runtime ───────────────────────────
# NOTHING HERE IS REQUIRED unless you want the Developer-workspace server
# runtime — real server kernels that pip install and run LangChain / LlamaIndex
# / LangGraph. Enable it with:
#
# docker compose --profile notebooks up -d --build
#
# then enable it under Admin → Developer runtime. The app generates its own
# signing secret and defaults every internal URL to the compose service names.
# Security model + scaling: docs/DEVELOPER_WORKSPACE_RUNTIME.md.
#
# The settings below are OPTIONAL overrides for non-standard deployments.
#
# Force-enable without using the admin UI (the DB setting is the normal switch):
NOTEBOOK_RUNTIME_ENABLED=""
# Manage the token-signing secret yourself instead of letting the app generate
# one (min 16 chars). Only needed if you run replicas that don't share a DB.
NOTEBOOK_RUNTIME_SECRET=""
# Backend: docker (single host) | k8s (app must run IN-cluster) | ecs (one
# Fargate task per sandbox, on AWS) | e2b (stub).
NOTEBOOK_RUNTIME_BACKEND="docker"
# ecs: deploy/aws sets every NOTEBOOK_ECS_* below (Terraform's ecs and vm
# stacks) and registers the task definition: the image, a read-only root, no
# task role, and subnets with no route out. RunTask cannot change the image,
# so this backend runs the task definition's image and ignores
# NOTEBOOK_RUNTIME_IMAGE. The app's role needs ecs:RunTask, ecs:TagResource,
# ecs:DescribeTasks, ecs:StopTask, ecs:DescribeClusters, iam:PassRole on the
# sandbox's execution role, and logs:GetLogEvents; deploy/aws grants exactly
# these. A sandbox gets its secrets from the app once, for a one-time nonce,
# never in RunTask's request (which CloudTrail records), so it needs
# NOTEBOOK_APP_INTERNAL_URL (below) to reach the app. AWS_REGION (or
# AWS_DEFAULT_REGION) is required too. See docs/DEVELOPER_WORKSPACE_RUNTIME.md.
#
# Required on ecs: without them no sandbox starts, and the error names the
# missing ones. The cluster is a name or ARN, the task definition a family,
# family:revision or ARN. Subnets (at most 16) and security groups (at most
# 5) are comma-separated ids. Sandboxes never get a public IP.
# NOTEBOOK_ECS_CLUSTER=
# NOTEBOOK_ECS_TASK_DEFINITION=
# NOTEBOOK_ECS_SUBNETS=
# NOTEBOOK_ECS_SECURITY_GROUPS=
# ecs: other task definitions for batch jobs (ETL runs, ML training and
# prediction, workflow notebook steps, lakehouse Spark queries) and for
# long-running services (MCP servers, model scorers). Unset = the task
# definition above.
# NOTEBOOK_ECS_TASK_DEFINITION_BATCH=
# NOTEBOOK_ECS_TASK_DEFINITION_SERVICE=
# ecs: the capacity provider for notebook sessions and services, and the one
# for batch jobs (unset = the first). deploy/aws sets FARGATE and
# FARGATE_SPOT, so batch jobs run on Spot capacity.
# NOTEBOOK_ECS_CAPACITY_PROVIDER=FARGATE
# NOTEBOOK_ECS_BATCH_CAPACITY_PROVIDER=
# ecs: the sandbox's container name in the task definition. RunTask's
# overrides go to it, and the exit code and log stream are read from it.
# deploy/aws names it kernel too.
# NOTEBOOK_ECS_CONTAINER=kernel
# ecs: where the task definition's awslogs driver writes, so the app can read
# a job's output back: the last 2000 lines of the stream
# <prefix>/<container>/<task id>. With no log group that output is empty and
# the runtime's preflight check warns. deploy/aws sets both.
# NOTEBOOK_ECS_LOG_GROUP=
# NOTEBOOK_ECS_LOG_STREAM_PREFIX=nb
# ecs: the ECS and CloudWatch Logs API endpoints, for VPC endpoints or an