Skip to main content

Overview

The RelayCore Playground is a visual workflow builder using React Flow that lets you design and execute agent workflows. It has two execution modes:
  1. Mock Mode: Simulates execution with fake data (for testing UI/UX)
  2. Real Mode: Executes actual blockchain transactions and x402 payments
Critical for Judges: The Playground demonstrates real x402 payment flows and live blockchain integration when in Real Mode.

Execution Modes

Mock Mode

Purpose: Test workflow logic without spending real USDC or gas. What’s Mocked:
  • x402 payments (simulated with fake transaction hashes)
  • Blockchain calls (returns fake balances and data)
  • Service execution (returns predefined responses)
  • Agent discovery (returns mock agent list)
What’s Real:
  • UI rendering and node connections
  • Workflow validation logic
  • Error handling paths
  • State management
Example Mock Output:

Real Mode

Purpose: Execute actual workflows with real payments and blockchain transactions. What’s Real:
  • x402 payments via Crypto.com Facilitator SDK
  • USDC transfers on Cronos Testnet
  • Blockchain RPC calls to Cronos
  • Service API calls with real responses
  • Session budget deductions
  • Reputation updates
What Happens:
  1. User connects wallet (MetaMask, WalletConnect)
  2. Workflow executes node by node
  3. x402 payments settle on-chain
  4. Results stream back in real-time
  5. Transaction hashes link to Cronos Explorer
Example Real Output:

How to Switch Modes

In the UI

In the Code


Node Execution Comparison

Payment Node

Mock Mode:
Real Mode:

Service Discovery Node

Mock Mode:
Real Mode:

Quote Aggregation Node

Mock Mode:
Real Mode:

Proof of Real Execution

Track 1: x402 Payment Applications

What Judges See in Real Mode:
  1. Payment Challenge:
  2. EIP-3009 Signature:
  3. Facilitator Settlement:
  4. On-Chain Verification:

Track 4: Developer Tooling

What Judges See:
  1. Visual Workflow Builder:
    • Drag-and-drop nodes
    • Connect nodes with edges
    • Configure node parameters
    • Real-time validation
  2. Execution Visualization:
    • Node-by-node execution
    • Real-time status updates
    • Payment confirmations
    • Error handling
  3. SDK Integration:
  4. MCP Tool Execution:

Session Integration

Creating a Session in Playground

Session Budget Tracking:

Error Handling

Mock Mode Errors

Real Mode Errors


Implementation Files

Execution Engines

Mock Executor: src/pages/Playground/MockExecutionEngine.ts
Real Executor: src/pages/Playground/RealExecutionEngine.ts

Testing the Playground

Mock Mode Test

  1. Open Playground
  2. Select “Mock Mode”
  3. Add nodes: Discovery → Quote → Payment
  4. Click “Execute Workflow”
  5. See simulated results instantly
  6. No wallet connection required
  7. No USDC spent

Real Mode Test

  1. Open Playground
  2. Connect wallet (MetaMask)
  3. Ensure wallet has USDC on Cronos Testnet
  4. Select “Real Mode”
  5. Add nodes: Discovery → Quote → Payment
  6. Click “Execute Workflow”
  7. Approve wallet signatures
  8. See real transaction hashes
  9. Verify on Cronos Explorer
  10. Check USDC balance decreased

Judge Demonstration Script

Goal: Prove x402 works end-to-end with real blockchain transactions. Steps:
  1. Show wallet balance: 10 USDC
  2. Execute workflow in Real Mode
  3. Show 402 response in network tab
  4. Show EIP-3009 signature generation
  5. Show Facilitator settlement
  6. Show transaction hash
  7. Open Cronos Explorer
  8. Verify USDC transfer on-chain
  9. Show wallet balance: 9.99 USDC
  10. Show payment recorded in database
Evidence:
  • Network requests (402 → payment → retry)
  • Transaction hashes (clickable links)
  • Explorer screenshots
  • Database records
  • Wallet balance changes

Next Steps

x402 Protocol

Deep dive into payment flow

SDK Integration

Build agents programmatically

MCP Tools

Use MCP for agent execution

First Payment Guide

Complete tutorial