Backend Environment Variables
Create a.env file in the backend/ directory with the following variables:
Core Runtime
The port on which the backend server will run.
The Node.js environment. Use
development for local, production for deployed environments.Comma-separated list of allowed CORS origins.Example:
http://localhost:5173,http://localhost:3000,http://localhost:8080Required Keys
Ethereum private key for the deployer/orchestrator wallet. Must start with
0x.API key for Google Gemini AI orchestration. Used to determine which specialist tools to call based on user queries.
Chain & Contract Configuration
The blockchain chain ID.
84532 is Base Sepolia.Human-readable chain name.
RPC endpoint URL for Base Sepolia.
Block explorer URL for transaction verification.
Deployed PolicyVault contract address. Set after running the deployment script.
Deployed Escrow contract address. Set after running the deployment script.
Deployed AgentRegistry contract address. Set after running the deployment script.
USDC token contract address on Base Sepolia.
EURC token contract address on Base Sepolia.
USYC token contract address on Base Sepolia.
Supabase Configuration
Your Supabase project URL.Format:
https://<project>.supabase.coSupabase anonymous/public API key for client connections.
x402 & CDP Configuration
Base URL for x402 protocol endpoints.
URL of the x402 payment facilitator service.
Default budget in USD for x402 session spending limits.
Timeout in milliseconds for x402 initialization.
Private key for Pinion runtime wallet operations.
Network identifier for Pinion runtime.
API URL for Pinion integration.
Optional API key for Pinion authentication.
Coinbase Developer Platform API key ID for wallet provisioning.
Coinbase Developer Platform API key secret.
Secret for encrypting CDP wallet data.
File path for storing CDP wallet registry.
Optional Agent Addresses
Pin specific wallet addresses for each x402 agent:Orchestrator wallet address.
Price Oracle agent wallet address.
Chain Scout agent wallet address.
News Scout agent wallet address.
Yield Optimizer agent wallet address.
Tokenomics Analyzer agent wallet address.
NFT Scout agent wallet address.
Perp Stats agent wallet address.
Policy Controls
Maximum USD spending allowed per day per agent.
Maximum USD spending allowed per individual x402 call.
API key for admin endpoints (freeze/unfreeze agents, policy updates).
Optional External APIs
CoinGecko API key for price data.
Alchemy API key for blockchain data.
Etherscan API key for contract verification and data.
OpenSea API key for NFT data.
Groq API key for additional AI capabilities.
News API Configuration
Primary news API endpoint.
Fallback cache URL for news API.
Timeout in milliseconds for news API requests.
Number of retry attempts for failed news API requests.
Deploy Script Helpers
Agent wallet address used during contract deployment.
Daily spending limit used during PolicyVault deployment (in token base units or ETH notation).
Frontend Environment Variables
Create a.env file in the arc-agent-hub/ directory:
Backend API base URL.Example:
http://localhost:3001Default payment recipient address for provider payments.
Admin wallet address for frontend admin UI features.
Admin API key for client-side admin operations.
All
VITE_* prefixed variables are exposed to browser code. Never include sensitive secrets in frontend environment variables.