FORGE Header

Quickstart

Configuration

Configure Forge for your specific needs

Environment Variables

Forge uses environment variables for configuration. Create a .env.local file in your project root:

# Required: OpenAI API Key for AI Agent OPENAI_API_KEY=sk-your-openai-api-key # Optional: Custom Solana RPC Endpoint NEXT_PUBLIC_SOLANA_RPC_URL=https://api.mainnet-beta.solana.com # Optional: Solana Network (mainnet-beta, devnet, testnet) NEXT_PUBLIC_SOLANA_NETWORK=mainnet-beta # Optional: Private Key for Server-Side Operations SOLANA_PRIVATE_KEY=your_base58_encoded_private_key # Optional: Custom OpenAI Model OPENAI_MODEL=gpt-4 # Optional: OpenAI Organization ID OPENAI_ORGANIZATION_ID=org-your-org-id

🔒 Security Warning

Never commit .env.local to version control. Add it to your .gitignore file. Never share your private keys or API keys publicly.

Configuration Options

OpenAI Configuration

OPENAI_API_KEYYour OpenAI API key (required)
OPENAI_MODELModel to use (default: gpt-4)
OPENAI_ORGANIZATION_IDOrganization ID (optional)

Solana Configuration

NEXT_PUBLIC_SOLANA_RPC_URLRPC endpoint URL
NEXT_PUBLIC_SOLANA_NETWORKNetwork: mainnet-beta, devnet, testnet
SOLANA_PRIVATE_KEYBase58 private key for agent operations

Network Selection

Forge supports multiple Solana networks:

Mainnet Beta

Production network with real SOL and assets.

NEXT_PUBLIC_SOLANA_NETWORK=mainnet-beta

Devnet

Development network with free test SOL.

NEXT_PUBLIC_SOLANA_NETWORK=devnet

Testnet

Testing network for final validation.

NEXT_PUBLIC_SOLANA_NETWORK=testnet

Custom RPC Endpoints

For better performance and rate limits, consider using a custom RPC provider:

Helius

High-performance RPC with generous free tier

helius.dev →

QuickNode

Enterprise-grade infrastructure

quicknode.com →

Alchemy

Reliable with advanced features

alchemy.com →

Syndica

Optimized for Solana

syndica.io →

Getting API Keys

OpenAI API Key

  1. Visit platform.openai.com
  2. Sign up or log in to your account
  3. Navigate to API Keys section
  4. Create a new secret key
  5. Copy and save it securely

Solana Private Key (Optional)

For server-side agent operations, you can provide a private key. Generate one using:

solana-keygen new