Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
69 lines (59 loc) · 2.95 KB
/
Copy path.env.example
File metadata and controls
69 lines (59 loc) · 2.95 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
# Paracosm Simulation Engine
# Copy to .env and fill in your keys
# All search keys are also configurable from the dashboard Settings panel
# === LLM Providers (at least one required) ===
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
# === Research & Web Search (all optional, more = better) ===
# These power the research pipeline: department agents use live web search
# to find real citations (NASA papers, medical journals, domain research)
# during crisis analysis. With all 4 providers, search coverage is maximized
# and Cohere neural reranking produces the most relevant results.
#
# Also used by the Scenario Compiler for real-world seed ingestion:
# upload a document and the compiler enriches the scenario knowledge
# bundle with live web research grounded in your seed material.
#
# Get free API keys:
# Serper: https://serper.dev (2,500 free searches)
# Tavily: https://tavily.com (1,000 free searches/mo)
# Firecrawl: https://firecrawl.dev (500 free credits)
# Cohere: https://cohere.com (rate-limited free tier)
# Google search via Serper (most general web coverage)
SERPER_API_KEY=
# AI-optimized search with structured content extraction
TAVILY_API_KEY=
# Web scraping + search with clean markdown extraction
FIRECRAWL_API_KEY=
# Neural reranking via Cohere rerank-v3.5
# Reorders search results by semantic relevance to the query
# Dramatically improves citation quality when combined with any search provider
COHERE_API_KEY=
# === Scenario Compiler ===
# The compiler generates runtime hooks from scenario JSON via LLM calls
# Uses ANTHROPIC_API_KEY or OPENAI_API_KEY (whichever is set)
# Cost: ~$0.10 per scenario compile, cached after first generation
# === Server ===
PORT=3456
# === Rate Limiting ===
# Simulation runs per IP address per day on this server's own keys; a
# request that brings its own provider key is not counted. Unset, the
# limit is 1. 0 turns it off for local dev, and with it the daily compile
# limit and the hourly chat limits. A value that is not a whole number
# keeps the limit at 1 and logs a warning.
RATE_LIMIT=3
# === Admin endpoints (POST /admin/sessions/save, POST /admin/data/wipe,
# DELETE /admin/scenarios/:id, and POST /scenario/store with saveToDisk) ===
# ADMIN_WRITE is the master switch — off (or unset) means these return 403
# regardless of headers. ADMIN_TOKEN is the per-request bearer token; clients
# send it via the `X-Admin-Token` header, compared in constant time. When
# ADMIN_WRITE=true and ADMIN_TOKEN is unset, the routes return 503
# (fail-closed) instead of being open. A /scenario/store without saveToDisk
# (the in-memory store) needs neither. With ADMIN_WRITE=true the dashboard's
# Settings tab shows an Admin Token field: enter ADMIN_TOKEN there and press
# Save. The dashboard keeps it in that browser's localStorage under
# `paracosm:adminToken` and sends it on Wipe All, the scenario delete and
# Save to Disk. Generate a 32-char random secret:
# openssl rand -hex 16
ADMIN_WRITE=false
ADMIN_TOKEN=