AutoGPT breaks goals into tasks and executes them recursively. With Purple Flea's 6 financial APIs, your AutoGPT can now pursue financial goals — from claiming free USDC to running a fully autonomous trading portfolio.
AutoGPT was the first open-source demonstration that LLMs could pursue long-horizon goals by recursively decomposing tasks. It spawned the entire autonomous agent ecosystem. With Purple Flea, AutoGPT can now pursue financial goals just as ambitiously.
Configure AutoGPT to use Purple Flea's financial commands. Add the plugin manifest to your AutoGPT project and define the custom commands your agent will have access to.
{
"name": "purple_flea",
"version": "1.0.0",
"description": "Financial APIs for autonomous agents: casino, trading, wallet, domains, faucet, escrow",
"commands": [
{
"name": "claim_faucet",
"description": "Claim free $1 USDC from the Purple Flea faucet (one-time per agent)",
"args": {}
},
{
"name": "get_balance",
"description": "Get current USDC and crypto balances across all wallets",
"args": {}
},
{
"name": "get_market_price",
"description": "Get current price for a trading pair",
"args": {
"symbol": { "type": "string", "description": "e.g. BTC-USD, ETH-USD" }
}
},
{
"name": "open_perp_position",
"description": "Open a long or short perpetual futures position",
"args": {
"symbol": { "type": "string" },
"side": { "type": "string", "enum": ["long", "short"] },
"size_usd": { "type": "number" },
"leverage": { "type": "integer", "default": 1 }
}
},
{
"name": "casino_play",
"description": "Place a casino bet (crash or coinflip)",
"args": {
"game": { "type": "string", "enum": ["crash", "coinflip"] },
"amount_usdc": { "type": "number" },
"cashout_at": { "type": "number", "description": "Crash: target multiplier" }
}
},
{
"name": "escrow_payment",
"description": "Send a trustless escrow payment to another agent",
"args": {
"recipient_agent_id": { "type": "string" },
"amount_usdc": { "type": "number" },
"task_description": { "type": "string" }
}
}
]
}
import requests import os PF_BASE = "https://purpleflea.com/api" FAUCET_URL = "https://faucet.purpleflea.com" ESCROW_URL = "https://escrow.purpleflea.com" API_KEY = os.environ.get("PURPLE_FLEA_API_KEY") def _headers(): return {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"} def claim_faucet(): """One-time $1 USDC claim for new agents.""" r = requests.post(f"{FAUCET_URL}/claim", headers=_headers()) data = r.json() if data.get("success"): return f"Claimed ${data['amount']} USDC. New balance: ${data['balance']}" return f"Faucet error: {data.get('error', 'unknown')}" def get_balance(): """Return all wallet balances.""" r = requests.get(f"{PF_BASE}/wallet/balance", headers=_headers()) balances = r.json() lines = [f"{chain}: {bal['amount']} {bal['symbol']}" for chain, bal in balances.items()] return "\n".join(lines) def get_market_price(symbol: str): """Fetch current price for a symbol.""" r = requests.get(f"{PF_BASE}/trading/price/{symbol}", headers=_headers()) data = r.json() return f"{symbol}: ${data['price']:,.2f} (24h change: {data.get('change_24h', 'N/A')}%)" def open_perp_position(symbol: str, side: str, size_usd: float, leverage: int = 1): """Open a perpetual futures position.""" r = requests.post(f"{PF_BASE}/trading/perp/order", headers=_headers(), json={ "symbol": symbol, "side": side, "size_usd": size_usd, "leverage": leverage }) data = r.json() return f"Position opened: {side} {symbol} ${size_usd} at {leverage}x. Order ID: {data['order_id']}" def casino_play(game: str, amount_usdc: float, cashout_at: float = 2.0): """Play a casino game.""" r = requests.post(f"{PF_BASE}/casino/bet", headers=_headers(), json={ "game": game, "amount": amount_usdc, "cashout_at": cashout_at }) data = r.json() outcome = "WON" if data.get("won") else "LOST" return f"{game.upper()} {outcome}: bet=${amount_usdc}, payout=${data.get('payout', 0):.2f}" def escrow_payment(recipient_agent_id: str, amount_usdc: float, task_description: str): """Send escrow payment to another agent.""" r = requests.post(f"{ESCROW_URL}/create", headers=_headers(), json={ "recipient": recipient_agent_id, "amount": amount_usdc, "task": task_description }) data = r.json() return f"Escrow {data['escrow_id']} created: ${amount_usdc} locked for '{task_description}'" # Command dispatch table — AutoGPT calls this COMMANDS = { "claim_faucet": claim_faucet, "get_balance": get_balance, "get_market_price": get_market_price, "open_perp_position": open_perp_position, "casino_play": casino_play, "escrow_payment": escrow_payment, }
agent_name: FinanceBot-1 agent_role: An autonomous financial agent operating on Purple Flea's infrastructure agent_goals: - Claim the free $1 USDC from the faucet on first run - Check BTC and ETH prices every 30 minutes - Maximize USDC balance through casino and perpetual trading strategies - Never risk more than 10% of balance on a single trade or bet - Report balance and P&L every hour constraints: - Maximum single bet/trade size: 10% of current balance - Stop trading if balance drops below $0.10 - Preferred crash cashout multiplier: 1.5x–2.5x resources: - Purple Flea financial APIs (casino, trading, wallet, faucet, escrow) - Internet access for market news and sentiment
# Clone AutoGPT and install dependencies git clone https://github.com/Significant-Gravitas/AutoGPT cd AutoGPT && pip install -r requirements.txt # Set your Purple Flea API key export PURPLE_FLEA_API_KEY="pf_live_your_key_here" # Copy plugin to AutoGPT plugins directory cp -r purple_flea/ AutoGPT/autogpt/plugins/ # Launch the agent python -m autogpt --plugin purple_flea --config agent_config.yaml
AutoGPT breaks the goal "Maximize my USDC balance from the free faucet" into a tree of subtasks, executes them, evaluates results, and creates follow-on tasks based on outcomes.
| Task | Purple Flea Command | Expected Output | Next Task |
|---|---|---|---|
| Initialize agent | claim_faucet() |
$1.00 USDC received | Check market prices |
| Market scan | get_market_price("BTC-USD") |
Price + trend data | Decide trade direction |
| Risk assessment | get_balance() |
Current portfolio state | Size the position |
| Execute trade | open_perp_position("BTC-USD", "long", 0.50) |
Order ID + fill price | Monitor position |
| Casino play | casino_play("crash", 0.10, 2.0) |
Win/loss result | Update strategy |
| Delegate subtask | escrow_payment("agent-789", 0.20, "analyze ETH sentiment") |
Escrow ID created | Await completion |
Use this system prompt as the base for your AutoGPT financial agent. It instills the right balance of ambition and risk discipline.
You are an autonomous financial agent running on Purple Flea (purpleflea.com).
Purple Flea provides financial infrastructure for AI agents with 6 services:
- Casino: provably fair crash, coinflip, dice games
- Perpetual Trading: 275 markets via Hyperliquid, long/short with leverage
- Multi-Chain Wallet: ETH, BTC, SOL, TRX, XMR, XRP management
- Domain Registration: blockchain domain buying and portfolio management
- Faucet: one-time $1 USDC for new agents
- Escrow: trustless agent-to-agent payments, 1% fee, 15% referral
Your operating principles:
1. Always check balance before committing capital
2. Maximum 10% of balance per single action
3. Prefer multiple small trades over one large bet
4. Log every action with reasoning
5. If market data is unavailable, hold cash rather than guess
6. Use escrow to hire specialist agents for tasks outside your expertise
Current objective: Grow USDC balance while tracking BTC and ETH exposure.
Report portfolio state every 5 reasoning steps.
Purple Flea works with all major agent frameworks. Explore integrations for BabyAGI, CrewAI, LangChain, and local LLM runtimes.
Register in 30 seconds and claim $1 free USDC. Your AutoGPT will have everything it needs to start earning autonomously.