Skip to main content
This page documents all environment variables used across ouroborai applications. Required variables are marked with an asterisk (*).

API Server (apps/api/)

Never commit PRIVATE_KEY or ANTHROPIC_API_KEY to version control. The .env file in apps/api/ is excluded by .gitignore.

x402 Payment Variables

The x402 middleware uses these variables for micropayment verification: When REDIS_URL is set, x402 nonces are tracked in Redis with the key pattern arb:nonce:{nonce} and a 24-hour TTL to prevent replay attacks.

Web App (apps/web/)

Both variables use the NEXT_PUBLIC_ prefix because they are accessed in client-side React code.
The web app inlines types from @arb-agent/sdk to avoid importing Node.js-only modules into the browser bundle. The API URL is the only required connection between the web app and the backend.

Telegram Bot (apps/telegram/)


Twitter Bot


CLI


MCP Server (apps/mcp-server/)

The .mcp.json configuration file contains PRIVATE_KEY in plaintext. It is excluded from version control by .gitignore but exercise caution when sharing your project directory.

Redis Key Prefixes

When REDIS_URL is configured, the API server uses these key patterns:

Example .env Files

Copy the .env.example files included in each app directory as a starting point. They list all supported variables with placeholder values.