-
Notifications
You must be signed in to change notification settings - Fork 0
Worlds
bdambrosio edited this page Jan 9, 2026
·
1 revision
World integrations enable agents to interact with specific environments (e.g., Minecraft, OSWorld, ScienceWorld). Each world provides its own tools and state management.
Worlds are enabled per character via world_config in scenario YAML:
world_config:
world_name: "minecraft" # Loads tools from src/world-tools/minecraft/
state: '{"nav": [{"pose": {...}}]}' # Initial world_state JSON stringWorld-specific tools are loaded from src/world-tools/<world_name>/:
- Each tool is a subdirectory with
Skill.mdandtool.py - Tools are loaded after core tools (so world tools can override core tool names if needed)
- Tool catalog groups world tools under
#<WORLD_NAME>header
InfospaceExecutor maintains a persistent world_state dictionary for the active world:
Initialization:
- Parsed from
world_config.stateJSON string on executor startup - If missing or invalid, initializes to empty dict
{}
Access:
-
executor.get_world_state(field_name)- Get a top-level field -
executor.set_world_state(field_name, value)- Set a top-level field -
set_world_stateautomatically publishes updates tocognitive/{character}/world_stateZenoh topic
UI Display:
- The FastAPI UI has a State tab that displays
world_stateformatted as JSON - Updates automatically when
set_world_stateis called
If a tool named init (or <world_name>-init) exists in src/world-tools/<world_name>/, it is automatically executed after executor initialization:
- Runs via
execute_action_with_log()(so it's logged and published) - Typically normalizes initial pose/state and seeds
world_state - Example:
minecraft/initnormalizes agent pose to block center, cardinal yaw, pitch zero
World-specific resources are stored in scenarios/<world_name>/resources/:
- Notes and Collections:
resources.json - Vector indexes:
*.faissand*.metafiles - World-specific data: e.g.,
Jill_spatial_map.jsonfor Minecraft
Note: scenarios/*/resources/ is in .gitignore (runtime-generated).
- Tools:
mc-status,mc-observe-blocks,nav-step,nav-turn,mc-map-update, etc. - State:
world_state.navis a list of navigation history (most recent first, bounded to 100) - Mapping: Uses
SpatialMapfor cell-based spatial memory - See Minecraft for detailed documentation
- Tools: OS interaction primitives
- State: TBD
- Tools: Science experiment primitives
- State: TBD
- Create
src/world-tools/<world_name>/directory - Add tools as subdirectories (each with
Skill.mdandtool.py) - Optionally create
inittool for state normalization - Update scenario YAML with
world_config.world_name - Optionally define initial
world_config.stateJSON
-
Initialize in
inittool: Normalize initial state on startup -
Update on state changes: Tools that change world state should call
set_world_state -
Use structured data:
world_statefields should be JSON-serializable -
Document state schema: Document
world_statestructure in world-specific wiki page - Keep state minimal: Only store persistent state, not ephemeral plan-local data