# ───────────────────────────────────────────────────────────────────────────── # Aigentia environment — copy to .env and fill in. NEVER commit .env. # Every variable below is validated at startup by @aigentia/shared (loadEnv()). # ───────────────────────────────────────────────────────────────────────────── NODE_ENV=development LOG_LEVEL=info # ── Infrastructure ─────────────────────────────────────────────────────────── DATABASE_URL=postgres://postgres:postgres@localhost:5432/aigentia REDIS_URL=redis://localhost:6379 # ── Apps ───────────────────────────────────────────────────────────────────── API_PORT=4000 # Public base URL of the API; paid service endpoints are advertised under it. API_PUBLIC_URL=http://localhost:4000 # Shared secret for /api/admin/* endpoints (create agents, start experiments…) ADMIN_TOKEN=change-me-admin-token # Web app (Next.js) reads this at build/runtime to reach the API. NEXT_PUBLIC_API_URL=http://localhost:4000 NEXT_PUBLIC_XRPL_EXPLORER_URL=https://testnet.xrpl.org # live (default) → read the API above and its SSE stream. # snapshot → serve the recorded Testnet export in apps/web/src/snapshot (used for the Vercel # deployment, where no API is reachable). Clearly labelled; never claims to be live. NEXT_PUBLIC_DATA_MODE=live # ── Simulation ─────────────────────────────────────────────────────────────── # Seconds per tick (default 60). Lower for demos. TICK_SECONDS=60 # SIM_LEDGER selects how economic settlement happens: # testnet → real XRPL Testnet payments (default for the product) # mock → [MOCK] in-process ledger for CI/local dev without network. # Clearly labelled; never use in production. SIM_LEDGER=testnet # Deterministic seed for the world RNG (experiments override this) SIM_SEED=genesis # ── XRPL (Testnet only — Mainnet is intentionally unsupported) ─────────────── XRPL_NETWORK=testnet XRPL_NETWORK_ID=1 # Public Testnet servers (see https://xrpl.org/docs/tutorials/public-servers) # wss://s.altnet.rippletest.net:51233 / https://s.altnet.rippletest.net:51234 # wss://testnet.xrpl-labs.com/ / https://testnet.xrpl-labs.com/ XRPL_WSS_URL=wss://testnet.xrpl-labs.com/ XRPL_RPC_URL=https://testnet.xrpl-labs.com/ XRPL_FAUCET_URL=https://faucet.altnet.rippletest.net/accounts XRPL_EXPLORER_URL=https://testnet.xrpl.org # Wallet provider: # env → seeds injected via XRPL_WALLET_SEEDS (JSON map walletRef → seed) # file → [DEV ONLY] seeds generated on demand via the faucet and stored in # XRPL_WALLET_FILE (git-ignored). Never use in production. XRPL_WALLET_PROVIDER=file XRPL_WALLET_FILE=.aigentia/wallets.dev.json # Example: XRPL_WALLET_SEEDS={"treasury":"sEd...","agt_orion7":"sEd..."} XRPL_WALLET_SEEDS= # Wallet reference that funds new agents / buys resources in the world market TREASURY_WALLET_REF=treasury # ── x402 payment service (services/x402-xrpl, Python/FastAPI) ──────────────── X402_SERVICE_URL=http://localhost:8402 # Shared secret between TypeScript apps and the Python service X402_SERVICE_TOKEN=change-me-x402-internal-token # XRPL SourceTag stamped on every x402 payment (analytics). 804681468 is the # x402-xrpl default; override to tag your own deployment. X402_SOURCE_TAG=804681468 # How long a 402 quote stays payable X402_MAX_TIMEOUT_SECONDS=120 # ── Python service (read by services/x402-xrpl) ───────────────────────────── X402_SERVICE_PORT=8402 X402_FACILITATOR_MODE=local # Optional: point at a hosted x402 XRPL facilitator instead of the embedded one X402_FACILITATOR_URL= # ── LLM (optional — the simulation runs fully without one) ────────────────── # none | anthropic | openai | mock LLM_PROVIDER=none # Empty → claude-fable-5-1 for anthropic. Cheaper for large experiments: claude-haiku-4-5-20251001. LLM_MODEL= ANTHROPIC_API_KEY= OPENAI_API_KEY= # ── Default budget policy for new agents (drops; 1 XRP = 1,000,000 drops) ─── POLICY_MAX_SPEND_PER_ACTION_DROPS=500000 POLICY_MAX_SPEND_PER_HOUR_DROPS=3000000 POLICY_MAX_DAILY_SPEND_DROPS=8000000 POLICY_MINIMUM_BALANCE_DROPS=1500000 # Dedicated database for the Postgres-backed engine test (never the dev world). Optional. DATABASE_URL_TEST=postgres://postgres:postgres@localhost:5432/aigentia_test