The bug
/agent is an education edition command. Running it is disabled in vanilla bedrock worlds, even for operators. However, it can be accessed via NPC dialogue.
How to reproduce
Type
/agent create
-> ✔ Nothing happens: you don’t have permission/summon npcInteract with the NPC in creative mode
Click “advanced settings”
Click “add command”
Type
execute as @p run agent createClick “button mode”
Click back
Click “edit dialog”
Click the button
Expected result
Nothing should happen, you still don’t have permission
Observed result
An agent is spawned in a vanilla bedrock world. It’s permanent and impossible to remove or interact with. Due to MCPE-229817 and MCPE-99760, this also leaves a permanent ticking area in your world that cannot be removed.