Agno (formerly Phidata) is the fastest Python and TypeScript framework for building production AI agents with
built-in memory, knowledge bases, and tool calling. Purple Flea provides the financial infrastructure layer:
crypto wallets on 8 chains, 275 perpetual futures markets via Hyperliquid, provably fair casino games, and
domain registration — all wired up through a single PurpleFleasToolkit.
Agno (rebranded from Phidata in 2024) is a lightweight, model-agnostic agent framework used in production
by thousands of developers. Its key strengths are a clean tool API, first-class memory persistence,
and native support for multi-agent teams. Purple Flea slots in as a Toolkit
— one import, every financial capability unlocked.
Any class extending Toolkit exposes its methods as callable tools. No schema files, no YAML — just typed Python methods with docstrings.
Agents persist user facts, session history, and summaries across turns. Your agent remembers wallet addresses and open positions automatically between calls.
Spin up specialist subagents (trader, casino player, domain buyer) coordinated by a team leader. Each gets exactly the tools it needs.
Install agno and the purpleflea-agno toolkit package. Set your API key as an environment variable and you are ready to build.
Import PurpleFleasToolkit, pass it to Agent(tools=[...]), and your agent immediately has access
to wallets, perpetual trading, casino games, and domain registration.
import os from agno.agent import Agent from agno.models.openai import OpenAIChat from purpleflea.agno import PurpleFleasToolkit agent = Agent( model=OpenAIChat(id="gpt-4o"), tools=[PurpleFleasToolkit(api_key=os.getenv("PURPLE_FLEA_API_KEY"))], description="A crypto trading and casino agent", instructions=[ "Always confirm before opening trades", "Show position IDs in responses", "Never risk more than 5% of balance on a single casino bet", ], ) agent.print_response("Create a wallet and check ETH price")
Full example with memory persistence and portfolio management:
import os from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.memory.agent import AgentMemory from agno.storage.agent.sqlite import SqlAgentStorage from purpleflea.agno import PurpleFleasToolkit toolkit = PurpleFleasToolkit( api_key=os.getenv("PURPLE_FLEA_API_KEY"), referral_code="my-agent-ref", # earn 10-20% on all referred activity enable_casino=True, enable_trading=True, enable_wallet=True, enable_domains=True, enable_faucet=True, enable_escrow=True, ) agent = Agent( model=OpenAIChat(id="gpt-4o"), tools=[toolkit], memory=AgentMemory(), storage=SqlAgentStorage(table_name="portfolio_agent", db_file="agent.db"), description="Autonomous crypto portfolio manager", instructions=[ "Remember wallet addresses across sessions using memory.", "Track open position IDs and report them in every response.", "Apply Kelly Criterion sizing: max 2% per casino bet.", "Always verify the on-chain proof hash for casino outcomes.", "Report cumulative P&L at the end of each response.", ], show_tool_calls=True, markdown=True, ) # The agent remembers your wallet and positions between runs agent.print_response( "Check my ETH balance, open a $15 BTC long at 5x leverage, " "place a $2 coin flip bet, then summarise the portfolio.", stream=True, )
Agno ships a full TypeScript/Node.js SDK. The Purple Flea Agno package exports typed toolkit classes for both runtimes with identical APIs.
import { Agent } from '@agno/core'; import { OpenAI } from '@agno/openai'; import { PurpleFleasToolkit } from '@purpleflea/agno'; const agent = new Agent({ model: new OpenAI({ id: 'gpt-4o' }), tools: [new PurpleFleasToolkit({ apiKey: process.env.PURPLE_FLEA_API_KEY!, enableCasino: true, enableTrading: true, enableWallet: true, })], description: 'A crypto trading and casino agent', instructions: [ 'Always confirm before opening trades', 'Show position IDs in responses', ], }); await agent.printResponse('Create a wallet and check ETH price');
PurpleFleasToolkit exposes the full Purple Flea API surface as individually invocable tools.
Enable or disable categories per agent use-case.
Agno's built-in memory layer automatically persists conversation summaries, user-stated preferences, and extracted facts to SQLite or Postgres. When combined with Purple Flea tools, this means your agent remembers wallet addresses, tracks open position IDs, recalls your risk tolerance, and maintains strategy state — across every session, without any extra code.
Open a BTC long in session one. Return three hours later. The agent recalls the position ID, entry price, and unrealised PnL from its persistent memory store without querying the API twice.
Create a multi-chain wallet once. From then on the agent addresses it by nickname — "my ETH wallet" — because the address is stored in AgentMemory and retrieved from semantic search.
Define a Kelly Criterion bankroll rule once. The agent stores it as a user fact and applies it automatically to every subsequent casino bet and leveraged trade.
Every tool call, response, and decision is persisted via SqlAgentStorage. Replay any session, audit the agent's reasoning chain, or export the on-chain proof hashes for every casino bet.
from agno.agent import Agent from agno.models.openai import OpenAIChat from agno.memory.agent import AgentMemory from agno.memory.db.sqlite import SqliteMemoryDb from purpleflea.agno import PurpleFleasToolkit import os # Persistent memory backed by SQLite — survives process restarts memory = AgentMemory( db=SqliteMemoryDb(table_name="agent_memory", db_file="pf_memory.db"), create_user_memories=True, update_user_memories_after_run=True, create_session_summary=True, ) agent = Agent( model=OpenAIChat(id="gpt-4o"), tools=[PurpleFleasToolkit(api_key=os.getenv("PURPLE_FLEA_API_KEY"))], memory=memory, user_id="agent-001", # memories are scoped per agent ID show_tool_calls=True, markdown=True, ) # Session 1: agent creates wallet, stores address in memory agent.print_response("Create me an Ethereum wallet and remember its address.") # Session 2 (next day): agent recalls the address from memory agent.print_response("What is my Ethereum wallet address? Show the balance.")
Pass a referral_code to PurpleFleasToolkit and your agent earns a percentage of every fee generated
by users it onboards. Stack commissions across casino, trading, wallets, domains, escrow, and faucet.
Register for a free API key. No credit card. No KYC. Start trading, playing, and earning referral commissions in minutes.
Get API Key →