βš™οΈConfiguration

Time to set up Yuki like a pro. This guide covers wallet configuration, spending limits, RPC endpoints, and advanced settings to get the most out of your autonomous payment agent.

🎯 Configuration Overview

What you'll configure:

  • Environment variables and API keys

  • Wallet connections and RPC endpoints

  • Spending limits for safety

  • AI model settings

  • Advanced payment options

Time required: 10-15 minutes

πŸ”‘ Environment Variables

All configuration happens in .env.local. This file is gitignored for securityβ€”never commit API keys!

Create Your Config File

cp .env.example .env.local

Required Variables

Open .env.local and configure these required settings:

Pro tip: NO quotes around values. NO spaces before/after =.

Optional Variables

🌐 RPC Endpoint Configuration

Your RPC endpoint determines which blockchain network Yuki uses and how fast transactions process.

Free Public RPCs

Solana Devnet (Testing):

  • βœ… Free

  • βœ… Perfect for testing

  • βœ… Get free devnet SOL from faucetarrow-up-right

  • ❌ Not for production

Solana Mainnet (Production):

  • βœ… Free

  • ⚠️ Rate limited

  • ⚠️ Can be slow during peak times

  • ⚠️ May have downtime

For serious usage, premium RPCs are worth it:

Why Helius:

  • πŸš€ Fastest Solana RPC

  • πŸ’Ž 99.9% uptime SLA

  • πŸ“Š Built-in analytics

  • πŸ†“ Generous free tier

Get Helius API keyarrow-up-right

QuickNode

Why QuickNode:

  • 🌍 Global infrastructure

  • πŸ“ˆ High rate limits

  • πŸ”§ Advanced features

  • πŸ’Ό Enterprise-ready

Get QuickNode endpointarrow-up-right

Alchemy

Why Alchemy:

  • πŸ—οΈ Built for developers

  • πŸ“š Excellent documentation

  • πŸ”” Webhooks and notifications

  • πŸ†“ Generous free tier

Get Alchemy keyarrow-up-right

Multi-Chain Setup

Configure multiple chains for flexibility:

Yuki will automatically choose the best chain based on service requirements and cost.

πŸ’Ž Spending Limits

Critical for safety. Set these before making any payments.

Golden rule: Start conservative, scale up gradually.

How Limits Work

Limits reset automatically:

  • Daily: Every 24 hours

  • Weekly: Every 7 days

  • Monthly: Every 30 days

Configuring Limits

Limits are configured per-wallet through smart contracts:

Important: These limits are enforced on-chain via smart contracts for maximum security.

πŸ€– AI Model Configuration

Customize Yuki's AI behavior and capabilities.

Model Selection

Currently using Google Gemini 2.0 Flash for optimal speed and cost:

Why Gemini 2.0 Flash:

  • ⚑ Fastest response times

  • πŸ’° Most cost-effective

  • 🧠 Smart enough for payment processing

  • πŸ” Built-in web search capabilities

Custom System Prompt

Override Yuki's default behavior with custom prompts in .env.local:

Use cases for custom prompts:

  • Enterprise compliance requirements

  • Specific industry focus (DeFi, NFTs, etc.)

  • Additional safety checks

  • Custom personality adjustments

Temperature & Token Settings

Control response creativity and length:

Adjust for your needs:

  • Financial apps: Lower temperature (0.3-0.5) for consistency

  • Creative use cases: Higher temperature (0.7-0.9) for variety

  • Quick responses: Lower maxTokens (1000-2000)

  • Detailed analysis: Higher maxTokens (4000-8000)

πŸ”— Wallet Configuration

Supported Wallets

Yuki works with all major Web3 wallets:

Browser Extensions:

  • MetaMask (Most popular)

  • Phantom (Solana native)

  • Coinbase Wallet

  • Brave Wallet

Mobile Wallets:

  • MetaMask Mobile

  • Phantom Mobile

  • Trust Wallet

  • Coinbase Wallet Mobile

Hardware Wallets:

  • Ledger (via MetaMask/Phantom)

  • Trezor (via MetaMask)

Multi-Wallet Setup

Pro tip: Use different wallets for different purposes:

  1. Testing Wallet - Small amounts, devnet testing

  2. Main Wallet - Regular autonomous payments

  3. Cold Storage - Large holdings, rarely accessed

Wallet Security Best Practices

πŸš€ Advanced Configuration

Custom Gas Settings

Optimize for speed or cost:

Rate Limiting

Adjust cooldown between requests:

Consider:

  • API rate limits

  • Cost management

  • User experience

Timeout Configuration

Set maximum request duration:

Vercel limits:

  • Hobby: 10 seconds

  • Pro: 60 seconds

  • Enterprise: 900 seconds

Multi-Chain Routing

Configure automatic chain selection:

πŸ§ͺ Testing Your Configuration

1. Environment Check

2. Wallet Connection Test

  1. Open app

  2. Click "Connect Wallet"

  3. Approve connection

  4. Verify wallet address appears

3. RPC Endpoint Test

4. Small Payment Test

  1. Connect devnet wallet

  2. Get devnet SOL from faucet

  3. Request small service (0.001 SOL)

  4. Verify payment completes

  5. Check transaction on explorer

πŸ“Š Configuration Checklist

Before going live, verify:

πŸ› Common Configuration Issues

Environment Variables Not Loading

Problem: Config changes don't take effect

Solution:

  1. Restart dev server (Ctrl+C, then npm run dev)

  2. Clear .next cache: rm -rf .next

  3. Verify file is named .env.local (not .env)

Invalid API Key

Problem: 401 Unauthorized from OpenRouter

Solution:

  1. Check for typos in .env.local

  2. Ensure no quotes around key value

  3. Regenerate key if necessary

RPC Connection Failed

Problem: "Failed to connect to Solana"

Solution:

  1. Test endpoint with curl (see above)

  2. Check firewall isn't blocking

  3. Verify API key is correct (for premium RPCs)

  4. Try fallback to public RPC

Spending Limit Not Working

Problem: Limits aren't enforced

Solution:

  1. Verify smart contract deployment

  2. Check wallet has approved contract

  3. Confirm limits are set on-chain

  4. Re-deploy contracts if needed

πŸ†˜ Need Help?

Configuration Questions:

Still stuck?


Configuration complete? Move on to Making Your First Payment β†’

Last updated