SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedBuilding & decoration

AI Player

by ob_105 · for Factorio

Adds 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.

1.4KDownloads
10 mo agoLast updated
MITLicense
2.0Latest game version

About AI Player

From Factorio Mod Portal

Adds 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

  1. Download LM Studio from https://lmstudio.ai/
  2. Install and launch LM Studio
  3. In LM Studio, download the Qwen3-VL-4B model
  4. Click "Start Server" (usually on port 1234)
  5. 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

  1. Start Factorio
  2. Enable the "AI Player" mod if not already enabled
  3. Start or load a game (single-player or multiplayer with RCON enabled)

Step 4: Spawn the AI

  1. Open console with ~ key (tilde)
  2. Type: /spawn-ai-player
  3. 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:

  1. Settings → Mod Settings → Map
  2. Find "AI Player" section
  3. Adjust:
  • Tick interval (higher = slower but less lag)
  • Vision radius (lower = less data, faster)
  • Enable/disable chat
  • Auto-respawn setting

Tips

  1. Watch the AI learn: Use /goto-ai-player to follow it around
  2. Help the AI: Drop resources near it to speed up progress
  3. Team play: The AI is friendly with players by default
  4. 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 data

Game 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 catalog
Listed on Factorio Mod Portal as “Mods”

Building & decoration

Blocks, furniture, decorations and building tools.

Runs on your server

From source side support

Factorio 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

AI Player, answered

Generated from the mod’s own source data.

Do my players need to install AI Player?

Factorio Mod Portal lists AI Player as required on the server. Check its Factorio Mod Portal page to see whether players need it too.

Is it free?

Yes. AI Player is free to download from Factorio Mod Portal. Its license is MIT.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run AI Player on a Factorio server.

Deploy in about a minute from $2.99 a month, then add AI Player in one click.