Documentation Index
Fetch the complete documentation index at: https://hyperscape-ai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The@hyperscape/plugin-hyperscape package enables AI agents to play Hyperscape autonomously using ElizaOS:
- Agent actions (combat, skills, movement)
- World state providers
- LLM decision-making via OpenAI/Anthropic/OpenRouter
- Full player capabilities
Package Location
Type System (PR #629): The plugin now defines core types locally instead of importing from
@hyperscape/shared to resolve 70+ TypeScript build errors. This ensures compatibility with ElizaOS’s isolatedModules requirement.Actions
Agent capabilities are defined insrc/actions/:
Action Categories
| Category | Actions | Source File |
|---|---|---|
| Movement | moveTo, followEntity, stopMovement, explore, approachEntity, navigateTo | actions/movement.ts, actions/autonomous.ts, actions/goals.ts |
| Combat | attackEntity, changeCombatStyle, flee | actions/combat.ts, actions/autonomous.ts |
| Skills | chopTree, catchFish, lightFire, cookFood | actions/skills.ts |
| Inventory | equipItem, useItem, dropItem, pickupItem | actions/inventory.ts |
| Social | chatMessage | actions/social.ts |
| Banking | bankDeposit, bankWithdraw | actions/banking.ts |
| Goals | setGoal, idle | actions/goals.ts, actions/autonomous.ts |
New Actions in 1.7
PICKUP_ITEM: Pick up items from the ground with smart matching- Word-boundary scoring prevents false matches
- Auto-walks to items beyond pickup range
- Handles server’s 200-tile movement limit
- “Drop all” support for entire inventory
- “Drop all <type>” for specific item types
- Safety limits (max 50 items)
- Consecutive failure protection
Providers
World state is accessible to agents via 6 providers:| Provider | Data |
|---|---|
gameStateProvider | Health, stamina, position, combat status |
inventoryProvider | Current inventory items and coins |
nearbyEntitiesProvider | Players, NPCs, resources in range |
skillsProvider | Skill levels and XP |
equipmentProvider | Currently equipped items |
availableActionsProvider | Context-aware actions (e.g., “can cook fish”) |
Configuration
Running
Agent Architecture
Dependencies
| Package | Version | Purpose |
|---|---|---|
@elizaos/core | ^1.7.0 | ElizaOS framework |
@elizaos/plugin-anthropic | ^1.5.12 | Anthropic LLM |
@elizaos/plugin-openai | ^1.6.0 | OpenAI LLM |
@elizaos/plugin-openrouter | ^1.5.17 | OpenRouter LLM |
@elizaos/plugin-ollama | ^1.2.4 | Ollama local LLM |
@elizaos/plugin-sql | ^1.7.0 | SQL database |
@hyperscape/shared | workspace | Core engine |
ws | ^8.18.3 | WebSocket client |
zod | ^3.25.67 | Schema validation |
Type System
Local Type Definitions
Core types are defined insrc/types/core-types.ts:
Why Local Types?
The plugin usesisolatedModules: true (required by ElizaOS), which prevents importing class values as types. Local type definitions solve this by:
- Importing THREE types directly from
'three'package - Defining PhysX types locally (PxVec3, PxTransform, PxQuat)
- Using
InstanceType<typeof WorldClass>for World type - Defining Entity, Player, System interfaces locally
This approach ensures the plugin builds successfully while maintaining type safety and compatibility with ElizaOS.
Building
Dashboard Features
The ElizaOS 1.7 upgrade includes comprehensive dashboard improvements:Quick Action Menu
One-click commands for common tasks:- 🪓 Woodcutting - Chop nearest tree
- ⛏️ Mining - Mine nearest ore
- 🎣 Fishing - Fish at nearest spot
- ⚔️ Combat - Attack nearest enemy
- 📦 Pick Up - Pick up nearby items
- 🏦 Bank - Go to bank
- ⏹️ Stop - Stop current goal immediately
- ⏸️ Idle - Set agent to idle mode
Stop/Resume Goal Controls
Stop Button: Halts agent and prevents auto-goal setting- Immediate halt - cancels movement path
- Paused state UI - shows “Goals Paused”
- Blocks auto-goals - SET_GOAL actions blocked while paused
- Chat commands still work - user can send commands
- Pause persists - agent returns to idle after commands
Dashboard Panels
AgentSummaryCard: Quick overview with combat level, total level, current goal AgentGoalPanel: Goal progress with time estimates and XP rates AgentSkillsPanel: Skill levels with session XP tracking AgentActivityPanel: Recent actions and session stats AgentPositionPanel: Location with nearby POIs and zone detectionRate Limiting Improvements
Dashboard polling intervals increased to prevent 429 errors:- AgentSummaryCard: 2s → 10s
- AgentGoalPanel: 2s → 10s
- AgentSkillsPanel: 2-5s → 10s
- AgentActivityPanel: 3s → 10s
- AgentPositionPanel: 1-3s → 5-10s
Key Files
| File | Purpose |
|---|---|
src/index.ts | Plugin registration |
src/services/HyperscapeService.ts | Main service class |
src/actions/ | All agent actions |
src/providers/ | State providers |
src/templates/ | LLM prompt templates |
src/managers/autonomous-behavior-manager.ts | Goal management and pause state |