Add crypto wallet operations, perpetual futures trading, and provably fair casino games to your Rivet AI agent graphs as first-class nodes.
Rivet by Ironclad is an open-source visual AI agent development environment. You build agents by connecting nodes on a graph canvas โ LLM calls, conditionals, loops, and tool nodes all wired together visually. Purple Flea adds a financial action layer: your Rivet graphs can now create wallets, open trades, play casino games, and pay other agents.
Rivet's visual canvas lets you design agent workflows without writing orchestration code. Connect Purple Flea tool nodes to LLM nodes and conditional branches with drag-and-drop.
Rivet supports external plugin packages. Install the purpleflea-rivet plugin and all Purple Flea operations appear as colored nodes in the node palette.
Rivet supports streaming LLM output and live node execution monitoring. Watch your trading agent make decisions in real time on the graph canvas.
Run your Rivet graph step-by-step in the visual debugger. Test Purple Flea tool calls with real API responses before deploying your agent to production.
Install Rivet from rivet.ironcladapp.com, then install the Purple Flea plugin from the Rivet plugin registry or via npm.
# Install the Purple Flea Rivet plugin npm install purpleflea-rivet # Or install globally for all Rivet projects npm install -g purpleflea-rivet
In Rivet โ Settings โ Plugin Config โ Purple Flea, enter your API key. This is stored securely in your Rivet workspace and injected into all Purple Flea nodes at runtime.
# rivet.config.yaml plugins: purpleflea: apiKey: "{{ env.PURPLE_FLEA_API_KEY }}" testnet: true # set false for production
Open your Rivet graph. Right-click on the canvas โ Add Node โ Purple Flea. Select from wallet, trading, casino, escrow, or domain nodes. Each node has clearly labeled input/output ports.
Connect the output of an LLM node to the input of a Purple Flea action node. The LLM decides which financial action to take; the Purple Flea node executes it. Hit Run and watch your agent work.
Every Purple Flea API operation is available as a named Rivet node. Each node has typed input ports (string, number, boolean) and output ports with the API response data.
Design your agent graph visually in Rivet, then export and execute it programmatically using @ironclad/rivet-node. Purple Flea nodes work seamlessly in the programmatic runtime.
import { startDebuggerServer, runGraph } from '@ironclad/rivet-node'; import { purpleFleatRivetPlugin } from 'purpleflea-rivet'; import * as path from 'path'; async function runTradingAgent() { const result = await runGraph( // Path to your exported .rivet-project file path.resolve('./trading-agent.rivet-project'), { graph: 'main', inputs: { 'user_prompt': { type: 'string', value: 'Check my BTC balance and open a 2x long position if price is above $95,000' } }, externalFunctions: {}, // Inject Purple Flea plugin with API credentials pluginSettings: { purpleflea: { apiKey: process.env.PURPLE_FLEA_API_KEY, testnet: process.env.NODE_ENV !== 'production' } }, plugins: [purpleFleatRivetPlugin] } ); console.log('Agent output:', result); } runTradingAgent().catch(console.error);
Tip: You can run multiple Rivet graphs in parallel โ one for trading decisions, one for casino bankroll management, one for domain monitoring. Each gets its own Purple Flea context with isolated transaction history.
Here's the node graph structure for a simple perpetual futures trading agent. Build this visually in Rivet โ no orchestration code required.
/* Rivet Graph: EMA Crossover Trading Agent Nodes and connections: [Input: user_prompt] โ [Claude Sonnet 4.6 LLM] system: "You are a crypto trading agent. Use tools to analyze markets and execute trades." โ [Loop until no tool call] โโโ get_candles(symbol, interval, limit) โ [EMA Calculation: Text Transform] โ โ โ [Conditional: crossover?] โ โ โ โ [open_position] [hold] โ โ โ [get_positions] โ [LLM context] โ [Output: final_response] */ // The same graph, programmatic version for reference: const agent = new PurpleFleatRivetAgent({ graph: 'ema_crossover_trader', model: 'claude-sonnet-4-6', tools: ['get_candles', 'open_position', 'close_position', 'get_positions'] }); const result = await agent.run('Monitor BTC-USD and execute EMA crossover strategy for 1 hour');
Register as a Purple Flea affiliate and embed your referral code in your Rivet plugin configuration. Earn recurring commission on every financial operation your graphs execute.
| Product | Action | Your Commission |
|---|---|---|
| Trading API | Every open/close position | 20% of fees |
| Casino API | Every game played | 10% of house edge |
| Wallet API | Every transaction | 10% of fees |
| Escrow API | Every escrow settled | 15% of 1% fee |
| Domain API | Every domain registered | 10% of registration fee |
Get your Purple Flea API key, install the Rivet plugin, and have a working trading agent on the canvas in under 10 minutes.