simulatecraft.minecraft.observations¶
simulatecraft.minecraft.observations
¶
Typed Minecraft observation models.
MinecraftObservation is what the environment hands to an agent's brain each
tick. It extends the base Observation with rich Minecraft-specific fields so
the LLM prompt gets structured, token-efficient context instead of a raw JSON
blob.
The data is populated by MinecraftEnvironment.observe() which queries the
Mineflayer bot over the IPC bridge.
Vec3
¶
Bases: BaseModel
3-D float coordinate.
InventoryItem
¶
Bases: BaseModel
One stack in the bot's inventory.
NearbyBlock
¶
Bases: BaseModel
A block within the scan radius.
NearbyEntity
¶
Bases: BaseModel
A mob or player the bot can see.
ChatMessage
¶
Bases: BaseModel
One line from the Minecraft chat log.
BotStats
¶
Bases: BaseModel
Vital statistics of the bot.
RecipeInfo
¶
Bases: BaseModel
A craftable item the bot currently has materials for.
MinecraftObservation
¶
Bases: Observation
Full structured state snapshot handed to the agent brain each tick.
All fields have sensible defaults so partial observations work: the bridge can omit fields it hasn't queried yet and the brain still gets a valid model.
nearby_blocks
class-attribute
instance-attribute
¶
nearby_blocks: list[NearbyBlock] = Field(default_factory=list)
Blocks within the configured scan radius, sorted by distance.
nearby_entities
class-attribute
instance-attribute
¶
nearby_entities: list[NearbyEntity] = Field(default_factory=list)
Mobs and players the bot can detect.
chat_log
class-attribute
instance-attribute
¶
chat_log: list[ChatMessage] = Field(default_factory=list)
Last N chat messages (configurable in MinecraftEnvironment).
render
¶
Compact text summary injected into the LLM prompt.