Autonomous AI agent for Molty Royale β handles account creation, identity registration, gameplay, and cross-game learning. Features a real-time web dashboard for live monitoring.
# 1. Install dependencies
pip install -r requirements.txt
# 2. Copy env template
cp .env.example .env
# 3. Run the bot (first run = interactive setup)
python -m bot.mainThe bot comes with a built-in real-time web dashboard!
When running locally, open: http://localhost:8080 When running on Railway, click the provided domain link.
Features:
- Live Metrics: Agents, Playing, Dead, Moltz, sMoltz, CROSS
- Agent Overview: Real-time status, HP/EP bars, Inventory, Enemies
- Live Logs: Real-time streaming log panel that auto-updates
- Coming Soon: Multi-account management, export/import, data analytics
| Env Variable | Default | Description |
|---|---|---|
ROOM_MODE |
free |
free (default) / auto / paid |
ADVANCED_MODE |
true |
Auto-manage Owner EOA & whitelist |
LOG_LEVEL |
INFO |
DEBUG / INFO / WARNING |
WEB_PORT |
8080 |
Port for the web dashboard |
docker build -t molty-bot .
docker run --env-file .env -p 8080:8080 -it molty-botgit init
git add .
git commit -m "Molty Royale AI Agent"
git remote add origin https://github.com/YOUR_USER/molty5.git
git push -u origin main- Go to railway.com β New Project β Deploy from GitHub
- Select your
molty5repo - Go to Settings β Networking β Generate Domain (to access the dashboard)
Go to your service β Variables tab β add these:
Required (You fill these):
| Variable | Value | Description |
|---|---|---|
AGENT_NAME |
YourBotName |
Agent name (max 50 chars) |
ADVANCED_MODE |
true |
Bot auto-generates Owner EOA |
ROOM_MODE |
free |
free / auto / paid |
LOG_LEVEL |
INFO |
Logging level |
RAILWAY_API_TOKEN |
(see below) | Required to auto-save credentials |
Auto-generated (DO NOT FILL):
| Variable | Description |
|---|---|
API_KEY |
Auto-filled after POST /accounts |
AGENT_WALLET_ADDRESS |
Auto-generated Agent EOA |
AGENT_PRIVATE_KEY |
Auto-generated Agent private key |
OWNER_EOA |
Auto-generated Owner EOA |
OWNER_PRIVATE_KEY |
Auto-generated Owner private key |
- Go to railway.com/account/tokens
- Create new token β copy
- Add as
RAILWAY_API_TOKENin Variables
Why? The bot uses this token to automatically save its generated API Keys and wallets directly into your Railway environment variables. This ensures persistence across redeploys without needing external databases.
bot/
βββ main.py # Entry point
βββ heartbeat.py # Main loop (state machine)
βββ dashboard/ # Command Center Web UI
βββ setup/ # Account + wallet + whitelist + identity
βββ game/ # WebSocket engine + game strategy
βββ strategy/ # Combat AI + movement + guardian farming
βββ web3/ # EIP-712, contracts, wallet management
βββ memory/ # Cross-game learning
βββ utils/ # Logger, rate limiter, Railway sync