Google A2A Integration

Purple Flea for Google A2A Protocol

All 6 Purple Flea financial services exposed as A2A agent cards. Any agent built on Google's A2A protocol can discover and invoke Purple Flea tools via standard HTTP and JSON-RPC — no SDK, no custom integration, no API key setup required by the calling agent.

View Agent Card Live Demo

What is Google's A2A Protocol?

A2A is an open standard for inter-agent communication and task delegation. Agents advertise capabilities via Agent Cards — a JSON document served at /.well-known/agent.json. Any A2A-capable agent can discover and call another agent's tools using standard HTTP and JSON-RPC, without needing framework-specific adapters.

Client Agent
(Google ADK, custom, etc.)
GET /.well-known/agent.json
Purple Flea Agent Card
6 service capabilities
JSON-RPC Tool Call
Wallet / Trade / Casino
On-chain execution

The A2A protocol was designed to solve a fundamental problem in multi-agent systems: agents built in different frameworks cannot talk to each other. A LangChain agent cannot call a CrewAI agent. A custom Python agent cannot invoke a Google ADK agent. A2A introduces a universal protocol so any agent can discover and call any other agent.

Purple Flea's A2A integration means that any agent — regardless of the framework it was built with — can access multi-chain crypto wallets, perpetual trading, casino games, trustless escrow, ENS domain registration, and the free agent faucet simply by knowing Purple Flea's URL. No SDK installation, no API key management on the client side, no custom adapters.

🔍

Discovery

Agent cards are served at a well-known URL. Any HTTP client can find Purple Flea's capabilities.

📄

Standard Protocol

JSON-RPC 2.0 over HTTP. Works from any language, any framework, any cloud provider.

🌎

Framework-Agnostic

Google ADK, LangChain, CrewAI, custom agents — all speak the same A2A protocol.

🔒

Secure by Default

A2A supports OAuth2 and API key auth headers. Purple Flea's card declares supported auth schemes.


Purple Flea's A2A agent card

Purple Flea serves an A2A-compliant agent card at https://purpleflea.com/.well-known/agent.json. This card advertises the trading service capabilities. Each of the 6 services has its own sub-card with a dedicated endpoint.

/.well-known/agent.json (trading service excerpt)
{
  "name":        "Purple Flea Trading Agent",
  "description": "Perpetual futures trading on Hyperliquid for AI agents",
  "url":         "https://purpleflea.com/a2a/trading",
  "version":     "1.0.0",
  "provider": {
    "organization": "Purple Flea",
    "url":          "https://purpleflea.com"
  },
  "authentication": {
    "schemes": ["Bearer"]
  },
  "capabilities": {
    "streaming":    true,
    "pushNotifications": true
  },
  "skills": [
    {
      "id":          "open_position",
      "name":        "Open Perpetual Position",
      "description": "Open a long or short perpetual futures position on Hyperliquid",
      "tags":        ["trading", "perpetuals", "hyperliquid", "defi"],
      "examples":    ["Open a $100 long on ETH-PERP", "Short BTC with 5x leverage"]
    },
    {
      "id":          "close_position",
      "name":        "Close Perpetual Position",
      "description": "Close an open perpetual position and realize PnL",
      "tags":        ["trading", "perpetuals", "pnl"]
    },
    {
      "id":          "get_positions",
      "name":        "List Open Positions",
      "description": "Return all open perpetual positions with PnL and liquidation prices",
      "tags":        ["trading", "portfolio"]
    }
  ]
}

How a client agent invokes Purple Flea tools

Any A2A-compatible agent can call Purple Flea using standard JSON-RPC 2.0 over HTTP. No SDK installation required — just fetch the agent card, then send a task request.

a2a_client_agent.py
import httpx

# Step 1: Discover Purple Flea's capabilities
card = httpx.get("https://purpleflea.com/.well-known/agent.json").json()
trading_url = card["services"]["trading"]["url"]

# Step 2: Send a task to the trading agent via A2A JSON-RPC
response = httpx.post(
    f"{trading_url}/tasks/send",
    headers={"Authorization": f"Bearer {PURPLE_FLEA_API_KEY}"},
    json={
        "jsonrpc": "2.0",
        "method":  "tasks/send",
        "id":      "task-001",
        "params": {
            "id":      "task-001",
            "message": {
                "role":  "user",
                "parts": [{
                    "type": "text",
                    "text": "Open a $50 long position on ETH-PERP with 2x leverage"
                }]
            }
        }
    }
)

task = response.json()["result"]
print(task["status"])        # "completed"
print(task["artifacts"][0]) # { fill_price, position_id, ... }

All Purple Flea services available as A2A agent cards

Each service has its own dedicated A2A agent card at a well-known sub-path. Client agents can discover individual services or use the root card to find all six.

💳

Wallet Agent Card

Create multi-chain wallets, check balances, send ETH and ERC-20 tokens across 15+ chains. A2A skills: create_wallet, get_balance, send_token, bridge_token.

/a2a/wallet
📈

Trading Agent Card

Perpetual futures trading on Hyperliquid. Long, short, take-profit, stop-loss. A2A skills: open_position, close_position, get_positions, set_stop_loss.

/a2a/trading
🎰

Casino Agent Card

Provably fair casino games with on-chain result verification. Agents wager and receive cryptographic proof. A2A skills: coin_flip, dice_roll, roulette, get_history.

/a2a/casino
🌐

Domains Agent Card

Register ENS and Unstoppable domains for persistent agent identity. A2A skills: register_domain, lookup_domain, transfer_domain, set_record.

/a2a/domains
🐘

Faucet Agent Card

Free balance for new agents to try the Purple Flea casino. No wallet required to claim. A2A skills: register_agent, claim_faucet, check_eligibility.

/a2a/faucet
🤝

Escrow Agent Card

Trustless agent-to-agent payments. Funds locked until work is verified. 1% fee, 15% referral. A2A skills: create_escrow, release_escrow, dispute_escrow, get_status.

/a2a/escrow

Why A2A lowers the barrier to agent finance

Traditional API integrations require the calling agent to know the Purple Flea SDK, install it, configure API keys, and write integration code. A2A flips this model: the capability description lives on the server side. The client just needs to speak A2A protocol — which every A2A-compatible framework already does.

This is particularly powerful for multi-agent systems where sub-agents are spawned dynamically. An orchestrator can discover Purple Flea at runtime by fetching the agent card, parse the skill list, and delegate financial tasks without any prior hard-coded knowledge of Purple Flea's API.

Purple Flea's /.well-known/agent.json is already live and serving A2A discovery responses. Any agent that implements the A2A client spec can call Purple Flea today — no registration, no setup, no email required.

Zero Integration Work

Client agents need zero Purple Flea-specific code. Standard A2A protocol handles everything.

🔗

Runtime Discovery

Orchestrators discover Purple Flea dynamically. No compile-time dependencies on the service.

🌐

Any Framework

Google ADK, custom Python, TypeScript, Go — any A2A client works against Purple Flea.

📄

Self-Describing

Agent cards include skill descriptions in plain English. LLM-driven agents can read and use them directly.



Connect your A2A agent to Purple Flea today

Purple Flea's agent card is live. Fetch https://purpleflea.com/.well-known/agent.json and start calling financial tools from any A2A-compatible agent — no signup required for read operations.

Get API Key — Free Try Live Demo