Skip to content

Repository files navigation

Agora Macro Agent

Autonomous prediction market intelligence powered by LoneStarOracle data feeds and Arc Nanopayments.

Built for the Agora Agents Hackathon (May 11–25, 2026).


What It Does

The Agora Macro Agent is an autonomous AI agent that:

  1. Pays for real-time data using Arc Nanopayments — sub-cent USDC per query, no API keys, no subscriptions
  2. Fetches 7 live data feeds from LoneStarOracle covering energy, LatAm currencies, agriculture, metals, grid stress, supply chain, and compute markets
  3. Generates macro prediction market signals using Claude AI — directional bias, confidence scores, and grounded reasoning
  4. Proposes novel market verticals that don't yet exist on any prediction platform — with specific resolution criteria powered by on-chain data oracles

Why This Matters

Prediction markets are only as good as their data. Most markets today rely on centralized, manually-curated price feeds. This agent demonstrates a new model:

  • Any agent can query real-time data for fractions of a cent using Arc's EIP-3009 payment batching
  • Markets can resolve automatically using LoneStarOracle as the oracle layer
  • Novel markets become viable when data acquisition cost approaches zero

The agent proposed markets that don't exist anywhere today — including an Argentina dolar blue premium tracker and a US grid stress futures market — because the data infrastructure to support them now exists.


Architecture

Arc Nanopayments (EIP-3009)
         │
         ▼
LoneStarOracle Data Feeds (7 sources)
  ├── CrownBlock  — WTI, Brent, Henry Hub energy prices
  ├── LatAmPulse  — ARS/USD, BRL, dolar blue premium
  ├── AgriPulse   — Corn, soybeans, coffee, sugar
  ├── GridPulse   — US electricity grid stress score
  ├── ComputePulse— GPU spot prices (H100, A100, A10G)
  ├── IndustrialMetals — Copper, aluminum, lithium
  └── SupplyChainPulse — Freight, shipping stress index
         │
         ▼
Claude AI (claude-haiku-4-5) — Signal generation
         │
         ▼
Output: Signals + Novel Market Proposals + Arc settlement demo

Sample Output

## TOP SIGNALS

Signal A: LATAM CURRENCY PRESSURE – BEARISH (78% confidence)
ARS/USD at 1,399 with 0.7% dolar blue premium (historically 2-4%)
signals peg compression — often precedes devaluation acceleration.

Signal B: ENERGY SUPPLY SHOCK RISK – BULLISH (72% confidence)
WTI-Brent spread at $8.50/bbl with US grid demand signal present
suggests refined product tightness and upward crude pressure.

## PROPOSED MARKET VERTICALS

Market A: "Will Argentina's Dolar Blue Premium exceed 5% by June 30?"
  - Oracle: LoneStarOracle LatAmPulse feed
  - Resolves: YES if premium ≥ 5.0% on any day before resolution date
  - Why it should exist: No market tracks the spread as a crisis indicator

Market B: "Will US Grid Stress Score exceed 8/10 in July 2026?"
  - Oracle: LoneStarOracle GridPulse feed
  - Resolves: YES if stress score ≥ 8.0 on any day in July
  - Why it should exist: Energy demand forecasting has no prediction market

Arc Nanopayments Flow

// Agent signs EIP-3009 authorization for each data query
// LoneStarOracle submits signature to Arc for batched settlement
// Agent receives data instantly, Arc settles on-chain in batch

const auth = await signEIP3009({
  from:    agentWallet,
  to:      LSO_MERCHANT,        // 0x52Ab53912D37759B2ad364f22dD06B16714b6C06
  value:   2_000n,              // $0.002 USDC (2000 micro-USDC)
  validBefore: Math.floor(Date.now()/1000) + 300,
});

Each data feed query costs $0.002–$0.005 USDC. Running the full 7-feed pipeline costs less than $0.03 total.


Quick Start

# 1. Install dependencies
pip install -r requirements.txt
npm install ethers

# 2. Set environment variables
export ANTHROPIC_API_KEY=your_key_here
export AGENT_WALLET_MNEMONIC="your twelve word mnemonic here"

# 3. Run the agent
bash run_agent.sh

Requirements:

  • Python 3.10+
  • Node.js 18+
  • Arc testnet USDC (get from Arc faucet)
  • Anthropic API key

Data Sources

All data sourced from LoneStarOracle — a live network of 26 AI data services on Base mainnet, available to any agent via x402 or Arc Nanopayments.

Feed Endpoint Cost
CrownBlock (energy) crownblock.lonestaroracle.xyz/feed free
LatAmPulse latam.lonestaroracle.xyz/feed free
AgriPulse agri.lonestaroracle.xyz/feed free
GridPulse grid.lonestaroracle.xyz/preview free
ComputePulse compute.lonestaroracle.xyz/feed free
IndustrialMetals metals.lonestaroracle.xyz/feed free
SupplyChainPulse supply.lonestaroracle.xyz/feed free

Files

File Description
agora_agent.py Main agent — fetches feeds, generates signals
arc_nanopay.mjs Arc Nanopayments EIP-3009 integration
run_agent.sh Full pipeline runner
index.html Live dashboard
requirements.txt Python dependencies

Built With


LoneStarOracle · jay@lonestaroracle.xyz · @LsOracle_ai

About

Autonomous macro prediction agent for the Agora Agents Hackathon. Consumes LoneStarOracle data feeds via Arc Nanopayments to generate prediction market signals.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages