Plugin

NPCs that understand
what you ask for

MCAgentsNPC puts AI driven NPCs on your server. They gather, farm, fight, keep watch, and follow you around — and you tell them which of those you want in your own words, not with a menu.

PaperMC SpigotMC FoliaMC
MCAgentsNPC is a standalone plugin, not an MCAgents extension. It installs and runs on its own. When MCAgents is installed alongside it, the NPCs gain language; without it, everything that does not need an AI keeps working.

How it works

An instruction becomes a behaviour in four steps, and the NPC keeps just enough of the conversation to follow up on it.

  1. You tell an NPC what you want

    "There is iron in the cave below, go get it." Naming a behaviour outright works too, and costs nothing — the words are for when you would rather not think about which behaviour that is.

  2. The NPC looks around first

    Before asking anything, it reports what it can actually see: who is nearby, what creatures are around, what it is standing on, and whether it is day or night. That goes to the agent along with your instruction, so the answer is about your situation rather than a generic one.

  3. The agent picks a behaviour and replies

    One short line back to you, and one behaviour the NPC switches to. If your message was a question rather than an order, it answers without interrupting what it was doing.

  4. The exchange is compressed and remembered

    Not the words you typed — a summary of them. So your next message can be "keep at it until you have enough" and the NPC knows what "it" was.

What an NPC can do

Six behaviours, one at a time. Each is deliberately narrow, so what an NPC will and will not do is something you can predict before you ask.

gather

Walks to nearby resource blocks, breaks them, and keeps the drops for you to collect. Only the blocks an operator listed — an NPC can never dig up something you did not permit.

farm

Harvests fully grown crops and replants them. The field an NPC works stays a field; it never leaves you with cleared ground.

fight

Attacks hostile mobs that come within range, on a cooldown so a fight takes about as long as yours would. Players, animals, and villagers are never targets — that is a rule of the behaviour, not a setting.

observe

Keeps watch and changes nothing. It reports only when what it sees has changed, so a lookout is useful without becoming noise.

follow

Stays a few blocks behind you and stops once it is close enough, so it does not shuffle about while you stand still.

idle

Stands and waits. Where an NPC starts, and where it returns when a task is done.

What it remembers, and for how long

An NPC remembers a conversation only while that conversation is alive — and only ever as a summary.

Summaries, not transcripts

Every remembered turn is replayed into the next request, so anything stored verbatim would be paid for again on every message that follows it. Each exchange is compressed to its shortest form and only that is kept.

Five minutes of quiet, then gone

Go five minutes without giving an NPC a new task and it forgets the conversation entirely. The window is configurable; asking to see the memory does not extend it.

Nothing is written down

There is no database and no file. Short term context lives in memory for as long as the server runs, and a restart forgets all of it.

You can look at it

Memory that summarises itself and then deletes itself is hard to trust, so there is a command that shows exactly what an NPC is about to replay — and one that clears it.

Working with MCAgents

MCAgents is optional, and the way MCAgentsNPC depends on it is the part worth understanding before you install either.

Bound at startup, not built in

MCAgentsNPC is not compiled against MCAgents at all. It finds it on the running server and binds to it there, which is why it loads cleanly on a server that has no MCAgents, and on one whose MCAgents is a different version.

It disables the integration, not itself

If the binding fails, one clear line goes to the log and the language features switch off. NPCs still spawn and every behaviour still runs — you set them by name instead of by sentence.

Your key, not the plugin's

MCAgentsNPC holds no API key of its own. MCAgents decides whose key a request spends from who it is for, so a player's instruction spends that player's key — and an instruction the server itself sets off spends the server's.

It works the other way too

MCAgentsNPC hands MCAgents two tools of its own, so a player already talking to an agent can ask what their NPCs are doing and retask them — without touching the NPC command. Both are limited to that player's own NPCs.

Everyday commands

One command covers all of it, and every subcommand has its own permission node.

Spawn and remove

An NPC appears where you are standing, named. Three per player by default, and they leave with you when you log out.

Set a behaviour

Name what you want directly. Free, instant, and works on a server with no AI installed at all.

Give a task in words

Describe the goal and let the agent choose the behaviour. This is the one that spends an AI request — and the one that remembers.

Collect what it gathered

An NPC keeps its drops rather than scattering them on the floor. Take them when you are ready; anything that will not fit lands at your feet.

Inspect the memory

See the summaries an NPC is carrying, or clear them, without waiting for the idle window to do it for you.

Reload

Re-reads the configuration and starts clean. Reserved for operators, because it removes every NPC on the server — including other people's.

Who may do what

Ownership and permission are two different questions here, and are answered separately.

Open to players by default

Spawning, commanding, collecting, and talking to an NPC are allowed out of the box. There is nothing shared to protect: a task spends the player's own AI key.

Operators by default

Only reloading is restricted, because it is the one action that reaches other players' NPCs.

Yours is yours

A player may command their own NPCs and nobody else's, whatever nodes they hold. Operators may command any. That is enforced in the command itself, because no permission node can express it.

Hidden, not just blocked

The help menu and tab completion list only the subcommands you actually hold, so a withheld command never appears as a dead end.

Good to know before you install

The limits are as worth knowing as the features.

NPCs step, they do not path

An NPC moves towards its goal a step at a time. It climbs one block and drops a few, and gives up on anything it cannot reach that way. Excellent in a field, a quarry, or a cleared cave; poor in a maze.

They stay where you put them

An NPC that wanders too far from where its behaviour started walks back, so it works the area you pointed it at rather than drifting across the map.

You cannot hit them

Player damage to an NPC is cancelled — they cannot defend themselves against you, and a misclick would cost you the helper and everything it had gathered. Creepers, falls, and lava still count.

Off until you turn it on

The plugin ships disabled, so dropping the jar into a server changes nothing until an operator says so.

This site explains how the ecosystem works. Setup guides, the full configuration reference, and source code live in the mcagents-npc repository.