Agent

In Minecraft Education and worlds connected to a WebSocket server, the agent is a mob that helps players learn coding, by allowing players to program actions into it. The agent can be programmed to execute several tasks, like planting and harvesting, mining, and building.
In a Bedrock Edition world not connected to a WebSocket server, it is unused and thus has no AI unless spawned by putting the command execute @p ~ ~ ~ agent create or in 1.19.10+ you can summon with execute as @p run agent create into an NPC, but can still store items given to it by the player in its inventory. It can also teleport between dimensions with the player. It can be spawned using its spawn egg, obtainable with /give @s spawn_egg 1 56 .
== Usage ==
In Minecraft Education, the agent is used in conjunction with Code Connection for Minecraft / Code Builder, and is programmable by a .
In Minecraft Education and Bedrock Edition, the agent can be used in conjunction with WebSocket servers. 
The agent carries its own 27-item inventory, which can be manipulated by commands that the player programs it to use, or edited directly by a GUI that the player can access in-game, in any dimension.
The visual interface allows the player to drag and drop commands, structural constructs and other components into a sequence, and associate the sequence with a custom-named slash command, which can be executed in the traditional way, from the console.
The agent can push push pressure plates. It can interact with buttons, levers, and other right-click mechanisms like doors and fence gates. 
=== Agent commands ===
* attack <direction>
* destroy <direction>
* drop <int:slotNum> <int:quantity> <direction>
* drop all <direction>
* move <direction>
* turn <turnDirection>
* inspect <direction>
* inspect data <direction>
* detect <direction>
* detectredstone <direction>
* transfer <int:srcSlotNum> <int:quantity> <int:dstSlotNum>
* create agent
* remove agent
* teleport to player
* teleport to location facing direction
* collect <string:item>
* till <direction>
* place <int:slotNum> <direction>
* place on move<int:slotNum> <true/false>
* get item count <int:slotNum>
* get item space <int:slotNum>
* get item detail <int:slotNum>
<direction> refers to forward|back|left|right|up|down
<turnDirection> refers to left|right
== Sounds ==
== Data values ==
=== ID ===
== History ==
== Trivia ==
*The agent is seen in the official image of .
*The agent is the only mob exclusive to . also contains resources for the mob. However, the mob is unusable, and invisible in game. By installing Code Connection, it is possible to use in on Windows.
*On the free 10th-anniversary map that @BlockworksYT released, there is a puzzle in the "Library" area that involves controlling the Agent with glazed terracotta. On the Bedrock Edition version of the map, the agent is added in as a new mob, while on Java Edition, it is an armor stand with remodeled infested chiseled stone bricks on its head.
*The agent spawn egg can be obtained using . However, when spawned via the spawn egg, it is completely invisible.
== Gallery ==
Agent - 1.png|An agent.
Code Builder Update.png|Agent in the official image.
Learn to Code Update.png|An Agent in promotional artwork for the Learn to Code Update.
GOAT Update.jpg|An Agent in promotional artwork for the GOAT Update.
Mobile, Multiplayer & More.png|An Agent in promotional artwork for Mobile, Multiplayer & More.
Category:Passive mobs
Category:Education Edition mobs
de:Agent
fr:Agent
ja:エージェント
pl:Agent
pt:Agente
ru:Агент
zh:智能体