Attention Trading Agent — The AI That Reads Culture, Not Just Data
Github: https://github.com/2339140098NC/AttentionTradingAgent-I
Inspiration
Trading bots read numbers. But attention markets aren't just about numbers — they're about culture. When Elon tweets about Dogecoin, the alpha isn't in the price chart. It's in understanding that Crypto Twitter is mid-memecoin revival, that the SNL meme just went viral, and that the cultural momentum is real.
Forum.market built the world's first attention exchange. We asked: what if an AI agent could trade attention by understanding cultural narratives, not just crunching data?
And what if it didn't just send you a notification — but called your phone to pitch the trade like a gen-Z best friend?
What It Does
Our agent autonomously:
- Scans all 39 markets on Forum.market every 60 seconds
- Scores opportunities using a five-factor Attention Alpha Model:
- 📈 Momentum — multi-timeframe price trend analysis
- ⚡ Catalyst — real-time news search for driving events
- 🌐 Cross-Platform Divergence — the killer signal: Twitter exploded but Google Trends hasn't moved? You're early.
- 🎭 Cultural Context — WHY is this trending? Meme birth or trend death? Ironic or genuine?
- 📊 Market Positioning — order book imbalance reveals where smart money is going
- Calls your phone via Vapi.ai with a 30-second pitch in casual gen-Z trader voice
- Executes the trade on Forum.market when you say "let's do it"
- Displays everything on a live dashboard with a radar chart
$$\text{Alpha Score} = \sum_{i=1}^{5} w_i \cdot s_i \quad \text{where } \sum w_i = 1$$
The weighted score drives a confidence metric. Above 70%? Your phone rings.
How We Built It
Backend (Python):
forum_client.py— Full Forum.market REST API SDK with HMAC-SHA256 authenticationagent/alpha_model.py— Five-factor scoring engine powered by Claude API with web search for real-time catalyst and cultural analysisagent/monitor.py— Anomaly detection with configurable thresholdsrun_scanner.py— Two-stage market scanner: fast screen (free, Forum data only) → deep analysis (Claude) on top candidates
Voice (Vapi.ai):
agent/voice_agent.py— Triggers outbound phone calls with dynamic analysis contextserver/main.py— FastAPI webhook server handling Vapi function calls for live trade execution during phone conversations
Frontend (React):
- Live dashboard with Recharts radar chart, five-factor score breakdown, trade history
- Polls backend every 5 seconds for real-time updates
Key Architecture Decision: Two-stage scanning. Running Claude analysis on all 39 tickers every minute would burn through API credits. Instead, Stage 1 quick-screens using only Forum data (free), then Stage 2 runs full five-factor analysis only on the top 2-3 candidates.
Challenges
1. Forum API Signature Bug — The HMAC signature required /v1/account in the prehash string, not just /account. Cost us an hour of debugging — the old API key worked without it, the new one didn't.
2. Vapi Payload Format — Vapi's function call webhook uses message.toolCalls[0].function not message.functionCall. Had to add debug logging to discover the actual payload structure.
3. Candle Intervals — Forum API only supports 1m, 5m, and 1d candles. Our code initially requested 1h and 4h which silently failed, leaving the momentum dimension with no data.
4. Token Ticker Mismatch — Vapi's AI would say "SPACE" instead of "SPACEX" when executing trades. Fixed by adding exact ticker names in the tool description.
5. Cross-Platform Divergence — The most powerful signal (Twitter leads, Google lags) is also the hardest to time. We learned that the alpha window is roughly 2-4 hours — after that, all platforms converge.
What We Learned
- Culture is alpha. The same price spike means completely different things depending on whether it's driven by a new meme birth or trend exhaustion.
- Human-in-the-loop is a feature, not a limitation. The agent is fully autonomous in perception and analysis. The only thing it asks is a final yes or no — because when it comes to your money, you should always have the last word.
- Phone calls > notifications. A Slack ping gets ignored. A phone call from your AI trading buddy saying "YOOO BOSS" gets answered.
What's Next
- Auto Mode: Confidence > 95% → skip the call, execute immediately
- Ghost Mode: Fully autonomous 24/7 trading while you sleep
- Position Management: Proactive calls for stop-loss and take-profit
- Multi-agent: Different personality agents for different market sectors

Log in or sign up for Devpost to join the conversation.