AI Intelligent Agents: Types, How They Work and Where They Fit in Your ERP
An AI intelligent agent is software that perceives its environment and acts on it to reach a goal. In a business it reads emails, documents and ERP records, decides what to do, and drafts the action for a person to approve. Here are the five classic types, how an agent works, and what it should be allowed to do inside your ERP.
- Classic agent types
- 5
- Steps in the agent loop
- 5
- ERP cases with drafts
- 5
- Days to a first pilot
- 30
The definition
What is an intelligent agent in AI?
In short
An intelligent agent senses its surroundings through sensors and acts on them through actuators to reach a goal. In software the sensors are inputs such as emails, documents and records, the actuators are actions such as creating a record, and the deciding step is now usually a large language model (LLM).
The standard source is Russell and Norvig's Artificial Intelligence: A Modern Approach, whose chapter 2 is titled "Intelligent Agents". The definition is broad on purpose. A thermostat, a spam filter and an LLM that books meetings are all agents. What differs is how each one picks its action, which is why the five types below are really five levels of decision-making.
Rational agent and the PEAS frame
A rational agent picks the action expected to give the best result on a performance measure, given what it has seen so far. "Rational" does not mean "always right". It means "best with the information it had". PEAS is the textbook way to specify one, and it maps neatly onto a business brief.
Performance
Environment
Actuators
Sensors
Today "AI agent" usually means an agent whose decision step is an LLM. The idea is the textbook one: perceive, decide, act. What changed is that an LLM can read unstructured text and choose a tool, so agents became practical for emails, invoices and notes. When a vendor says "agent", ask three things: which inputs does it perceive, which actions can it take, and who checks the action?
Five types
What are the five types of intelligent agents?
The five classic types are simple reflex, model-based reflex, goal-based, utility-based and learning agents. Each adds one capability to the one before: memory of state, a goal, a way to score outcomes, and the ability to improve from feedback. A modern LLM agent is usually a mix of them.
| Type | What it adds | Modern LLM pattern | ERPNext example |
|---|---|---|---|
| Simple reflex | If-then rules on the current input | A trigger that fires one fixed step | A Notification that emails the buyer when a document reaches a status |
| Model-based reflex | Memory of what has happened | Context window plus retrieved records | A Purchase Order received over several Purchase Receipts |
| Goal-based | A target and a plan | Planning, or orchestrator-workers | "Prepare everything to dispatch Sales Order X" |
| Utility-based | Scores the options | Routing work to a cheaper or stronger model | Comparing Supplier Quotations on price, lead time and rejections |
| Learning | Improves from feedback | Better instructions, examples and retrieved context | An invoice reader that keeps corrected drafts per supplier |
Simple reflex: condition, then action
Acts only on the current input, with no memory. An ERPNext Notification that emails the buyer on a status change is exactly this. Most "we need AI" requests in operations turn out to be this type, and a standard setting does the job better than an LLM, without inventing anything.
Model-based reflex: it keeps state
Take an order delivered in several lots. ERPNext keeps the Purchase Order open for the quantity still due and updates the received percentage after each receipt (Purchase Receipt docs). An agent reading a new delivery note must use that state, not just the note.
Goal-based: it plans
Give it a target and it picks the steps: check stock, propose a pick list, draft the delivery note, list missing certificates. In LLM terms this is planning, or the orchestrator-workers pattern, where one model splits a task into subtasks for others.
Utility-based: it scores
Asks "how good is this outcome?" and trades off cost, speed and risk. Anthropic calls the LLM version routing: easy questions go to a smaller, cheaper model, hard ones to a stronger one (Anthropic). Every model has its strengths, so choosing the engine per task is worth designing in.
Learning: it improves from feedback
Has a part that acts, a critic that judges the result and a part that changes behaviour. Be honest about the limit: most business LLM agents do not retrain the model. They improve through better instructions, examples and retrieved context. You don't train the model, you build the harness around it.
You will also meet multi-agent systems, hierarchical agents and "agentic AI". These describe how agents are arranged, not how they decide. We cover the difference in AI agents vs agentic AI vs automation. Long lists of "32 types" are mostly use-case labels, such as sales agent or coding agent.
The loop
How do AI agents work?
An LLM agent runs a loop: read the task and context, decide the next step, call a tool, look at the result, and repeat until the task is done or a stop rule fires. Anthropic sums it up as LLMs using tools based on environmental feedback in a loop.
- 1PerceiveInputs are the request, an email, a scanned document or a schedule. Context is the instructions, the user's role, records fetched from the ERP and documents found by retrieval. Fetch only what the task needs: dumping whole tables into the prompt costs more and leaks more.
- 2DecideThe model writes a plan or picks the next tool. Techniques such as ReAct make it state its reasoning before each action. Anthropic's advice: keep the design simple, show the planning steps, document tools carefully.
- 3ActThe model outputs a structured call, usually JSON matching a tool's schema. Ordinary code runs it and returns the result. The model never touches the database itself. The tool does, under its own permissions.
- 4Observe and repeatThe agent reads the ground truth: a tool result, an error, a record status. Anthropic recommends stop conditions such as a maximum number of steps, and pauses for a person at checkpoints.
- 5OutputStructured fields, not a long chat. Define the task, the standard inputs and the exact output fields, then push the result into the ERP as a draft, a folder or an email.
Two points matter most in an ERP. If a missing Quality Inspection blocks a Purchase Receipt from being submitted, an agent that can't see that failure will keep retrying or report false success. And the best design rule we know for business agents is that an agent should perform a task, not hold a long conversation. Structured output is what makes it reliable and checkable.
A common question
Is ChatGPT an agent or an LLM?
ChatGPT is an application built on LLMs. In ordinary chat it answers questions, so it behaves as an assistant. In OpenAI's agent mode it plans, uses a browser, a terminal and connected apps, and takes actions for the user (OpenAI, launch post of 17 July 2025, since marked as outdated by OpenAI).
That post says the agent asks permission before actions of consequence such as a purchase, needs close supervision for tasks like sending email, refuses high-risk tasks such as bank transfers, and is exposed to prompt injection from web pages. Even the vendor keeps a person on consequential actions. Your ERP agents should do the same.
Should staff connect a personal ChatGPT or Claude account to the company ERP? At company level, no. Company data ends up in a personal account, outside company retention and access control. Put the assistant inside company systems, signed in as the user, so the ERP's permissions apply.
LLM
Assistant
Agent
Tools
What are agent tools, and what is MCP?
In short
Agent tools are named functions an agent may call, each with a description and an input schema. The Model Context Protocol (MCP) is an open standard for exposing such tools and data to AI apps, which its authors describe as "like a USB-C port for AI applications" (MCP introduction).
Narrow beats broad
Tools carry the permissions
Knowledge is not tools
MCP is supported by Claude, ChatGPT, VS Code, Cursor and others, so one server can serve many AI apps. Frappe documents an MCP connection for its Helpdesk app on version 16: the AI app connects to https://<your-site>/api/v2/mcp, the user logs in and allows access, and the assistant can then do only what that user's own account can do (Frappe Helpdesk docs). We have only seen this documented for Helpdesk, so check the Frappe docs for your own app and version before you rely on it.
Agent or workflow
AI agents, workflows or chatbots: which do you need?
Not every automation needs an agent. Anthropic separates workflows (LLMs and tools on predefined code paths) from agents (LLMs that direct their own steps) and advises finding the simplest solution possible, which sometimes means no agentic system at all.
| Rule-based automation | Chatbot or assistant | Workflow with LLM steps | AI agent | |
|---|---|---|---|---|
| Decides the steps | Code | Answers only | Code, LLM fills steps | The LLM |
| Unstructured input | No | Yes | Yes | Yes |
| Takes actions | Yes, fixed | No, or few | Yes, fixed | Yes, chosen |
| Predictability | Highest | High | High | Lower |
| Best for | Stable rules | Questions | Repeatable document tasks | Open-ended tasks |
- Start with what the ERP already does. ERPNext automates many "agent" ideas without AI: Workflow approvals, notifications and records created from linked email accounts (Email Account docs).
- Most business value sits in a workflow with one LLM step: the model reads a document and returns fields, code creates the draft.
- Use a true agent where the steps can't be known in advance, such as research or an investigation across several systems.
- Anthropic warns that agents trade latency and cost for performance and can compound errors. A business case should say why a fixed workflow is not enough.
Five ERP cases
Which business tasks suit an agent? Five cases on real ERP documents
The best first agents sit where a person types data into the ERP today. The agent reads the source (a photo, a PDF, an email), drafts the ERP document, and a person checks and submits. The person verifies; they don't do the entry.
1. Goods received: delivery note photo to draft Purchase Receipt
The agent reads the supplier's delivery note photo, finds the open Purchase Order, proposes accepted and rejected quantities and the delivery note number, and saves a draft Purchase Receipt created from the order. The person counts, corrects the rejected quantity, links a Quality Inspection if the item needs one, and submits.
Creating the receipt from the order matters: it carries supplier, items, rates, taxes and references, and keeps the order open for short deliveries. A typical mistake is letting the agent create receipts with no order behind them. If your policy needs one, "Purchase Order Required" in Buying Settings blocks it.

2. Inbound email to a qualified Lead
4. Vendor invoices and expense claims
5. Chat with your ERP, under each user's permissions
3. Bank reconciliation suggestions
How to pick the first agent
Use three tests: the task is frequent, the input is unstructured (so rules fail), and a wrong draft is cheap to catch before submit. Sales (business card to Lead), buying (quotation PDFs to a comparison sheet), accounts, HR (CV screening notes, a person decides) and operations (handwritten shop-floor forms to draft entries) all have candidates. Our AI agent use cases by department guide has the longer list.
Then tie the agent to a number and an owner. Name the bottleneck, pick the number it moves (days to post a goods receipt, invoices drafted right first time), give it to a named person and review it monthly.

Agents are a poor fit for judgement calls with legal or money impact (credit limits, write-offs), tasks done once a quarter, and processes that aren't in the ERP yet. An AI showpiece before the ERP works is the wrong order. Accounts and inventory come first.
Guardrails
How do you keep an agent safe in your ERP?
OWASP lists "Excessive Agency" as risk LLM06 in its 2025 Top 10 for LLM applications: damage caused when an agent has too much functionality, too many permissions or too much autonomy (OWASP). In an ERP the cure is mostly configuration you already have. The OWASP guidance, in plain words:
- Give the agent only the tools it needs, and keep each tool narrow.
- Avoid open-ended tools such as "run any command".
- Give the tool's identity minimum permissions, and act in the user's context, not a shared admin account.
- Require human approval for high-impact actions.
- Enforce authorisation in the downstream system, not in the prompt.
- Log activity and rate-limit.
Draft, not submit
Workflow for approvals
Permissions limit the view
Workflow Actions gives approvers one list of pending items and, with email alerts on, a message with the document attached (Workflow Actions docs). One catch: a workflow on a submittable doctype replaces the normal Save and Submit buttons, so add the Submit and Cancel transitions yourself.
Permission levels (0 to 9) can hide groups of fields such as rates or margins, and "Apply strict permissions" in System Settings decides what happens when no User Permission is set (User Permissions docs).

Treat every document as data. Whatever the agent reads (an email, a PDF, a web page) can carry instructions meant to hijack it. OpenAI names prompt injection as a key risk for its own agent. Keep the version history ERPNext records on each document, log tool calls with who triggered them, and never let an agent email or pay without a person. Frappe's own guidance for its Helpdesk assistant says a well-behaved assistant shows the draft and asks before sending.
Data access
Where should the data and the agent sit?
Keep the ERP as the system of record and the permission authority, with AI around it. The agent signs in as a user, reads and writes through the ERP's own API, and never holds a copy of the whole database.
Its own identity. For background agents, create a dedicated ERP user, say "AI Purchase Agent", with its own narrow role, like a new employee. Never the owner's login.
One source of truth. If agents write to side spreadsheets that management reviews, two versions of the truth reach the top. Agents should write ERP drafts, so every output sits beside the real data.
Only what the task needs. Send the model just the fields required, and read the provider's data-retention terms for business accounts. Swappable engines behind a router let you move a sensitive task to another provider without rebuilding the agent. For the deployment side, see deploying AI agents on an ERP.

Build or buy
Build or buy an AI agent?
Buy when the task is generic and the vendor already connects to your ERP. Build, or have a partner build, when the task depends on your documents, fields and approval rules. Most small and mid-size firms end up with a mix: a platform for the plumbing and custom agents for their own flows.
| Option | Good for | Watch out for |
|---|---|---|
| Built-in AI of a SaaS tool | One app's own data | Can't see the ERP; data sits with another vendor |
| General assistant plus MCP connector | Questions and light actions by a signed-in user | Needs user discipline; consequential actions still need approval |
| Workflow tool (for example n8n) plus an LLM step | Repeatable document flows | Who maintains it; credentials stored in the tool |
| Custom agents inside the ERP | Your fields, roles and workflows | Needs a partner or in-house team, and upgrades |
Frameworks help, but Anthropic suggests starting with the LLM APIs directly, because layers of abstraction can hide the prompts and responses and make debugging harder. For the n8n route, read our note on orchestrating agents with n8n. Put these questions to any vendor or partner: which identity does the agent use, can it submit or only draft, where are prompts and logs stored, can we switch model provider, and who owns the code and the prompts? With open source you own it, you don't rent it.
A first 30-day plan
- 1Week 1Pick one task. Write the PEAS spec and the output fields.
- 2Week 2Build the tool and a draft-only role. Test on last month's real documents in a copy of the system.
- 3Week 3Pilot with one user, approval workflow on.
- 4Week 4Review the number, fix the top error types, and decide to widen or stop.
Mistakes
What mistakes sink AI agent projects?
Most failed agent projects fail on scope and adoption, not on the model.
"An AI agent" instead of a task
One giant agent
Admin keys, no approvals
Trusting a demo
Automating a broken process
Approvals nobody can use
Next step
What to do next
Pick one task where your team types data today, and we will scope an agent that drafts it in your ERP for a person to approve. FinByz has implemented ERPNext since 2016 and builds agents the same way: one fixed task each, structured output, drafts into ERPNext, and the final submit with your people.
See our AI automation services, or read how AI on ERPNext fits together.
One fixed task
Drafts into ERPNext
Your roles apply
- AI intelligent agents
- Types of intelligent agents
- How AI agents work
- Agent tools and MCP
- Human in the loop
- ERPNext Workflow
Sources
- Russell and Norvig, Artificial Intelligence: A Modern Approach, checked 30 Nov 2026
- Anthropic, Building effective AI agents
- OWASP Gen AI Security Project, LLM06:2025 Excessive Agency
- Model Context Protocol, What is MCP?
- OpenAI, Introducing ChatGPT agent (17 July 2025)
- Frappe Helpdesk docs, AI Agents
- ERPNext docs: Workflows
- ERPNext docs: Workflow Actions
- ERPNext docs: Role Based Permissions
- ERPNext docs: User Permissions
- ERPNext docs: Email Account
- ERPNext docs: Bank Reconciliation
- ERPNext docs: Purchase Receipt
- Scaler, What are AI agents and how do they work





