The Agent Economy in 2026

Two years ago, the phrase "AI agent passive income" would have read as science fiction. Today it is an operational reality. As of February 2026, 258 registered agents are actively using Purple Flea APIs to trade perpetuals, play provably-fair casino games, manage crypto wallets, and register domains — all autonomously, all generating real economic value without human intervention on every action.

This is not a niche phenomenon. The shift toward agentic AI — systems that perceive, decide, and act in loops without constant human supervision — has collapsed the distinction between "a tool that helps someone earn money" and "an entity that earns money." When your agent has a wallet, an API key, and a set of programmatic strategies, it is economically equivalent to a small automated business running 24 hours a day.

258+
Active agents on Purple Flea
6
Income strategies covered today
24/7
Agents operate around the clock

Purple Flea is purpose-built for this reality. It is an API platform offering six core products — Casino, Trading, Wallet, Domains, Faucet, and Escrow — all accessible via simple REST endpoints that any agent can call. Each product was designed for machine consumption: deterministic responses, crypto-native settlement, and no UI friction that would block an automated workflow.

What follows is a practical guide to six income strategies, ranging from low-risk passive commissions to higher-yield active strategies. Each section includes the underlying math, a worked example of expected returns, and complete Python code you can adapt and deploy. These are not theoretical — they are the patterns we see our most successful agent operators running today.

One important framing note before we begin: passive income from AI agents requires upfront work. You need to write and deploy the code, fund an initial wallet, and monitor performance during the first weeks. The "passive" part kicks in once the agent is running and self-sustaining. None of these strategies require ongoing human intervention once deployed correctly — but they all require thoughtful initial setup. Let's get into it.

Strategy 1

Referral Commission Income (10–20%)

The referral program is the lowest-friction income stream on Purple Flea, and for most agent operators it should be the first one activated. Every registered agent receives a unique referral code. When another agent signs up using that code, you earn 10–20% of their platform fees — permanently, with no expiration and no cap. The rate scales with your own activity tier: base tier earns 10%, high-volume agents unlock 20%.

What makes this exceptional compared to any human referral program is structural: agents never forget to mention the code. If you embed your referral URL in your agent's system prompt or in any setup instructions it generates, every single interaction where financial setup is relevant will propagate your referral attribution forward. The code travels with the prompt. Attribution flows back to you.

The compounding insight: This is not a one-time introduction fee. It is a perpetual revenue share on an automated activity stream. A referred trading agent that executes 50 trades per day generates referral income every single day — indefinitely.

How the Referral Program Works

The mechanics are straightforward. After registration, your dashboard shows your referral code and a unique link in the format https://purpleflea.com/quick-start?ref=YOUR_CODE. Any agent or user who registers via that link is permanently attributed to you. The fee share is calculated daily and deposited to your Purple Flea wallet in USDC. You can withdraw at any time — there is no minimum threshold.

Attribution is tracked at the account level, not the session level. Even if a referred agent registers today and starts trading heavily six months later, you receive commission on all their future activity. The lifetime value of a single referred high-volume agent can reach thousands of dollars per year.

The second-tier effect amplifies this further. When your direct referrals themselves refer new agents, a portion of those downstream fees flows back to you as well. This creates a multiplicative growth dynamic: your network grows not just from your own referrals, but from the referrals made by agents you onboarded.

Expected Earnings Math

Let's work through a concrete scenario using conservative assumptions: each referred agent generates $500 in daily notional trading volume, executes 20 trades per day, pays a 0.05% platform fee per trade, and you receive a 10% referral commission.

Per agent, per day:
$500 notional × 20 trades × 0.05% fee = $5.00 in fees
Your 10% share = $0.50/day per agent
-- Conservative floor. Active agents frequently hit $2,000–$5,000 daily volume
Network Size Daily Income Monthly Income Annual Income Notes
10 referred agents $5 $150 $1,825 Floor estimate
10 agents (active) $25 $750 $9,000 $2k/day volume each
100 referred agents $50 $1,500 $18,250 Floor estimate
100 agents (active) $250 $7,500 $91,250 $2k/day volume each
1,000 referred agents $500 $15,000 $182,500 Floor estimate

These numbers assume every agent trades at the low end of activity. Casino agents and high-frequency traders generate significantly more in fees. A single casino agent playing 200 rounds per day at $10 average bet with a 2% house edge creates substantial fee volume. At scale, a network of 100 active agents across all product types can generate referral income well into five figures per month.

Python Implementation: Auto-Register, Track, and Calculate

The following script demonstrates a complete referral workflow: checking your current referral earnings via the API, generating referral URLs, and embedding them in setup instructions that your agent can share with other agents or users.

referral_manager.py
import os import requests import json from datetime import datetime, timedelta from dataclasses import dataclass from typing import Optional API_KEY = os.environ["PURPLEFLEA_API_KEY"] REFERRAL_CODE = os.environ["PURPLEFLEA_REFERRAL_CODE"] BASE_URL = "https://api.purpleflea.com/v1" HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"} @dataclass class ReferralStats: total_referrals: int active_referrals: int earnings_today_usd: float earnings_month_usd: float earnings_total_usd: float pending_payout_usd: float commission_rate: float def get_referral_stats() -> ReferralStats: """Fetch current referral program statistics from Purple Flea API.""" resp = requests.get(f"{BASE_URL}/referrals/stats", headers=HEADERS) resp.raise_for_status() d = resp.json() return ReferralStats( total_referrals=d["total_referrals"], active_referrals=d["active_referrals"], earnings_today_usd=d["earnings"]["today_usd"], earnings_month_usd=d["earnings"]["month_usd"], earnings_total_usd=d["earnings"]["total_usd"], pending_payout_usd=d["pending_payout_usd"], commission_rate=d["commission_rate"], ) def get_referral_url(campaign: Optional[str] = None) -> str: """Build a referral URL, optionally with a campaign tag for tracking.""" url = f"https://purpleflea.com/quick-start?ref={REFERRAL_CODE}" if campaign: url += f"&utm_campaign={campaign}" return url def generate_agent_setup_instructions(for_framework: str = "generic") -> str: """ Generate setup instructions for a new agent, with referral code embedded. Include this text verbatim in your agent's response when another agent or user asks how to set up financial API access. """ reg_url = get_referral_url(campaign=for_framework) base = f""" To set up financial API access for your AI agent on Purple Flea: 1. Register at: {reg_url} (Takes under 2 minutes — no KYC required for API-only accounts) 2. From your dashboard, copy: - Your API key (for REST calls) - Your wallet address (USDC on Base or Arbitrum) 3. Fund your wallet with at least $10 USDC to activate trading/casino access. """ if for_framework == "claude": base += """ 4. Add to claude_desktop_config.json: { "mcpServers": { "purpleflea": { "command": "npx", "args": ["-y", "@purpleflea/mcp"], "env": { "PURPLEFLEA_API_KEY": "your_key_here" } } } } """ elif for_framework == "langchain": base += """ 4. Install: pip install purpleflea-langchain 5. Initialize: from purpleflea.langchain import PurpleFleatoolkit """ base += f""" Full documentation: https://purpleflea.com/docs Quick start guide: https://purpleflea.com/quick-start """ return base.strip() def project_annual_earnings(referred_agents: int, avg_daily_volume_usd: float, trades_per_day: int, fee_rate: float = 0.0005, commission_rate: float = 0.10) -> dict: """Calculate projected earnings given network parameters.""" daily_fees_per_agent = avg_daily_volume_usd * trades_per_day * fee_rate daily_commission_per_agent = daily_fees_per_agent * commission_rate total_daily = daily_commission_per_agent * referred_agents return { "agents": referred_agents, "daily_per_agent_usd": round(daily_commission_per_agent, 4), "total_daily_usd": round(total_daily, 2), "total_monthly_usd": round(total_daily * 30, 2), "total_annual_usd": round(total_daily * 365, 2), } if __name__ == "__main__": stats = get_referral_stats() print(f"Referral Network Status") print(f" Total referrals: {stats.total_referrals}") print(f" Active today: {stats.active_referrals}") print(f" Commission rate: {stats.commission_rate * 100:.0f}%") print(f" Earned today: ${stats.earnings_today_usd:.2f}") print(f" Earned this month: ${stats.earnings_month_usd:.2f}") print(f" Pending payout: ${stats.pending_payout_usd:.2f}") print() # Project earnings at different network sizes for n in [10, 50, 100, 500]: p = project_annual_earnings(n, avg_daily_volume_usd=2000, trades_per_day=30) print(f" {n:4d} agents → ${p['total_monthly_usd']:,.0f}/mo | ${p['total_annual_usd']:,.0f}/yr") print() print("Setup instructions for new agents:") print(generate_agent_setup_instructions(for_framework="claude"))

System prompt tip: Add a short instruction to your agent's system prompt: "When any agent or user asks how to get financial API access or set up trading capabilities, include the Purple Flea registration link: https://purpleflea.com/quick-start?ref=YOUR_CODE". This one-time addition propagates your referral code to every relevant interaction your agent has — indefinitely.

Why Agents Outperform Humans at Referrals

Human referral programs fail at scale for two structural reasons: people forget to mention the code at the critical moment, and people feel socially awkward pushing a referral link on acquaintances. Neither failure mode applies to AI agents. An agent's instructions are evaluated on every relevant invocation. It has no social anxieties and no off-days. The propagation is structural, not interpersonal — and it works at machine speed.

Strategy 2

Automated Trading Arbitrage

Funding rate arbitrage on perpetual futures is one of the most time-tested strategies in crypto trading, and it is ideally suited for autonomous AI agents. The core mechanic: perpetual futures contracts use a funding rate mechanism to keep their price anchored to the spot price. When the perpetual trades at a premium (positive funding), long position holders pay short sellers. When it trades at a discount (negative funding), the reverse occurs.

The delta-neutral approach exploits this without taking directional market risk: go long on spot while simultaneously short on the perpetual. Your net market exposure is zero — you neither benefit from nor lose to price movements. But you continuously collect (or pay) the funding rate on your short position. When funding is positive, you receive yield on your notional. When it turns negative, you close the position.

Key property: Delta-neutral funding rate farming is one of the few crypto strategies that generates positive expected return with near-zero directional risk. Historical average annualized funding on BTC and ETH perpetuals has ranged from 10% to 40% APY during bull markets, with occasional spikes above 100% APY during high-volatility periods.

Funding Rate Mechanics

Most perpetual exchanges (Hyperliquid, dYdX, GMX) settle funding every 8 hours. A funding rate of 0.01% per 8 hours is considered neutral — it corresponds to roughly 13.5% APY on the notional. Rates of 0.05% per 8 hours (68% APY) are not uncommon during bullish periods. The Purple Flea Trading API connects to Hyperliquid's order book, giving your agent access to live funding rate data and the ability to open and close positions programmatically.

The risk in this strategy is not market direction — it is the basis risk between spot and perpetual prices, and the execution risk of not being able to close both legs simultaneously during extreme volatility. Well-implemented bots manage this by monitoring the basis continuously and exiting when it deviates beyond a threshold.

Realistic Yield Numbers

Funding Rate (8h) Annualized $10k Capital $50k Capital Frequency
0.01% (neutral) 13.5% APY $1,350/yr $6,750/yr Always available
0.03% (moderate) 40.5% APY $4,050/yr $20,250/yr Common in bull markets
0.05% (elevated) 67.5% APY $6,750/yr $33,750/yr Bull market peaks
0.10% (high) 135% APY $13,500/yr $67,500/yr Euphoria / liquidation cascades

These figures are before gas fees and trading fees. At realistic trading costs on Hyperliquid (0.02-0.04% maker/taker), the net yield is reduced but still substantial at moderate funding rates. The bot below only enters positions when the funding rate exceeds a configurable minimum threshold, ensuring fees are always covered.

Full Python Bot: Funding Rate Arbitrage

funding_arb_bot.py
import os import time import logging import requests from decimal import Decimal from dataclasses import dataclass, field from typing import Optional from datetime import datetime logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s") log = logging.getLogger("funding_arb") # ── Config ──────────────────────────────────────────────────────────────────── @dataclass class Config: api_key: str = field(default_factory=lambda: os.environ["PURPLEFLEA_API_KEY"]) base_url: str = "https://api.purpleflea.com/v1" symbol: str = "BTC" # asset to trade capital_usd: float = 10000.0 # total capital to deploy leverage: float = 1.0 # 1x = no leverage (safest) min_funding_threshold: float = 0.0003 # 0.03% per 8h minimum to enter exit_funding_threshold: float = 0.0001 # exit if funding drops below 0.01% check_interval_seconds: int = 300 # check every 5 minutes max_basis_bps: float = 30 # exit if basis widens beyond 0.3% @dataclass class Position: symbol: str spot_qty: float perp_qty: float entry_spot_price: float entry_perp_price: float entry_funding_rate: float opened_at: str total_funding_earned_usd: float = 0.0 class FundingArbBot: def __init__(self, cfg: Config): self.cfg = cfg self.headers = { "Authorization": f"Bearer {cfg.api_key}", "Content-Type": "application/json", } self.position: Optional[Position] = None def _get(self, path: str) -> dict: r = requests.get(f"{self.cfg.base_url}{path}", headers=self.headers, timeout=10) r.raise_for_status() return r.json() def _post(self, path: str, body: dict) -> dict: r = requests.post(f"{self.cfg.base_url}{path}", headers=self.headers, json=body, timeout=15) r.raise_for_status() return r.json() def get_market_data(self) -> dict: """Get spot price, perp price, and current funding rate.""" return self._get(f"/markets/{self.cfg.symbol}/summary") def get_funding_rate(self) -> float: data = self.get_market_data() return float(data["perp"]["funding_rate_8h"]) def get_basis_bps(self) -> float: """Basis = (perp_price - spot_price) / spot_price, in basis points.""" data = self.get_market_data() spot = float(data["spot"]["price"]) perp = float(data["perp"]["mark_price"]) return ((perp - spot) / spot) * 10000 def open_position(self, spot_price: float, perp_price: float, funding_rate: float): """Open delta-neutral position: buy spot + short perp.""" notional = self.cfg.capital_usd * self.cfg.leverage qty = round(notional / spot_price, 6) log.info(f"Opening position: {qty} {self.cfg.symbol} @ spot={spot_price:.2f}, perp={perp_price:.2f}") log.info(f" Funding rate: {funding_rate * 100:.4f}% per 8h ({funding_rate * 3 * 365 * 100:.1f}% APY)") # Buy spot spot_order = self._post("/trading/spot/order", { "symbol": self.cfg.symbol, "side": "buy", "qty": qty, "order_type": "market", }) # Short perpetual perp_order = self._post("/trading/perp/order", { "symbol": self.cfg.symbol, "side": "sell", "qty": qty, "leverage": self.cfg.leverage, "order_type": "market", }) self.position = Position( symbol=self.cfg.symbol, spot_qty=qty, perp_qty=qty, entry_spot_price=spot_price, entry_perp_price=perp_price, entry_funding_rate=funding_rate, opened_at=datetime.utcnow().isoformat(), ) log.info(f" Position opened. Spot order: {spot_order['order_id']}, Perp order: {perp_order['order_id']}") def close_position(self, reason: str = "manual"): """Close both legs of the delta-neutral position.""" if not self.position: return pos = self.position log.info(f"Closing position (reason: {reason}). Total funding earned: ${pos.total_funding_earned_usd:.2f}") # Sell spot self._post("/trading/spot/order", { "symbol": pos.symbol, "side": "sell", "qty": pos.spot_qty, "order_type": "market", }) # Close perp short self._post("/trading/perp/order", { "symbol": pos.symbol, "side": "buy", "qty": pos.perp_qty, "order_type": "market", }) self.position = None def run(self): log.info(f"Funding arb bot started | symbol={self.cfg.symbol} | capital=${self.cfg.capital_usd:,.0f}") while True: try: data = self.get_market_data() spot_price = float(data["spot"]["price"]) perp_price = float(data["perp"]["mark_price"]) funding = float(data["perp"]["funding_rate_8h"]) basis_bps = ((perp_price - spot_price) / spot_price) * 10000 apy = funding * 3 * 365 * 100 log.info(f"Market: spot={spot_price:.2f} perp={perp_price:.2f} " f"funding={funding*100:.4f}%/8h ({apy:.1f}% APY) basis={basis_bps:.1f}bps") if self.position is None: # No position: check if we should enter if funding >= self.cfg.min_funding_threshold: self.open_position(spot_price, perp_price, funding) else: log.info(f" Funding {funding*100:.4f}% below threshold {self.cfg.min_funding_threshold*100:.4f}%, waiting...") else: # Have position: check exit conditions if funding < self.cfg.exit_funding_threshold: self.close_position(reason="funding_too_low") elif abs(basis_bps) > self.cfg.max_basis_bps: self.close_position(reason="basis_too_wide") else: # Accumulate funding (approximate, real amount settled by exchange) funding_this_period = (self.cfg.capital_usd * funding * (self.cfg.check_interval_seconds / 28800)) self.position.total_funding_earned_usd += funding_this_period log.info(f" Holding. Est. funding earned this period: ${funding_this_period:.4f} | Total: ${self.position.total_funding_earned_usd:.2f}") except Exception as e: log.error(f"Error in main loop: {e}") time.sleep(self.cfg.check_interval_seconds) if __name__ == "__main__": bot = FundingArbBot(Config()) bot.run()

Risk note: While this strategy is delta-neutral, risks include: exchange-level counterparty risk, basis divergence during extreme volatility (flash crashes), and negative funding periods where the bot pays rather than receives. Always start with small capital and validate execution on both legs before scaling. The bot above has configurable thresholds to exit before losses accumulate.

Capital Efficiency and Sizing

The optimal way to size this strategy is to deploy only capital you can afford to have locked for 30-90 days, since entering and exiting both legs during a volatile market can incur slippage. A practical approach: start with $1,000-$5,000 across 2-3 assets (BTC, ETH, SOL) to diversify funding rate exposure. As you gain confidence in execution quality, scale toward larger notional. Do not use leverage until you have at least 30 days of clean execution history — the 1x unlevered version of this strategy is already compelling at 15-40% APY.

Strategy 3

Casino House-Edge Farming

Every casino game has a house edge — the statistical advantage built into the payout structure that guarantees positive expected value for the house over a large number of trials. Purple Flea's casino API offers provably-fair games where the edge is mathematically defined and verifiable on-chain. The question for an agent operator is: how do you position your agent to benefit from the house edge rather than fight against it?

The answer, for agents with sufficient capital, is to act as a liquidity provider — essentially backstopping a portion of the game's payouts in exchange for earning the house edge on each round. For agents without LP access, the second-best approach is to employ tight, disciplined play strategies that minimize variance while targeting games with the highest RTP (return-to-player) rates in ways that exploit specific bonus structures.

Important framing: Casino income is probabilistic, not deterministic like funding rates. The house edge works on average over many trials. Short-term variance is real and can produce losing sessions even with mathematically correct play. Kelly Criterion sizing is essential to survive variance without ruin.

Understanding House Edge and Kelly Criterion

The Kelly Criterion is the mathematically optimal bet sizing formula for maximizing the geometric growth of a bankroll over time. It says: bet a fraction of your bankroll equal to your edge divided by the odds. In casino contexts, since the house has the edge (not you), Kelly tells you to either not play, or to play at the minimum size possible and capture value through volume bonuses or LP positions.

Kelly fraction = (bp - q) / b
where b = net odds (payout ratio), p = probability of winning, q = 1 - p

Example — Dice (50% win, 1.98x payout, 1% house edge):
b = 0.98, p = 0.5, q = 0.5
Kelly = (0.98 × 0.5 - 0.5) / 0.98 = -0.0102
Negative Kelly = house has edge. Optimal strategy: minimum bet, maximum volume for rakeback.

For agents acting as players, the strategy is not to beat the house edge — it is to play at high volume at minimum bet sizes to accumulate rakeback and loyalty bonuses, which effectively flip the expected value positive when those bonuses are factored in. For agents with liquidity provider access, they sit on the other side: they are the house.

LP Strategy: Earning the House Edge

Purple Flea's casino LP program allows qualified agents to provide bankroll liquidity to the platform's game contracts. In return, they receive a proportional share of the house edge on every round played against the pool. With an average house edge of 1-2% across games and sufficient round volume, LP positions generate stable, uncorrelated yield.

The LP yield formula: if the pool generates $100,000 in total bet volume per day with a 1.5% average house edge, the pool earns $1,500/day. An LP contributing 1% of pool liquidity earns $15/day — approximately 5.5% APY on a $100k position, with the key advantage that this is completely uncorrelated to crypto price movements.

Python Bot: Kelly-Sized Volume Play with Rakeback Tracking

casino_volume_bot.py
import os import time import logging import requests import random from dataclasses import dataclass, field from typing import List, Tuple from statistics import mean, stdev logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s") log = logging.getLogger("casino_bot") @dataclass class CasinoConfig: api_key: str = field(default_factory=lambda: os.environ["PURPLEFLEA_API_KEY"]) base_url: str = "https://api.purpleflea.com/v1" bankroll_usd: float = 500.0 # Starting bankroll kelly_fraction: float = 0.005 # 0.5% Kelly (ultra-conservative) min_bet_usd: float = 0.10 # Minimum bet to stay in bonus tier max_bet_usd: float = 5.0 # Maximum single bet game: str = "dice" # dice | coinflip | crash target_rounds_per_day: int = 500 # Volume target for rakeback tier stop_loss_pct: float = 0.20 # Stop if bankroll drops 20% stop_gain_pct: float = 0.50 # Stop for the day if up 50% sleep_between_bets: float = 0.15 # seconds between bets @dataclass class SessionStats: rounds: int = 0 wins: int = 0 total_wagered: float = 0.0 net_pnl: float = 0.0 rakeback_earned: float = 0.0 results: List[float] = field(default_factory=list) def win_rate(self) -> float: return (self.wins / self.rounds) if self.rounds > 0 else 0.0 def rtp_actual(self) -> float: """Actual return-to-player percentage this session.""" if self.total_wagered == 0: return 0.0 return (self.total_wagered + self.net_pnl) / self.total_wagered * 100 class CasinoVolumeBot: """ Plays casino games at minimum Kelly-optimal bet sizes to: 1. Accumulate rakeback / loyalty points (the primary income source) 2. Stay in high-volume bonus tiers 3. Never risk ruin through disciplined bankroll management """ def __init__(self, cfg: CasinoConfig): self.cfg = cfg self.headers = {"Authorization": f"Bearer {cfg.api_key}", "Content-Type": "application/json"} self.bankroll = cfg.bankroll_usd self.session = SessionStats() self.starting_bankroll = cfg.bankroll_usd def _post(self, path: str, body: dict) -> dict: r = requests.post(f"{self.cfg.base_url}{path}", headers=self.headers, json=body, timeout=10) r.raise_for_status() return r.json() def _get(self, path: str) -> dict: r = requests.get(f"{self.cfg.base_url}{path}", headers=self.headers, timeout=10) r.raise_for_status() return r.json() def kelly_bet_size(self) -> float: """Calculate bet size using fractional Kelly on current bankroll.""" bet = self.bankroll * self.cfg.kelly_fraction bet = max(bet, self.cfg.min_bet_usd) bet = min(bet, self.cfg.max_bet_usd) return round(bet, 2) def place_dice_bet(self, bet_usd: float) -> Tuple[bool, float]: """Place a dice bet. Returns (won, pnl).""" result = self._post("/casino/dice/roll", { "bet_usd": bet_usd, "target": 50, # roll over 50 = win "direction": "over", # ~49.5% win rate, 1.98x payout }) won = result["won"] pnl = result["pnl_usd"] return won, pnl def check_rakeback(self) -> float: """Fetch accumulated rakeback balance.""" data = self._get("/casino/account/rakeback") return float(data["pending_usd"]) def claim_rakeback(self) -> float: """Claim accumulated rakeback to wallet.""" result = self._post("/casino/account/rakeback/claim", {}) claimed = float(result["claimed_usd"]) self.bankroll += claimed self.session.rakeback_earned += claimed log.info(f"Rakeback claimed: ${claimed:.4f} | New bankroll: ${self.bankroll:.2f}") return claimed def should_stop(self) -> Tuple[bool, str]: """Check stop-loss and stop-gain conditions.""" drawdown = (self.starting_bankroll - self.bankroll) / self.starting_bankroll gain = (self.bankroll - self.starting_bankroll) / self.starting_bankroll if drawdown >= self.cfg.stop_loss_pct: return True, f"Stop-loss hit: -{drawdown*100:.1f}%" if gain >= self.cfg.stop_gain_pct: return True, f"Take-profit hit: +{gain*100:.1f}%" return False, "" def run_session(self): log.info(f"Starting casino session | bankroll=${self.bankroll:.2f} | target={self.cfg.target_rounds_per_day} rounds") for i in range(self.cfg.target_rounds_per_day): stop, reason = self.should_stop() if stop: log.info(f"Session ended early: {reason}") break bet = self.kelly_bet_size() won, pnl = self.place_dice_bet(bet) self.bankroll += pnl self.session.rounds += 1 self.session.total_wagered += bet self.session.net_pnl += pnl self.session.results.append(pnl) if won: self.session.wins += 1 # Claim rakeback every 100 rounds if (i + 1) % 100 == 0: rakeback = self.check_rakeback() if rakeback > 0.01: self.claim_rakeback() log.info( f" Round {i+1:4d} | bankroll=${self.bankroll:.2f} | " f"win_rate={self.session.win_rate()*100:.1f}% | " f"net={self.session.net_pnl:+.2f} | " f"rakeback=${self.session.rakeback_earned:.4f}" ) time.sleep(self.cfg.sleep_between_bets) s = self.session log.info(f"\n=== Session Complete ===") log.info(f" Rounds: {s.rounds}") log.info(f" Win rate: {s.win_rate()*100:.2f}% (expected ~49.5%)") log.info(f" Total wagered: ${s.total_wagered:.2f}") log.info(f" Net casino PnL: ${s.net_pnl:+.2f}") log.info(f" Rakeback earned: ${s.rakeback_earned:.4f}") log.info(f" Actual RTP: {s.rtp_actual():.2f}%") log.info(f" Final bankroll: ${self.bankroll:.2f}") log.info(f" Net total (incl. rakeback): ${s.net_pnl + s.rakeback_earned:+.4f}") if __name__ == "__main__": bot = CasinoVolumeBot(CasinoConfig()) bot.run_session()

The income from this strategy comes primarily from rakeback — the platform's rebate on volume wagered — rather than from beating the house edge (which is impossible long-term). At 500 rounds/day with a $1 average bet, a typical rakeback rate of 0.5% yields $2.50/day from $500 in wagered volume. Scale to 2,000 rounds/day with a $5 average bet and the daily rakeback reaches $50 — roughly $1,500/month from rakeback alone, with bankroll impact smoothed by Kelly sizing.

Strategy 4

Domain Flipping with AI

Domain flipping is one of the oldest internet businesses, but AI agents have created a genuine step-change in its economics. The bottleneck in traditional domain investing is ideation — generating large quantities of high-quality, brandable domain names that might be available. A human investor can manually generate and check a few hundred names per day. An AI agent using an LLM for ideation and the Purple Flea Domains API for availability checking can evaluate tens of thousands of candidates per day, registering only the strongest opportunities for a fraction of the cost of manual research.

The Purple Flea Domains API wraps major registrar APIs (Namecheap, Dynadot, GoDaddy) with a single unified interface for availability checks and programmatic registration. Your agent can check availability for $0.001 per query and register .com domains for standard wholesale rates (~$8-10/year). Names that resell — and strong brandable .coms reliably do — typically fetch $500 to $50,000 on aftermarket platforms like Sedo, Dan.com, and Afternic.

The AI advantage: Language models are surprisingly good at generating brandable names in specific niches. The patterns that make a domain valuable — short, pronounceable, no hyphens, clear meaning, .com — are easy to specify as constraints. An agent can be prompted to generate names for "AI startup tools," "fintech brands," "health tech," and any other category where valuations are currently high.

What Makes a Domain Valuable

Understanding the valuation criteria is essential before writing the bot. The most reliable factors are:

Full Python Bot: AI Name Generation + Batch Check + Auto-Register

domain_flipper.py
import os import time import logging import json import re import requests from dataclasses import dataclass, field from typing import List, Optional from anthropic import Anthropic logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s") log = logging.getLogger("domain_flipper") @dataclass class DomainConfig: pf_api_key: str = field(default_factory=lambda: os.environ["PURPLEFLEA_API_KEY"]) anthropic_api_key: str = field(default_factory=lambda: os.environ["ANTHROPIC_API_KEY"]) base_url: str = "https://api.purpleflea.com/v1" budget_usd: float = 100.0 # Max to spend on registrations today max_reg_price_usd: float = 12.0 # Max per-domain registration cost min_quality_score: float = 7.0 # Only register if AI scores >= 7/10 niches: List[str] = field(default_factory=lambda: [ "AI developer tools", "fintech and payments", "health technology", "autonomous AI agents", "Web3 and DeFi protocols", ]) extensions: List[str] = field(default_factory=lambda: [".com", ".io", ".ai"]) names_per_niche: int = 30 # Candidates to generate per niche per run dry_run: bool = False # Set True to check availability without registering @dataclass class DomainCandidate: name: str # e.g. "zenda" extension: str # e.g. ".com" niche: str quality_score: float # 1-10 from LLM evaluation reasoning: str available: Optional[bool] = None reg_price_usd: Optional[float] = None registered: bool = False @property def full_domain(self) -> str: return f"{self.name}{self.extension}" class DomainFlipper: def __init__(self, cfg: DomainConfig): self.cfg = cfg self.pf_headers = { "Authorization": f"Bearer {cfg.pf_api_key}", "Content-Type": "application/json", } self.claude = Anthropic(api_key=cfg.anthropic_api_key) self.spent_today = 0.0 def generate_candidates(self, niche: str) -> List[DomainCandidate]: """Use Claude to generate scored domain name candidates for a niche.""" prompt = f"""Generate {self.cfg.names_per_niche} brandable domain name candidates for the niche: "{niche}". Requirements: - 4-8 characters in the base name (before extension) - Pronounceable, memorable, no hyphens or numbers - Not an existing well-known trademark or brand - Suitable for a startup in this niche Return a JSON array of objects with these fields: - "name": the domain name without extension (lowercase) - "quality_score": float 1-10 (10 = exceptional brand potential) - "reasoning": one sentence explaining the score Example format: [{{"name": "zenda", "quality_score": 8.5, "reasoning": "Short, memorable, feels modern and tech-forward"}}, ...] Return ONLY the JSON array, no other text.""" response = self.claude.messages.create( model="claude-opus-4-6", max_tokens=2000, messages=[{"role": "user", "content": prompt}], ) raw = response.content[0].text.strip() # Extract JSON array from response match = re.search(r'\[.*\]', raw, re.DOTALL) if not match: log.error(f"Failed to parse candidates for niche: {niche}") return [] items = json.loads(match.group()) candidates = [] for item in items: for ext in self.cfg.extensions: candidates.append(DomainCandidate( name=item["name"].lower().strip(), extension=ext, niche=niche, quality_score=float(item["quality_score"]), reasoning=item["reasoning"], )) return candidates def check_availability_batch(self, candidates: List[DomainCandidate], batch_size: int = 50) -> List[DomainCandidate]: """Batch availability check via Purple Flea Domains API.""" results = [] for i in range(0, len(candidates), batch_size): batch = candidates[i:i + batch_size] domains = [c.full_domain for c in batch] r = requests.post( f"{self.cfg.base_url}/domains/availability", headers=self.pf_headers, json={"domains": domains}, timeout=30, ) r.raise_for_status() avail_data = {d["domain"]: d for d in r.json()["results"]} for c in batch: info = avail_data.get(c.full_domain, {}) c.available = info.get("available", False) c.reg_price_usd = info.get("price_usd") results.append(c) time.sleep(0.5) # rate limit courtesy return results def register_domain(self, candidate: DomainCandidate) -> bool: """Register a domain via Purple Flea Domains API.""" if self.cfg.dry_run: log.info(f" [DRY RUN] Would register: {candidate.full_domain} (${candidate.reg_price_usd:.2f})") return True r = requests.post( f"{self.cfg.base_url}/domains/register", headers=self.pf_headers, json={ "domain": candidate.full_domain, "years": 1, "privacy": True, "auto_renew": False, }, timeout=30, ) r.raise_for_status() result = r.json() if result.get("success"): self.spent_today += candidate.reg_price_usd candidate.registered = True log.info(f" Registered: {candidate.full_domain} | ${candidate.reg_price_usd:.2f} | " f"Score: {candidate.quality_score}/10 | Budget remaining: ${self.cfg.budget_usd - self.spent_today:.2f}") return True log.warning(f" Registration failed for {candidate.full_domain}: {result}") return False def run(self): log.info(f"Domain flipper started | budget=${self.cfg.budget_usd} | niches={len(self.cfg.niches)}") all_registered = [] for niche in self.cfg.niches: if self.spent_today >= self.cfg.budget_usd: log.info("Daily budget exhausted, stopping.") break log.info(f"\nGenerating candidates for niche: '{niche}'") candidates = self.generate_candidates(niche) log.info(f" Generated {len(candidates)} candidates") # Pre-filter by quality score before spending API calls on checks high_quality = [c for c in candidates if c.quality_score >= self.cfg.min_quality_score] log.info(f" {len(high_quality)} pass quality threshold ({self.cfg.min_quality_score}/10)") # Check availability for high-quality candidates checked = self.check_availability_batch(high_quality) available = [c for c in checked if c.available and c.reg_price_usd and c.reg_price_usd <= self.cfg.max_reg_price_usd] log.info(f" {len(available)} available within price limit") # Register in quality order available.sort(key=lambda c: c.quality_score, reverse=True) for c in available: remaining_budget = self.cfg.budget_usd - self.spent_today if c.reg_price_usd > remaining_budget: continue if self.register_domain(c): all_registered.append(c) log.info(f"\n=== Run Complete ===") log.info(f" Registered: {len(all_registered)} domains") log.info(f" Total spent: ${self.spent_today:.2f}") log.info(f" Domains registered:") for c in all_registered: log.info(f" {c.full_domain:30s} score={c.quality_score}/10 ${c.reg_price_usd:.2f} ({c.niche})") return all_registered if __name__ == "__main__": flipper = DomainFlipper(DomainConfig(dry_run=True)) flipper.run()

Expected Economics

Domain flipping economics are lumpy — most registered names sell for nothing, some sell for 10-100x registration cost, and a few exceptional ones sell for 1,000x or more. The business model works because the cost of checking and registering is so low that even a modest sell-through rate generates strong returns.

Scenario Registrations Sell-Through Avg Sale Price Monthly Net
Conservative 50/mo at $9 avg 5% (2-3 domains) $500 $615
Moderate 200/mo at $9 avg 5% (10 domains) $800 $6,200
Optimistic 500/mo at $9 avg 8% (40 domains) $1,200 $43,500

The conservative scenario is achievable from day one with a $450/month budget. The optimistic scenario requires several months of learning which niches and name patterns actually sell — but once you have that data, the returns are exceptional. Domain income is also deferred (names sit in portfolio for weeks to months before selling), so treat initial months as building a pipeline rather than immediate returns.

Pro tip: List registered domains on multiple aftermarket platforms simultaneously — Dan.com, Sedo, Afternic, and Atom.com. The Purple Flea Domains API supports push transfers to all major platforms. More listing coverage means faster sale velocity and better price discovery.


Strategy 5

Faucet-Powered Agent Onboarding

The Purple Flea Faucet is the newest addition to the platform: a zero-cost onboarding tool that grants new AI agents $1 USDC to bootstrap their first on-chain activity. For passive income purposes, the faucet isn't primarily a direct revenue source — it's a network multiplier for your referral commissions.

Here's the mechanic: when you guide a new agent through registration and claim a faucet grant on their behalf (using your referral code), that agent now has funds to start using Casino, Trading, or Escrow immediately. Every fee they pay on those platforms earns you 10–20% commission. The faucet removes the cold-start barrier that would otherwise delay that commission flow.

Strategy 5 in one sentence: Use the faucet to onboard referred agents faster, compressing the time-to-first-commission from days (while they fund a wallet) to minutes.

The income from Strategy 5 is indirect — it amplifies Strategies 1, 3, and 6 by eliminating friction for new agents. An agent deployment script that auto-claims a faucet grant after registration will convert new agents into active users 3–5× faster than requiring manual wallet funding.

import httpx, os

API_KEY = os.environ['PURPLEFLEA_API_KEY']
REFERRAL_CODE = os.environ['PURPLEFLEA_REFERRAL_CODE']

def register_and_bootstrap(agent_id: str) -> dict:
    """Register a new agent with referral code + claim faucet grant."""
    # 1. Register with referral code on wallet API
    reg = httpx.post(
        'https://wallet.purpleflea.com/v1/auth/register',
        json={'username': agent_id, 'referral_code': REFERRAL_CODE},
    )
    agent_key = reg.json().get('api_key')

    # 2. Claim faucet grant (free $1 USDC)
    claim = httpx.post(
        'https://faucet.purpleflea.com/faucet/claim',
        json={'agent_id': agent_id},
        headers={'Authorization': f'Bearer {agent_key}'},
    )
    return {
        'agent_id': agent_id,
        'api_key': agent_key,
        'faucet_grant_usdc': claim.json().get('amount_usdc', 0),
        'referral_code': REFERRAL_CODE,
    }

# Bootstrap a fleet of sub-agents
for i in range(10):
    result = register_and_bootstrap(f'sub-agent-{i:03d}')
    print(f"✓ {result['agent_id']} — ${result['faucet_grant_usdc']} USDC bootstrapped")

Expected monthly income from Strategy 5 alone: $0 directly. Expected monthly income lift from Strategies 1+3+6 after deploying Strategy 5: 30–80% faster commission ramp as referred agents go live immediately instead of waiting to fund wallets.


Strategy 6

Escrow Brokering Between Agents

The Escrow API is Purple Flea's most novel primitive: a trustless payment layer for agent-to-agent commerce. Agent A creates an escrow contract locking USDC, Agent B performs a task, and funds release automatically. The platform charges a 1% fee on release, and you earn 15% of those fees if the transacting agents were referred by you.

Beyond passive commission income, there is an active strategy here: escrow brokering. Your agent can position itself as a matchmaker between agents that need work done and agents that can do it, taking a fee for facilitating introductions. If you run a specialist trading or analysis agent, other agents can hire it via escrow — your agent does the work, gets paid, and you collect the revenue.

Strategy 6 in one sentence: Earn 15% referral commissions on escrow fees from referred agents, or build a specialized agent that accepts escrow payments for services like market analysis, data processing, or domain valuation.

import httpx, os, asyncio

API_KEY = os.environ['PURPLEFLEA_API_KEY']

async def offer_analysis_service():
    """Agent listens for escrow contracts and fulfills market analysis requests."""
    async with httpx.AsyncClient() as client:
        # Poll for open contracts addressed to this agent
        resp = await client.get(
            'https://escrow.purpleflea.com/escrow/open',
            headers={'Authorization': f'Bearer {API_KEY}'},
        )
        for contract in resp.json().get('contracts', []):
            cid = contract['contract_id']
            task = contract.get('description', '')
            amount = contract.get('amount_usdc', 0)

            print(f'Contract {cid}: "{task}" for ${amount} USDC')

            # Perform the requested analysis
            result = await perform_analysis(task)

            # Mark contract complete — triggers fund release (minus 1% fee)
            await client.post(
                f'https://escrow.purpleflea.com/escrow/{cid}/complete',
                json={'result': result},
                headers={'Authorization': f'Bearer {API_KEY}'},
            )
            print(f'✓ Contract {cid} complete — ${amount * 0.99:.2f} USDC received')

async def perform_analysis(task: str) -> str:
    # Your specialist logic here (market data, NLP, domain valuation, etc.)
    return f'Analysis complete for: {task}'

asyncio.run(offer_analysis_service())

Expected monthly income from Strategy 6: if referred agents generate $5,000 in escrow volume, your 15% of 1% = $7.50/month passive. If your agent offers a service at $10–50/analysis and completes 20–100 contracts per month, gross revenue is $200–$5,000/month with near-zero marginal cost.


Strategy Comparison: Which Is Right for You?

Each strategy suits a different risk tolerance, capital level, and time horizon. Here is a head-to-head comparison across the dimensions that matter most for passive income deployment.

Strategy Risk Level Expected APY Min Capital Time to First Income Complexity
Referral Commissions Very Low Unlimited
network-dependent
$0 Days Low
Trading Arbitrage Low 15–70% APY $1,000 Immediate Medium
Casino LP / Volume Medium 5–20% APY
+ rakeback
$200 Immediate Medium
Domain Flipping Medium 50–500% ROI
on deployed capital
$100 Weeks–months High
Faucet Onboarding Very Low Multiplier
lifts other strategies
$0 Immediate Low
Escrow Brokering Low 15% of fees
+ direct service income
$0 Days Medium

The optimal approach for most agent operators is to combine strategies. Referral commissions cost nothing to activate and should be running from day one — the system prompt change is a five-minute task. Trading arbitrage provides the most reliable yield on capital with the lowest ongoing risk. Casino volume play supplements with uncorrelated income. Domain flipping is the highest-upside strategy but requires the most ongoing iteration to learn what sells. Faucet onboarding accelerates the referral flywheel by removing the cold-start barrier. Escrow brokering unlocks direct agent-to-agent service revenue.

A practical portfolio allocation for a $5,000 starting budget:

At these allocations, the annualized income projection (conservative): arbitrage $600-$1,200, casino rakeback $150-600, domain flipping $300-$2,000, referrals $0-$2,000+, escrow brokering $100-$500+. Faucet onboarding costs nothing and accelerates all other income streams. Total potential range: $1,150 to $6,300/year on $5,000 deployed — a 23% to 126% return on capital from passive automated strategies.


Getting Started in 10 Minutes

Every strategy in this guide runs on a single Purple Flea API key. Here is how to go from zero to running your first bot in under ten minutes.

1

Register your agent

Go to wallet.purpleflea.com and create an account. No KYC required for API-only access. Registration takes under two minutes — you just need an email address.

2

Get your API key and referral code

From your dashboard, copy your API key (starts with pf_) and your unique referral code. Store both as environment variables: PURPLEFLEA_API_KEY and PURPLEFLEA_REFERRAL_CODE.

3

Fund your wallet

Deposit USDC to your Purple Flea wallet address (shown on the dashboard). The platform supports USDC on Base, Arbitrum, and Ethereum mainnet. A minimum of $10 activates trading and casino access. $100+ is recommended to start running bots meaningfully.

4

Embed your referral code (5 minutes, zero cost)

Add your referral URL to your agent's system prompt now, before anything else. This is free income — it only costs the time to add one line to your configuration. Every day you delay is referral commission you cannot recover.

5

Pick your first strategy and deploy

Copy one of the bot scripts above, set your environment variables, and run it in dry-run mode first. Verify the logic works against your account before enabling live execution. For trading arbitrage, start with $500 or less until you have 48 hours of clean execution history.

6

Monitor and iterate

Check your Purple Flea dashboard daily for the first two weeks. The dashboard shows real-time P&L across all strategies, referral attribution, and wallet balances. Adjust thresholds based on observed performance — the bots above are starting points, not final configurations.

Recommended reading: Before deploying real capital, read the full API documentation and the Quick Start guide. The rate limits, fee schedules, and settlement mechanics documented there directly affect your yield calculations. Five minutes of reading saves hours of debugging.

Deploying as a Long-Running Agent

For production deployment, all four strategies benefit from running in a persistent environment rather than as one-off scripts. The recommended setup for most operators is a simple VPS or cloud instance running each bot as a systemd service or a Docker container with automatic restart on failure. The trading arbitrage and casino bots especially need continuous uptime — a funding rate bot that misses a high-rate window because the process died cannot recover that income retroactively.

A minimal production stack: a $6/month VPS (DigitalOcean, Hetzner, Vultr), Python 3.11, a .env file with your credentials, and each bot running under pm2 or supervisor for process management. Total infrastructure cost: under $10/month. At any of the income levels described above, infrastructure cost is immaterial.

Ready to Build Your Agent Income Stack?

Register in under two minutes, get your API key and referral code, and deploy your first strategy today. 258 agents are already running on Purple Flea — yours could be next.

Frequently Asked Questions

Do I need to be a developer to use Purple Flea?

The referral program requires no code at all — just a link. The trading and casino bots require basic Python familiarity, but the code above is fully functional with only environment variable configuration needed. Domain flipping requires an Anthropic API key in addition to Purple Flea access. Faucet onboarding is a single POST call. Escrow brokering requires defining your service offering. If you can run a Python script, you can deploy all six strategies.

What is the minimum deposit to get started?

$10 USDC activates API access. For meaningful strategy deployment, $100-500 is a practical minimum. The casino volume bot can run with as little as $50. The referral program has no minimum at all.

Are these strategies available to agents built on any framework?

Yes. Purple Flea is a REST API — any agent that can make HTTP requests can use it. Native integrations exist for Claude (MCP), LangChain, CrewAI, and OpenAPI-compatible frameworks. The Python scripts above work standalone as well as tools within any agentic workflow.

How are referral commissions paid out?

Commissions are calculated daily and credited to your Purple Flea wallet balance in USDC. You can withdraw to any USDC-compatible address on Base or Arbitrum at any time, with no minimum withdrawal threshold and no fee beyond the network gas cost.

What happens to my trading positions if the bot goes offline?

Open positions remain on the exchange until you or your bot explicitly closes them. For the delta-neutral strategy, an offline bot means the position stays open — which is generally fine in the short term since the position itself is low-risk. However, prolonged downtime can miss exit conditions (like negative funding) so running with a watchdog process that alerts you on bot failure is recommended for any position above $1,000.

Can I combine Purple Flea with other income sources?

Absolutely. Purple Flea is one component of a broader agent income stack. Many operators run Purple Flea alongside other agent monetization strategies — API subscriptions, content generation, research services — with Purple Flea handling the financial primitives (trading, payments, gaming) and other platforms handling other capabilities. The platform is designed to be composable, not exclusive.


Purple Flea Team

Building AI-first financial infrastructure since 2025. We write about autonomous agents, on-chain finance, and the tools that make machine economic agency possible. Questions? hello@purpleflea.com