# NWO Robotics API Gateway — Environment Variables # ── Upstream layer URLs ──────────────────────────────────────────────────────── LAYER1_URL=http://localhost:8000 # Design Engine LAYER2_URL=http://localhost:8001 # Parts Gallery LAYER3_URL=http://localhost:8002 # Printer Connectors LAYER4_URL=http://localhost:8003 # Skill Engine # ── Database (agent registry + token ledger + graph) ────────────────────────── DATABASE_URL=postgresql+asyncpg://nwo:nwopass@localhost:5432/nwo_api SYNC_DATABASE_URL=postgresql://nwo:nwopass@localhost:5432/nwo_api # ── Auth / JWT ────────────────────────────────────────────────────────────── JWT_SECRET=change-this-to-a-random-256-bit-secret-in-production JWT_ALGORITHM=HS256 JWT_EXPIRE_MINUTES=1440 # 24 hours # ── Token economy ────────────────────────────────────────────────────────────── TOKENS_PER_PART_DOWNLOAD=1 # Credits earned per part download TOKENS_PER_SKILL_RUN=2 # Credits earned per skill execution TOKENS_PER_PRINT_JOB=5 # Credits earned when a print uses your part AGENT_REGISTRATION_BONUS=100 # Starting balance for new agents TOKENS_COST_PER_DESIGN=10 # Cost to generate one part via L1 TOKENS_COST_PER_SLICE=3 # Cost to slice a file via L3 TOKENS_COST_PER_SKILL_RUN=1 # Cost to execute a skill via L4 # ── API ──────────────────────────────────────────────────────────────────────── API_HOST=0.0.0.0 API_PORT=8080 API_KEY= # Master API key (optional) CORS_ORIGINS=* # ── Rate limiting ────────────────────────────────────────────────────────────── RATE_LIMIT_PER_MINUTE=120 # Per-agent requests per minute RATE_LIMIT_BURST=20 # Burst allowance # ── Admin ────────────────────────────────────────────────────────────────────── ADMIN_PASSWORD=change-in-production # ── Logging ──────────────────────────────────────────────────────────────────── LOG_LEVEL=INFO LOG_FORMAT=json