Skip to main content

Agent Actions Reference

This page documents all 23 actions available to ElizaOS agents in Hyperscape. Actions are the executable commands that agents use to interact with the game world.
Actions are defined in packages/plugin-hyperscape/src/actions/. As of PR #628, agents use a THINKING+ACTION format for transparent decision-making.

Action Categories

Movement

6 actions for navigation

Combat

3 actions for fighting

Skills

5 actions for gathering/crafting

Inventory

4 actions for item management

Social

1 action for communication

Banking

2 actions for storage

Goals

2 actions for planning

World Interaction

1 action for world objects

Movement Actions

moveTo

Move to specific coordinates.
Usage: Navigate to resources, NPCs, or destinations.

followEntity

Follow another player or NPC.
Usage: Follow players for social interaction or group activities.

stopMovement

Stop all movement.
Features:
  • Movement Cancellation: Sends cancel: true flag to clear server-side path
  • Immediate Stop: Prevents “walking in place” bug
  • Path Clearing: Removes queued movement commands
Usage: Halt when reaching destination or when threatened.

explore

Explore the surrounding area.
Usage: Discover new areas, find resources.

approachEntity

Move closer to an entity for interaction.
Usage: Get within combat or interaction range.
Navigate to a named location.
Features:
  • Named Locations: Use location names instead of coordinates
  • Distance Stepping: Automatically handles server’s 200-tile movement limit
    • Moves in 150-tile steps for safety margin
    • Shows progress: “Moving towards bank (50 units remaining)”
  • Multi-Step Navigation: Continues moving until destination reached
Usage: Navigate using location names instead of coordinates. Long-Distance Movement: The server has a 200-tile movement limit. For destinations beyond this range, the action automatically moves in steps:
  1. Calculates intermediate waypoint (150 tiles toward destination)
  2. Moves to waypoint
  3. On next tick, continues toward destination
  4. Repeats until destination reached
This prevents movement command rejection while maintaining progress toward distant goals.

Combat Actions

attackEntity

Attack a target entity.
Usage: Engage mobs or hostile players.

changeCombatStyle

Change combat style for XP distribution.
Usage: Train specific combat skills.

flee

Escape from combat.
Usage: Escape when low on health.

Skill Actions

chopTree

Chop a tree for logs.
Requirements: Hatchet in inventory, Woodcutting level. Validation: Checks for trees within 20m approach range, filters by level requirement, walks to tree if needed.

mineRock

Mine a rock for ore.
Requirements: Pickaxe in inventory, Mining level. Validation: Checks for rocks within 20m approach range, filters by level requirement, walks to cardinal adjacent tile before mining.
Added in PR #628 to support mining skill training for AI agents.

catchFish

Catch fish at a fishing spot.
Requirements: Fishing rod in inventory, Fishing level.

lightFire

Light logs to create a fire.
Requirements: Tinderbox and logs in inventory.

cookFood

Cook raw food on a fire.
Requirements: Raw food in inventory, fire nearby.

mineRock

Mine a rock to gather ore.
Requirements: Pickaxe in inventory, Mining level. Features:
  • Automatically walks to nearest cardinal-adjacent tile
  • Validates Mining level requirements for rock type
  • Filters out depleted rocks
  • Handles copper, tin, iron, coal, mithril, adamant, rune ores

Inventory Actions

equipItem

Equip an item from inventory.
Usage: Equip weapons, armor, tools.

useItem

Use a consumable item.
Usage: Heal with food, buff with potions.

dropItem

Drop an item on the ground.
Usage: Make room in inventory, drop unwanted items. Special Features:
  • Drop All: Use “drop all” to drop entire inventory
  • Drop All Type: Use “drop all logs” to drop all items of a specific type
  • Smart Matching: Uses word-boundary scoring to match correct items
  • Safety Limits: Max 50 items per drop-all operation
  • Failure Protection: Stops after 3 consecutive failures
Examples:

pickupItem

Pick up an item from the ground.
Usage: Collect loot, gather dropped items. Features:
  • Smart Matching: Word-boundary scoring prevents false matches
  • Auto-Walk: Automatically walks to items beyond pickup range (4m)
  • Distance Stepping: Handles server’s 200-tile movement limit
  • Nearest Fallback: Picks nearest item if no name match
Scoring System: typescript\n// Prevents "bronze pickaxe" matching "bronze hatchet"\n"Bronze Pickaxe" → "pick up bronze pickaxe" = 30 points (both words match)\n"Bronze Hatchet" → "pick up bronze pickaxe" = 15 points (only "bronze" matches)\n// Agent picks the item with highest score\n Examples: \n"pick up bronze pickaxe" → Walks to and picks up Bronze Pickaxe (not Hatchet)\n"grab that sword" → Picks up nearest sword\n"loot the coins" → Picks up Coins\n

Social Actions

chatMessage

Send a chat message.
Usage: Communicate with other players.

Banking Actions

bankDeposit

Deposit items into bank.
Requirements: Must be at a bank.

bankWithdraw

Withdraw items from bank.
Requirements: Must be at a bank, item must be in bank.

Goal Actions

setGoal

Set a new goal using LLM with goal templates.
How it works (PR #628):
  1. Goal Templates Provider supplies scored goal options:
    • woodcutting_basics - Chop trees for logs
    • mining_basics - Mine rocks for ore
    • combat_training_goblins - Fight goblins
    • bronze_gear_chain - Mine → smelt → smith
    • acquire_starter_tools - Get basic tools
    • And more…
  2. LLM selects best goal based on:
    • Current skills and levels
    • Inventory contents
    • Nearby resources
    • Combat readiness
    • Recent goal history (diversity penalty)
  3. Goal is set with target, progress tracking, and location
Example LLM Selection:
Goal Types:
  • combat_training - Train combat skills
  • woodcutting - Train woodcutting
  • mining - Train mining
  • smithing - Smelt and smith
  • fishing - Catch fish
  • firemaking - Burn logs
  • cooking - Cook food
  • exploration - Discover areas
  • starter_items - Get basic tools
When goals are paused (via dashboard Stop button), SET_GOAL is automatically blocked and replaced with IDLE. This prevents agents from auto-selecting new goals until the user resumes or sets a manual goal.

idle

Wait without taking action.
Features:
  • Movement Cancellation: Stops current movement with cancel: true flag
  • Pause State: Used when goals are paused by user
  • Observation Mode: Agent stands still and observes surroundings
Usage: Wait for events, conserve resources, or when goals are paused.

World Interaction Actions

lootStarterChest

Interact with the starter chest to get starter equipment.
Usage: New players/agents should use this to acquire basic tools and food. Starter Items:
  • Bronze hatchet (woodcutting)
  • Bronze pickaxe (mining)
  • Tinderbox (firemaking)
  • Small fishing net (fishing)
  • Bread x5 (food)
Location: Near spawn at coordinates (5, 0, -20) Restrictions: Only works once per character

World Interaction Actions

lootStarterChest

Loot the starter chest for basic tools (one-time per character).
Starter Items:
  • Bronze hatchet (woodcutting)
  • Bronze pickaxe (mining)
  • Tinderbox (firemaking)
  • Small fishing net (fishing)
  • Shrimp x5 (food)
Location: Near spawn at coordinates (5, 0, -20) Behavior: If chest not nearby, agent walks to known location first.
Added in PR #628 to help new agents bootstrap their equipment.

Action Execution

Actions are executed through the HyperscapeService:

Action Selection (THINKING+ACTION Format)

As of PR #628, agents use a structured decision format:

Selection Pipeline

  1. Providers - Gather game context (10 providers)
  2. Compose State - Merge provider data
  3. Evaluators - Assess opportunities (5 evaluators)
  4. LLM Prompt - Build action selection prompt with OSRS common sense rules
  5. LLM Response - Generate THINKING+ACTION
  6. Parse - Extract reasoning and action name
  7. Validate - Check if action is possible
  8. Execute - Perform action via HyperscapeService

Survival Override

Before LLM selection, a force flee check runs:
This ensures agents survive even if the LLM makes poor decisions.

Target Locking

During combat, agents lock onto targets for 30 seconds:
This prevents agents from switching between targets without finishing kills.