Skip to content

feat: Pokemon Battle World Agent + world manifest protocol #67

@Jing-yilin

Description

@Jing-yilin

Summary

When an agent joins a world via world.join, the response should include a manifest describing the world rules, available actions, and objectives. This lets AI agents understand how to play without external docs.

Create a Pokemon Battle World Agent (world/pokemon.mjs) as the first game world:

  • Uses @pkmn/sim + @pkmn/randoms for battle engine (MIT license)
  • 1v1 battles with 3 random Gen 1 Pokemon each
  • Single-player mode: agent vs built-in RandomAI
  • Returns structured battle state on each turn
  • Sends world manifest on join explaining rules + action format

Protocol: World Manifest

world.join response includes manifest field:

{
  "type": "world.welcome",
  "manifest": {
    "name": "Pokemon Battle Arena",
    "description": "Turn-based Pokemon battle. Defeat opponent 3 Pokemon to win.",
    "actions": { "move": { "params": { "slot": "1-4" } }, "switch": { "params": { "slot": "1-3" } } }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions