SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedQuality of life & UI

FV Embodied Agent

by harsooo · for Factorio

Embodied agent mod providing actions, entity interface, and agent lifecycle for Factorio

24Downloads
11 mo agoLast updated
MITLicense
Factorio Mod PortalSource

About FV Embodied Agent

From Factorio Mod Portal

Embodied agent mod providing actions, entity interface, and agent lifecycle for Factorio

FV Embodied Agent

A framework for programmatic control of embodied character agents in Factorio. Provides a complete agent system with actions, state machines, and remote interfaces for external control via RCON.

Overview

fv_embodied_agent enables programmatic control of character entities in Factorio. It provides agent lifecycle management, an action system, and a remote interface for external control. The mod is generic and reusable—it makes no assumptions about snapshot systems, file I/O, or external databases.

Core Features

Agent Lifecycle

  • Multi-Agent Support: Create and manage multiple agents with unique IDs
  • Force Management: Each agent can have its own force or share a common force
  • Persistent State: Agent instances persist across saves using Factorio's metatable registration
  • Hot Reload Support: Agents survive mod reloads without losing state
  • Custom Events: Raises events for agent creation, removal, and chunk charting

Action System

The mod provides a comprehensive action system organized into async and sync operations:

Async Actions (Return immediately, completion via UDP)

  • Movement: walk_to(goal, strict_goal?, options?) - Pathfinding-based movement with obstacle avoidance. Automatically adjusts goals if target position is inside an entity.
  • Mining: mine_resource(resource_name, max_count?) - Mine resources (ores, trees, rocks). Use max_count for incremental mining, or omit to deplete the resource completely.
  • Crafting: craft_enqueue(recipe_name, count?) - Queue hand-crafting recipes. Agent crafts automatically when ingredients are available.

Synchronous Actions (Complete immediately)

  • Entity Placement: place_entity(entity_name, position, options?) - Place entities in the world with automatic placement validation
  • Machine Configuration:
  • set_entity_recipe(entity_name, position?, recipe_name?) - Configure machine recipes (assemblers, furnaces, chemical plants)
  • set_entity_filter(entity_name, position?, inventory_type, filter_index?, filter_item?) - Set inventory filters on inserters and containers
  • set_inventory_limit(entity_name, position?, inventory_type, limit) - Configure inventory slot limits
  • Inventory Management:
  • get_inventory_item(entity_name, position?, inventory_type, item_name, count) - Extract items from entity inventories
  • set_inventory_item(entity_name, position?, inventory_type, item_name, count) - Insert items into entity inventories
  • Entity Pickup: pickup_entity(entity_name, position?) - Pick up entities from the world into agent inventory
  • Research: enqueue_research(technology_name), cancel_current_research() - Manage technology research
  • Charting: chart_view(rechart?) - Chart chunks within agent's view for map exploration

Query Methods

  • inspect(attach_state?) - Get agent state, position, and optionally detailed activity state (walking, mining, crafting)
  • get_reachable() - Find all entities and resources within reach, with full entity data (recipes, inventory contents, fuel, etc.)
  • get_placement_cues(entity_name) - Get placement hints and requirements for entities
  • get_recipes() - Query available recipes for the agent's force
  • get_technologies(only_available?) - Query research technologies

State Machines

Built-in state machines track agent activities and run on every tick:

  • Walking State Machine: Tracks pathfinding progress, waypoint completion, and arrival. Sends UDP notifications for pathfinding start, progress updates, and completion.
  • Mining State Machine: Tracks mining progress, entity depletion, and item collection. Handles both incremental and deplete modes, with special handling for stochastic resources (like huge-rock).
  • Crafting State Machine: Tracks queued recipes and completion status. Monitors agent's crafting queue and sends completion notifications.

All state machines send UDP notifications for action lifecycle events (queued, progress, completed, cancelled) to enable external systems to track agent activities.

Remote Interface System

  • Per-Agent Interfaces: Each agent gets its own remote interface (agent_1, agent_2, etc.) for direct control
  • Admin Interface: Global agent interface for agent lifecycle management (create, destroy, list agents)
  • Schema Export: Full method schemas with parameter validation for external bindings and documentation
  • Parameter Validation: Automatic parameter normalization and validation using ParamSpec system
  • Type Safety: Position, entity name, recipe, and inventory type validation

Event System

  • Custom Events: on_agent_created, on_agent_removed, on_chunk_charted - Subscribe to agent lifecycle events
  • UDP Notifications: Action lifecycle events sent via UDP for external systems (action queued, progress, completed, cancelled)
  • Message Queue: Agents enqueue messages that are processed by game state on each tick

Architecture

The mod is organized into modular action categories:

  • walking.lua - Movement and pathfinding with obstacle avoidance
  • mining.lua - Resource mining with incremental and deplete modes
  • crafting.lua - Hand-crafting queue management
  • placement.lua - Entity placement with validation
  • entity_ops.lua - Entity manipulation (recipes, filters, inventory)
  • charting.lua - Map charting and exploration
  • researching.lua - Technology research management
  • reachability.lua - Entity reachability queries with rich data serialization
  • RemoteInterface.lua - Remote interface registration and schema export

Use Cases

  • AI Agents: Control AI agents that interact with the Factorio world programmatically
  • Automation Scripts: Write scripts to automate complex game actions

Read the full description on Factorio Mod Portal →

Highlights

From source data

Footprint

Rated a light load on a server.

License

Published under MIT.

Last update

Its author last shipped an update 11 mo ago.

FV Embodied Agent 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.3, released 2025-12-19

Recent builds

BuildReleasedGame versionsLoaders
0.1.32025-12-192.0n/a
0.1.22025-12-162.0n/a
0.1.12025-12-152.0n/a
0.1.02025-12-152.0n/a

Run FV Embodied Agent 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”

Quality of life & UI

Small conveniences, tweaks and interface improvements players notice straight away.

Runs on your server

From source side support

Factorio Mod Portal lists FV Embodied Agent 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

Verified at the source

  • ✓Factorio Mod PortalOfficial listing, checked 2026-10-16Open ↗
  • ✓Authorharsooo, as published on Factorio Mod Portal
  • ✓LicenseMITFree

FV Embodied Agent, answered

Generated from the mod’s own source data.

Do my players need to install FV Embodied Agent?

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

Is it free?

Yes. FV Embodied Agent 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 FV Embodied Agent on a Factorio server.

Deploy in about a minute from $2.99 a month, then add FV Embodied Agent in one click.