Minecraft wiki entry for agent, associated text: /agent is a command used to control an agent. Agent control commands are only allowed to be executed by the WebSocket side to which the player is connected, and the player cannot execute the command directly in the game.