Foundation kit for enemies/NPCs: a data-driven behaviour library (data/enemies/*.json → "behavior": "chase" + params), FSM / utility / boss-phase brains, steering, grid A* (over TileMap2D solids, procgen grids or text) and graph A*, line of sight, aggro radius + leash. Brains are pure (testable headless); ai.attach drives an entity. Example: games/examples/kit-roguelike-demo.
Setup
local ai = require("@kit/ai")
local grid = ai.grid(entity("map"), { solid = "#+" }) -- which tile chars block (TileMap default: the tileset's `solid` flag, map:isSolid)
local ctl = ai.attach(body, enemyData, { grid = grid, target = player })