About AI Player
From Factorio Mod PortalAdds an autonomous AI player that uses LM Studio/Open ai to play Factorio. The AI can build, mine, craft, fight, and interact with the world.
Warning I will not continue working on this mod as I have realized how much of a challenge it is and I am not ready for that It is still functional but it's not great. Multiplayer does not work and I never have plans to make it work
Quick Start Guide - AI Player Mod
Setup (5 minutes)
Step 1: Install LM Studio
- Download LM Studio from https://lmstudio.ai/
- Install and launch LM Studio
- In LM Studio, download the Qwen3-VL-4B model
- Click "Start Server" (usually on port 1234)
- Load the Qwen3-VL-4B model in the server
Step 2: Start the Bridge
Run the Start_bridge.VBS. This will create and install the necessary files. Or you can run it manually As shown below.
Windows (PowerShell):
python -m pip install requests factorio-rcon
python lm_studio_bridge.py
macOS/Linux:
python3 -m pip install requests factorio-rcon
python3 lm_studio_bridge.py
Keep the terminal window open — it bridges Factorio to LM Studio via RCON. You should see "Bridge is running. Waiting for requests...".
Step 3: Launch Factorio
- Start Factorio
- Enable the "AI Player" mod if not already enabled
- Start or load a game (single-player or multiplayer with RCON enabled)
Step 4: Spawn the AI
- Open console with
~key (tilde) - Type:
/spawn-ai-player - Press Enter
What to Expect
The AI player will:
- Appear as a separate character in your world
- Start exploring and gathering resources
- Mine trees, rocks, and ore deposits
- Build basic structures
- Defend itself from enemies
- Occasionally chat about its status
Console Commands
| Command | Description | |---------|-------------| | /spawn-ai-player | Create/reset the AI player | | /remove-ai-player | Remove the AI player | | /goto-ai-player | Teleport to the AI's location |
Troubleshooting
AI isn't moving:
- Check the bridge script is running
- Verify LM Studio server is active (green indicator)
- Check console for error messages
Bridge shows errors:
- Ensure LM Studio is running on port 1234
- Check the model is loaded in LM Studio
- Verify Python and requests library are installed
AI keeps dying:
- Enable auto-respawn in mod settings
- Give the AI some starting defenses
- Clear enemies near spawn point
Performance issues:
- Increase tick interval in mod settings (Settings → Mod Settings → Map)
- Reduce vision radius
- Lower LM Studio's token limit
Advanced Configuration
Edit mod settings in-game:
- Settings → Mod Settings → Map
- Find "AI Player" section
- Adjust:
- Tick interval (higher = slower but less lag)
- Vision radius (lower = less data, faster)
- Enable/disable chat
- Auto-respawn setting
Tips
- Watch the AI learn: Use
/goto-ai-playerto follow it around - Help the AI: Drop resources near it to speed up progress
- Team play: The AI is friendly with players by default
- Multiple AIs: You can spawn multiple instances (edit global.ai_player table)
Next Steps
- Customize the AI's goals by editing the system prompt in
scripts/ai_brain.lua - Add new actions in
scripts/ai_actions.lua - Modify starting items in
scripts/ai_character.lua - Adjust perception detail in
scripts/ai_perception.lua
Need Help?
- Check README.md for detailed documentation
- Review Factorio log file for errors
- Ensure all files are in the correct mod directory
- Verify Factorio version compatibility (2.0+)
Enjoy watching your AI player build a factory!
Highlights
From source dataGame versions
Built for Factorio 2.0.
Footprint
Rated a light load on a server.
License
Published under MIT.
AI Player on Nxeon
From our catalogue- One-click install
- Supported on Nxeon Factorio servers. We download it from Factorio Mod Portal, place it, and restart the server.
- Server side
- Required on the server
- Server load
- light
- Smallest plan we suggest
- Factorio — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 0.1.2, released 2026-01-11
Run AI Player on a Factorio server
Pick a server or deploy a new one above; it is installed in one click.
What kind of mod it is
From the catalogBuilding & decoration
Blocks, furniture, decorations and building tools.
Runs on your server
From source side supportFactorio Mod Portal lists AI Player as required on the server. Check its Factorio Mod Portal page to see whether players need it too.
Compatibility
- Game
- Factorio
- Runs on
- Serverrequired on the server
- Game versions
- 2.0
Verified at the source
- ✓Factorio Mod PortalOfficial listing, checked 2026-10-08Open ↗
- ✓Authorob_105, as published on Factorio Mod Portal
- ✓LicenseMITFree
