Agent

| Health points |
∞ |
|---|---|
| Behavior |
Passive |
| Mob type | |
| Attack strength |
5HP |
| Hitbox size |
Height: 0.93 blocks |
| Spawn |
See Usage |
{
"title": "Agent",
"rows": [
{
"field": "∞",
"label": "(link to Health article, displayed as Health points)"
},
{
"field": "Passive",
"label": "Behavior"
},
{
"field": "(link to Golem article, displayed as Golem)",
"label": "(link to Mob article, displayed as Mob) type"
},
{
"field": "5<span class=\"hidden-alt-text\">HP</span><span class=\"nowrap mc-hearts\"><span class=\"iconbar pixel-image nowrap\" style=\"--icon-offset:-1px;\" title=\"2.5 hearts\">(link to File:Heart (icon).png article, displayed as 9px|link=|alt=♥)(link to File:Heart (icon).png article, displayed as 9px|link=|alt=♥)(link to File:Half Heart (icon).png article, displayed as 9px|link=|alt=♥)</span></span>",
"label": "Attack<br/>strength"
},
{
"field": "Height: 0.93 blocks<br>Width: 0.6 blocks",
"label": "(link to Hitbox article, displayed as Hitbox size)"
},
{
"field": "See (link to #Usage article, displayed as Usage)",
"label": "(link to Mob spawning article, displayed as Spawn)"
}
],
"invimages": [
"Agent Spawn Egg"
],
"images": [
"Agent.png"
]
}
The agent is a mob that helps players learn coding, by getting players to code the actions on it. The agent can be programmed to execute several tasks, like planting and harvesting, mining, chopping trees, and building. It is only available in Minecraft Education and Bedrock Edition worlds connected to a WebSocket server.
Spawning
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 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.
The agent can be spawned with its spawn egg, obtainable with /give @s spawn_egg 1 56. However, it is completely invisible when spawned via the spawn egg.
Usage
In Minecraft Education, the agent is used in conjunction with Code Connection for Minecraft / Code Builder, and is programmable by a visual programming language.
In Education and Bedrock Editions, 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 pressure plates. The agent also is invulnerable to attacks and is targeted by wardens, but the agent remains undamaged. Projectiles pass through them. Agents can also never ride minecarts or boats, and vehicles go through them. The player cannot use a lead on them.
The agent can interact with buttons, levers or other right-click mechanisms like doors and 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 agentremove agentteleport to playerteleport to location facing directioncollect <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
| Sounds | |||||
|---|---|---|---|---|---|
| Sound | Source | Description | Resource location | Volume | Pitch |
| Friendly Creatures Friendly Mobs | When an agent is spawned | mob | ? | ? | |
Data values
ID
| Name | Identifier | Numeric ID | Translation key |
|---|---|---|---|
agent | 56 | entity |
History
| Pocket Edition Alpha | |||||||
|---|---|---|---|---|---|---|---|
| v0.16.0 | build 1 | ||||||
| build 2 | Removed agent. | ||||||
| Pocket Edition | |||||||
| 1.0.0 | alpha 0.17.0.1 | The agent has been re-added, hidden in a(n) .apk file. | |||||
| Bedrock Edition | |||||||
| 1.8.0 | beta 1.8.0.8 | Added agent spawn egg texture file. | |||||
| 1.9.0 | beta 1.9.0.0 | Agent can now be spawned by putting the command execute @p ~ ~ ~ agent create into an NPC. | |||||
| Minecraft Education | |||||||
| 1.0.1 | |||||||
| 1.0.2 | The entity ID changed has been changed from "learn_to_code_mascot" to "agent". | ||||||
| 1.4.0 | Agent's default name tag color has been changed to blue. | ||||||
| 1.7 | Agent can now be removed through /remove.
| ||||||
| Players now can show the agent coordinates on the HUD. | |||||||
/summon agent now creates or teleports the executor's agent to the executor.
| |||||||
| Added spawn eggs for agents. | |||||||
| 1.20.12 | 1.20.10.0 | Agent now has no range restrictions, it can move and build far away from the player. | |||||
| Agent now has an animation for unsuccessful actions. | |||||||
| Agent now chooses which item to detect or interact with in a “line of sight” in the direction the code specified, up to 1 block away. | |||||||
Issues
Issues relating to "Agent" are maintained on the bug tracker. Issues should be reported and viewed there.
Trivia
- In 10 Years of Minecraft, 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 addition in Pocket Edition was likely accidental due to Pocket Edition sharing the same codebase as Education Edition.
Gallery
Screenshots
-
An agent. -
The agent with other passive mobs. -

-
Red-eyed version of Agent in hour of code 2021 -
Yellow-eyed version of Agent in hour of code 2021 -
Green-eyed version of Agent in hour of code 2021 -
Blue-eyed version of Agent in hour of code 2021 -
Pink-eyed version of Agent in hour of code 2021
In other media
-
Agent in an official render. -
An agent in promotional artwork for the Learn to Code Update. -
An agent in promotional artwork for the GOAT Update. -
An agent in promotional artwork for Mobile, Multiplayer & More. -
An agent building with redstone. -
An agent's laptop. -
The agent in a promotional artwork. -
A statue of an agent in Inspiration Island. -

External links
- Build with the agent – Minecraft.net on February 24, 2022
| |||||||||||||||||||
| |||||||||||||||||||