This guide covers wallet configuration, spending limits, RPC endpoints, and advanced settings for your Miko402 deployment.
Configuration Overview
What you'll configure:
Environment variables and API keys
Wallet connections and RPC endpoints
Spending limits and safety controls
Time required: 10β15 minutes
Environment Variables
All configuration lives in .env.local. This file is gitignoredβnever commit API keys to version control.
Create Your Config File
Copy cp .env.example .env.local Required Variables
Important: No quotes around values. No spaces before or after =.
Optional Variables
RPC Endpoint Configuration
Your RPC endpoint determines which blockchain network Miko uses and how quickly transactions process.
Free Public RPCs
Solana Devnet (Testing):
Free and suitable for testing
Not recommended for production
Solana Mainnet (Production):
May experience slowdowns during peak usage
Premium RPC Providers
For production workloads, premium RPCs deliver better reliability and performance.
Helius (Recommended for Solana)
Fastest Solana RPC with 99.9% uptime SLA, built-in analytics, and a generous free tier. Get a Helius API key βarrow-up-right
Global infrastructure with high rate limits and enterprise-grade reliability. Get a QuickNode endpoint βarrow-up-right
Excellent documentation, webhook support, and a generous free tier. Get an Alchemy key βarrow-up-right
Multi-Chain Setup
Configure multiple chains for flexibility:
Miko automatically selects the optimal chain based on service requirements and cost.
Spending Limits
Spending limits are critical for safety. Configure them before making any payments.
Recommended Starter Limits
Tier
Daily
Weekly
Monthly
Use Case
Start conservative, scale up gradually.
How Limits Work
Limits reset automatically on a rolling basisβdaily every 24 hours, weekly every 7 days, monthly every 30 days.
Configuring Limits
Limits are configured per-wallet through smart contracts:
These limits are enforced on-chain for maximum securityβthey cannot be bypassed programmatically.
AI Model Configuration
Model Selection
Miko402 uses Google Gemini 2.0 Flash for optimal speed and cost:
Why Gemini 2.0 Flash:
Fastest response times in its class
Cost-effective for high-frequency payment processing
Sufficient reasoning capability for service discovery and payment logic
Built-in web search capabilities
Custom System Prompt
Override Miko's default behavior with a custom prompt in .env.local:
Applications for custom prompts:
Enterprise compliance requirements
Industry-specific service focus
Adjusted interaction style
Temperature & Token Settings
Control response creativity and length:
Payment-focused applications: Lower temperature (0.3β0.5) for consistency
Exploratory use cases: Higher temperature (0.7β0.9) for variety
Wallet Configuration
Supported Wallets
Browser Extensions:
Phantom (Solana native, recommended)
MetaMask (most widely used)
Mobile Wallets:
Hardware Wallets:
Ledger (via Phantom/MetaMask)
Multi-Wallet Strategy
Consider separating wallets by purpose:
Testing Wallet β Small amounts, devnet testing
Operational Wallet β Regular autonomous payments
Cold Storage β Large holdings, no Miko access
Wallet Security
Do:
Use hardware wallets for significant amounts
Enable biometric/password locks
Store seed phrases offline
Use a dedicated wallet for autonomous payments
Don't:
Store seed phrases digitally
Share screen with seed phrase visible
Use the same wallet for everything
Keep large amounts in hot wallets
Advanced Configuration
Custom Gas Settings
Adjust the cooldown between requests:
Timeout Configuration
Vercel platform limits:
Multi-Chain Routing
Configure automatic chain selection priority:
Testing Your Configuration
1. Environment Check
2. Wallet Connection Test
Verify your wallet address appears
3. RPC Endpoint Test
4. Payment Test
Get devnet SOL from the faucet
Request a small service (0.001 SOL)
Check transaction on the block explorer
Configuration Checklist
Before going live:
Common Configuration Issues
Environment Variables Not Loading
Restart the dev server (Ctrl+C, then npm run dev)
Clear the .next cache: rm -rf .next
Verify the file is named .env.local (not .env)
Invalid API Key
Check for typos in .env.local
Ensure no quotes around the key value
Regenerate the key if necessary
RPC Connection Failed
Test the endpoint with curl (see above)
Check that your firewall isn't blocking the connection
Verify the API key is correct (for premium RPCs)
Fall back to the public RPC temporarily
Spending Limits Not Enforced
Verify the smart contract deployment
Check that your wallet has approved the contract
Confirm limits are set on-chain
Re-deploy contracts if needed
Configuration complete? Move on to Making Your First Payment β
Last updated 13 hours ago