Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
env: document the 52 vars that were referenced in api/ but missing from .env.example
nirholasa6d8c09a0a35
diff --git a/.env.example b/.env.exampleindex 93ae595f8..95d04caf7 100644--- a/.env.example+++ b/.env.example@@ -442,3 +442,247 @@ THREEWS_SOL_PARENT_DOMAIN=threews.sol# Brave's SNS resolver follows this URL when a user types `<label>.threews.sol`.# Default: https://three.ws.STOREFRONT_ORIGIN=https://three.ws++# ── Session + CSRF (server) ──────────────────────────────────────────────────+# Salt used to derive purchase-receipt keys and other internal HMACs. Falls+# back to the literal string "dev" if unset — that fallback is FINE in dev,+# CATASTROPHIC in prod (every install would share the same receipt namespace).+# Generate: openssl rand -base64 64+SESSION_SECRET=++# Escape hatch for CSRF enforcement on mutating endpoints. Set to "1" to+# disable for local automation / test harnesses. Leave UNSET in production —+# bearer-token requests are already exempt because the token itself proves+# intent (cookies aren't auto-attached on bearer requests).+CSRF_DISABLED=++# Generic bearer secret used by webhook handlers that don't have a provider-+# specific signing scheme (currently /api/webhooks/solana-pay). Senders must+# include `Authorization: Bearer $WEBHOOK_SECRET`. When unset, those webhooks+# reject every request.+# Generate: openssl rand -base64 32+WEBHOOK_SECRET=++# Legacy alias for PUBLIC_APP_ORIGIN used by api/_lib/email.js and a few+# auth callbacks. Always set BOTH to the same value during transition; the+# alias will be removed in a future cleanup pass.+APP_ORIGIN=https://three.ws++# ── Cron protection ──────────────────────────────────────────────────────────+# Shared secret expected as `Authorization: Bearer $CRON_SECRET` on calls to+# /api/cron/*. Vercel cron requests bypass this check via the `x-vercel-cron`+# header, so the secret only matters for manual / external invocation. Without+# it, only the Vercel platform can fire cron jobs.+# Generate: openssl rand -base64 32+CRON_SECRET=++# ── Upstash QStash (async work queue) ────────────────────────────────────────+# Powers async knowledge ingest at /api/widgets/:id/knowledge-process. Without+# QSTASH_TOKEN the publisher disables itself silently and large PDFs/URLs fall+# back to inline processing (slower, risk of timeout on Vercel's 60s limit).+# QSTASH_CURRENT_SIGNING_KEY is required to verify the worker's incoming+# webhook signature — calls without a valid signature are rejected.+# Get keys at https://console.upstash.com → QStash.+QSTASH_TOKEN=+QSTASH_CURRENT_SIGNING_KEY=+QSTASH_NEXT_SIGNING_KEY=++# ── Payments / fees / treasury wiring ────────────────────────────────────────+# Recipient wallets for /api/payments/* checkout sessions. Set per-chain EVM+# overrides as PAYMENT_RECIPIENT_EVM_<chainId> (e.g. PAYMENT_RECIPIENT_EVM_8453)+# to route Base payments to a different treasury than other EVM chains.+PAYMENT_RECIPIENT_EVM=+PAYMENT_RECIPIENT_SOLANA=++# Platform fee charged on creator earnings, in basis points (100 bps = 1%).+# Default 250 (2.5%). Validated to 0–10000 inclusive.+PLATFORM_FEE_BPS=250++# Referral commission paid out on confirmed purchases when the buyer arrived+# via a referral link, in basis points. Default 500 (5%).+REFERRAL_COMMISSION_BPS=500++# Optional override for purchase-receipt HMAC key. When unset, derived from+# SESSION_SECRET via sha256(SESSION_SECRET + ':receipts'). Rotate by setting+# this to a fresh secret — old receipts will fail to verify.+PURCHASE_RECEIPT_KEY=++# Override the Solana USDC mint (default = mainnet USDC). Used by the+# /api/payments price builder and the Solana fee-payer logic.+SOLANA_USDC_MINT=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v++# ── Solana / EVM RPC overrides (additional) ──────────────────────────────────+# Primary Solana RPCs (mainnet + devnet). Public endpoints rate-limit hard —+# set Helius / Triton / QuickNode URLs for production. SOLANA_MAINNET_RPC is+# an older alias still read by a few signing routes; mirror SOLANA_RPC_URL.+SOLANA_MAINNET_RPC=+# Comma-separated list of fallback RPC URLs tried in order on primary failure.+# Used by api/_lib/solana/rpc-fallback.js.+SOLANA_RPC_FALLBACK_URLS=++# Per-chain RPC aliases consulted by /api/permissions/[action] when the+# canonical RPC_URL_<chainId> isn't set. Useful when sharing env across the+# permissions relayer and a separate test runner.+BASE_SEPOLIA_RPC_URL=+SEPOLIA_RPC_URL=++# Alchemy multichain key — used by /api/scene/gate-check for token-balance+# gates that need a paid RPC tier. Without it gate-check returns 503.+# Get a key at https://dashboard.alchemy.com.+ALCHEMY_API_KEY=++# Solana RPC override for the AgenC partnership endpoints (api/agenc/*).+# Falls back to SOLANA_RPC_URL when unset.+AGENC_RPC_URL=++# ── Treasury + relayer signing keys ──────────────────────────────────────────+# DANGER: these wallets hold real funds. Never share, never commit. Rotate+# via Vercel env vars only. Each is loaded on first use; missing keys cause+# the relevant route to 500 with a clear "<KEY> not configured" message.++# Solana platform treasury for cron buyback / distribution flows. Base58 or+# JSON-array encoded Keypair secret (api/_lib/evm-transfer.js + cron/[name].js).+TREASURY_KEYPAIR=++# Base64-encoded 64-byte Solana keypair for the on-chain coin-launch demo's+# treasury (api/_lib/coin/treasury.js). Leave unset unless you're running the+# coin-launch flow yourself.+COIN_TREASURY_SECRET_KEY_B64=++# Base64-encoded 64-byte Solana keypair used by the Pump.fun buyback cron to+# pay tx fees on behalf of the protocol. Distinct from TREASURY_KEYPAIR.+PUMP_CRON_RELAYER_SECRET_KEY_B64=++# Base58-encoded 64-byte Solana keypair for the agent that signs outbound+# x402 payments from /api/x402-pay. Leave unset if you only RECEIVE x402.+X402_AGENT_SOLANA_SECRET_BASE58=++# Base58-encoded 32-byte Solana secret for the Solana Attestation Service+# authority signer (api/_lib/sas.js). Required by any /api/sas/* route.+SAS_AUTHORITY_SECRET=++# Base58-encoded 64-byte Solana keypair used by the attestation event signer+# (api/_lib/attest-event.js). Required when emitting on-chain reputation+# attestations from cron.+ATTEST_AGENT_SECRET_KEY=++# Hex EVM private key for the treasury wallet that signs cron-driven USDC+# transfers on Base / EVM chains (api/_lib/evm-transfer.js). Required only+# for the cron flows that distribute or sweep on-chain — request-path code+# never touches this key. Fund the derived address with gas tokens.+EVM_TREASURY_PRIVATE_KEY=++# ── Pump.fun integration (additional) ────────────────────────────────────────+# Default agent token mint used by api/_lib/pump-pricing.js when a caller+# doesn't supply one. Unset = no default billing token.+PUMP_DEFAULT_AGENT_MINT=+# Network the MCP dispatch layer assumes for pump tools (mainnet | devnet).+PUMP_DEFAULT_NETWORK=mainnet+# Fallback Solana pubkey to charge when distribute-payments can't determine+# the payer from context. Should match PUMP_CRON_RELAYER_SECRET_KEY_B64's+# derived pubkey in normal operation.+PUMP_DISTRIBUTE_FALLBACK_PAYER=++# Shared secret for the PumpKit-flavoured webhook handler at+# /api/agents/solana/*. Webhooks without a matching `authorization: Bearer+# $PUMPKIT_WEBHOOK_SECRET` return 500.+# Generate: openssl rand -base64 32+PUMPKIT_WEBHOOK_SECRET=++# Redis list key holding the pump.fun graduations stream (defaults to+# "pf:graduations"). Override only when running multiple environments+# against one Upstash instance.+GRADUATIONS_LIST_KEY=pf:graduations++# ── Replicate webhook signing ────────────────────────────────────────────────+# Signing secret from replicate.com/account/webhook to verify model-completion+# callbacks at /api/webhooks/replicate. Without it the endpoint rejects every+# request. The "whsec_" prefix is stripped automatically.+REPLICATE_WEBHOOK_SIGNING_KEY=++# ── Avatar regeneration: self-hosted GCP fallback ───────────────────────────+# Cloud Run / Vertex endpoint that exposes a /reconstruct route accepting+# selfies and returning a textured GLB. Used by the avatar provider auto-+# detection (priority: replicate → gcp → huggingface). Leave unset to skip.+GCP_RECONSTRUCTION_URL=++# ── IPFS pinning (additional) ───────────────────────────────────────────────+# nft.storage token used by /api/erc8004/* when PINATA_JWT and+# WEB3_STORAGE_TOKEN are both empty. Get one at https://nft.storage.+NFT_STORAGE_TOKEN=++# ── LiveKit (real-time voice rooms) ──────────────────────────────────────────+# Powers the agent voice-chat experience at /api/agents/:id/livekit-token.+# Without all three set, the endpoint returns 503 livekit_not_configured.+# Self-host LiveKit Server or use https://livekit.io cloud.+LIVEKIT_API_KEY=+LIVEKIT_API_SECRET=+LIVEKIT_SERVER_URL=++# ── Additional LLM / social keys ─────────────────────────────────────────────+# Google Gemini — surfaced to the browser via /api/gemini-key (the front-end+# voice modal embeds the key for direct Gemini calls). Optional.+# Get a key at https://aistudio.google.com.+GEMINI_API_KEY=++# Neynar (Farcaster) — powers /api/seed/farcaster social-memory seeding.+# Get a key at https://neynar.com.+NEYNAR_API_KEY=++# X (Twitter) — read-only public-data bearer token used by /api/seed/x.+# Get one from https://developer.twitter.com (Read access).+TWITTER_BEARER_TOKEN=++# Telegram bot — used by /api/pump/deliver-telegram to push pump.fun signals+# to subscriber chats. Without it the endpoint 500s.+# Create a bot via https://t.me/BotFather → /newbot.+TELEGRAM_BOT_TOKEN=++# ── x402 spending ledger ─────────────────────────────────────────────────────+# Set to "1" to allow the per-user x402 spending ledger to fall back to an+# in-process Map when Upstash Redis is unreachable. ONLY enable in dev — in+# production this would silently disable spending caps across multiple+# serverless instances.+X402_ALLOW_MEMORY_FALLBACK=++# ── WalletConnect (client-side) ──────────────────────────────────────────────+# Project ID surfaced to the browser via /api/config. Without it, WalletConnect+# QR connections silently fail. Free at https://cloud.walletconnect.com.+VITE_WALLETCONNECT_PROJECT_ID=++# ── Sentry tagging ───────────────────────────────────────────────────────────+# Override the environment label sent with each Sentry event. Defaults to+# VERCEL_ENV ("production" | "preview" | "development"). Set this to a+# custom label (e.g. "staging") when running outside Vercel.+SENTRY_ENVIRONMENT=+# Override the release tag. Defaults to VERCEL_GIT_COMMIT_SHA. Set to your+# build's git SHA or a semver string when running outside Vercel so source+# maps + release health reports line up correctly.+SENTRY_RELEASE=++# ── Tunables ─────────────────────────────────────────────────────────────────+# Subscription charge timeout for the renewal cron (api/cron/[name].js).+# Bounds the time we wait for a skill's onPeriod handler before marking the+# charge attempt failed. Default 30000 ms.+SUBSCRIPTION_CHARGE_TIMEOUT_MS=30000++# Coin-launch demo is gated by an explicit opt-in flag so cron + manual calls+# stay no-ops in any project that doesn't intend to expose it. Set to "true"+# to enable; any other value (including unset) disables.+COIN_DEMO_ENABLED=++# Dust threshold (in atomic USDC units, 6 decimals) below which the club+# sweep cron leaves balances un-distributed. Default 5000 = $0.005. Raise+# during high-gas periods to keep payouts net-positive.+CLUB_SWEEP_DUST_ATOMICS=5000++# Model override for the marketplace preview generator. Falls back to the+# per-provider default when unset (defined in api/marketplace/[action].js).+PREVIEW_MODEL=++# ── Debug toggles (leave unset in prod) ──────────────────────────────────────+# Set DEBUG=true to log knowledge-retrieval failures from widget chat.+DEBUG=+# Set TTS_DEBUG=1 to log every ElevenLabs voice-clone completion (user id,+# voice id, audio byte count). Useful while iterating on the cloning flow.+TTS_DEBUG=