Skip to content

JunRong19/MeepyBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: The bot is now offline. Thank you to everyone who tried it and supported the project!

Introduction

Meepy Bot is a League of Legends AI chatbot that you can add as a friend in the game. It uses the LCU (League Client Update) API to receive your messages, process them with AI agents and send replies back in real time.

How to use

Simply send a friend request to Meepy#Bot to get started!

Note: Currently available only in the SEA region.

image

Real-world usage

Instead of relying on traditional methods like web browsing or installing third-party softwares, users can simply message the chatbot directly in-game to retrieve the information they need in real time.

Examples

/msg Meepy#Bot What does Zed build in mid lane?

/msg Meepy#Bot What runes do I take for Shaco jg?

/msg Meepy#Bot What does Aphelios do?

/msg Meepy#Bot Who is the current world champion?

/msg Meepy#Bot Who is the current CEO of Riot Games?

In-game message image

Champ select message image

Features

  1. Custom Commands
    Use !help to view all available commands and how to use them.

  2. Automated Friend Accept
    Automatically accepts friend requests and sends a welcome message.

  3. Web and MCP Agents
    Supports web search functionality and OP.GG MCP agents for retrieving game statistics and information.


Frameworks & Solutions implemented

  • LangChain agents: Set up agents, plug in tools and switch between different models for testing. The community tools made it easy to experiment and build on top of existing components instead of starting from scratch.

  • Retrieval-based tool selection (RAG-style): Vector embedded MCP's tools and retrieve the most relevant ones before passing them to the agent which improves tool selection accuracy and reduces unnecessary context (~3x reduced in token usage)

  • Web search pipeline (SearXNG + Trafilatura + chunking): Self-hosted SearXNG instance to search for relevant URLs, extracts site content with Trafilatura, then chunks the content and uses vector embeddings to retrieve only the most relevant chunks, keeping context small and reducing token usage.

  • Intent classifier: Classifies user's query to decide how to route it between different agents, ensuring each request is handled by the most suitable agent.

  • Safety guardrails: Validates both input queries and output responses to ensure they are relevant to League of Legends, filtering out unrelated or off-topic requests and preventing the model from generating responses that drift away from the game context.

  • Self-healing + fallback system: If the MCP agent encounters an error during tool execution, the error is fed back into the agent to retry and self-correct, successfully resolving the majority of queries (~90%). If the issue persists after retries, the system then falls back to the web search pipeline to retrieve information instead, ensuring the user still receives a response rather than the request failing outright.

Technical flow

AI Flow

Installation

If you would like to modify or set up your own bot, follow the steps below.

1. Install dependencies

pip install -r requirements.txt

2. Set your OpenAI API key

Open src/chatbot.py and set your OpenAI API key.

The bot currently uses OpenAI models. You may modify it if needed.

image

3. Set up SearXNG (Search Engine)

You have two options:

Option A - Run your own SearXNG instance (Docker)

Follow the official guide: https://docs.searxng.org/admin/installation-docker.html

Option B - Use a public instance

You can use a public SearXNG instance here: https://searx.space/

Then open src/agents/web_search.py and update the URL accordingly:

image

4. Run the bot

  1. Log in to the League of Legends client. (This client will be the chatbot receiving user's messages)
  2. Run chatbot.py:
python src/chatbot.py
  1. If everything is done correctly, you should see "Bot is logged in as: {BotName#Tag}" in console.

Credits

About

A League of Legends AI Chatbot using Riot's LCU api and OP.GG mcp.

Resources

License

Stars

Watchers

Forks

Contributors

Languages