DEV Community

ryoto miyake
ryoto miyake

Posted on

14Forge: League of Legends Analytics Platform Built with n8n AI Agents and BrightData Web Scraping

n8n and Bright Challenge: Unstoppable Workflow

14Forge - LoL Performance Analytics Platform

This is a submission for the AI Agents Challenge powered by n8n and Bright Data

🏆 Contest Entry - BrightData + n8n Contest 2025

A revolutionary League of Legends analytics platform featuring unique 14-Minute Analysis™ technology, powered by n8n AI Agents and BrightData web scraping.

The Problem

Every League of Legends player faces three critical challenges:

  1. "Why did I lose?" - Statistics alone don't explain defeats
  2. Gap with higher-rank players is invisible - Benchmarks and improvement paths are unclear
  3. Meta information is fragmented - Need to check multiple sites for comprehensive analysis

14Forge solves all of these problems.

Demo

🎥 Live Demo Video

📸 Screenshots

AI Coaching Analysis

AI Coaching
AI Coaching

14-Minute Analysis Dashboard

14-Min Analysis
14-Min Analysis

n8n Workflows

Workflows are publicly available at:

Main workflows:

  • 14coacher.json - Core AI coaching analysis workflow
  • data-dragon-sync - Champion and item data collection from Riot official API
  • Build-Blitz-Collector.json - Meta data collection from Blitz.gg
  • Match-Statistics-Collector.json - Match statistics aggregation

Technical Implementation

n8n AI Agent Workflow

The core workflow consists of 5 main components:

Workflow Components

  1. Webhook Node - Receives match data
  2. BrightData Node - Scrapes current tier and next tier meta data
  3. AI Agent Node - Performance analysis
  4. PostgreSQL Node - Stores results
  5. Response Node - Returns coaching analysis

BrightData Node's Role

The BrightData node plays a crucial role in enabling personalized meta data retrieval:

The workflow generates URLs for both current tier and next tier data. For example, if a player is currently SILVER, it retrieves both SILVER and GOLD tier meta data. This enables the system to provide "realistic next steps" rather than "copying pro players" - a fundamental difference in 14Forge's approach

The system generates two URLs dynamically for each player:

  1. Current Tier Data: Performance benchmarks from the player's current rank
  2. Next Tier Data: Target benchmarks from one rank higher

This tier-based approach ensures players receive achievable, incremental improvement goals rather than unrealistic pro-level targets.

This approach provides:

  • Real-time personalization optimized for the player's rank, server, and patch immediately after match completion
  • Presenting "realistic steps to the next rank" instead of "imitating pros"
  • Completely different advice for SILVER→GOLD vs DIAMOND→MASTER even with the same champion

Additionally, BrightData collects matchup statistics against specific enemy champions and optimal item choices for those matchups, enabling deeper strategic advice. The system also dynamically adjusts recommendations based on the role played.

Innovation: Real-time Personalization

  • Retrieves data optimized for player's rank, server, and patch even right after match ends
  • Provides "realistic steps to next rank" rather than "copying pro players"
  • Different advice for SILVER→GOLD vs DIAMOND→MASTER transitions

🛠️ Technical Challenges and Solutions

AI Match Analysis: Core Innovation

Context Building Optimization

Problem: Conveying complex match situations within LLM token limits

Solution: Implemented a template-based rendering system that dynamically generates prompts based on player context, role, and language preferences.

The system uses the promptContextBuilder.ts service (backend/api/src/services/promptContextBuilder.ts) to:

  • Fetch current patch meta data dynamically from the database
  • Build context with player performance metrics from 14-minute analysis
  • Render templates with actual values using the renderTemplate method that replaces {{placeholders}} with real data
  • Support three languages (English, Japanese, Korean) by dynamically loading locale-specific prompt templates

📈 Achievements

Technical Implementation Success

Caching Strategy:

  • PostgreSQL 6-hour cache (period when meta doesn't change significantly)
  • Immediate response for same matchId requests
  • Cache check implementation within n8n workflow

Response Time:

  • Initial analysis: 2-3 minutes (BrightData scraping + AI analysis)
  • Cached response: 0.5 seconds (PostgreSQL read only)
  • Significant improvement in perceived performance

Multi-language Support:

  • Three language templates (English, Japanese, Korean)
  • Each with culturally appropriate coaching approaches
  • Japanese: Polite improvement suggestions
  • Korean: Competitive and strategic focus
  • English: Direct and metrics-focused

Priority Actions System:
The system provides concrete improvement actions through priority_actions. The n8n workflow (14coacher.json) generates role-specific and time-specific actions based on the player's performance. For example, for support players:

  • "【8-minute goal】Complete support item quest and switch to Oracle Lens"
  • "【3:15-3:30】Level 3-4 assumed, trade with Q+W+E. R not available yet, maintain safe positioning"
  • "Place vision ward at dragon pit entrance at 3:15"

These actions are dynamically generated based on the player's actual performance versus tier-appropriate benchmarks.

🔮 Future Extensibility

  • Pro Scene Integration: Translate pro play patterns into ranked play analysis
  • Analysis Optimization: Current prompt-based approach has limitations; considering fine-tuned sub-AI models for enhanced output

Conclusion

14Forge is not just another statistics tool. It's a platform that answers the "why" and "how" that players truly need. Through the powerful combination of n8n workflow automation and BrightData's reliable data collection, we can provide unprecedented deep insights.

The unique 14-Minute Analysis™ focuses on the critical turning point in matches, while the tier-based progression system ensures every player receives personalized, achievable improvement goals rather than unrealistic pro-level targets.

Top comments (0)