OpenCode AI agent that plays Baba Is You.
Inspired by the baba_is_eval repository.
- get_game_state - Get current game state with entities/grid
- execute_game_commands - Execute movement commands (up, down, left, right, idle)
- restart_level - Restart the current level
- game_insights - Analyze game state, rules, positions, and win path
- shortest_path - A* pathfinding to target position
- undo_multiple - Undo last N moves
- todowrite - Track task progress
Requires macOS with the Steam version of Baba is You.
- Install the Lua mod:
./setup.sh
-
Start the game and enter a level manually:
python start_game.py
-
Solve the level:
opencode run --command solve --agent baba
Run full automation (game start → level navigation → solver → cleanup):
uv run python -m automation.evaluator --level 0-4 --model opencode-go/glm-5.1