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.

An agent loop turning a delivery note into a draft ERP record waiting for an approval stamp
Published 17 min read
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

The number it is judged on, such as invoices drafted right on the first pass.

Environment

The ERP and one mailbox, not "all company data". Name the exact documents and fields.

Actuators

What it can do: "create a draft Purchase Invoice".

Sensors

What it can read: "attachments in the accounts mailbox".

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.

TypeWhat it addsModern LLM patternERPNext example
Simple reflexIf-then rules on the current inputA trigger that fires one fixed stepA Notification that emails the buyer when a document reaches a status
Model-based reflexMemory of what has happenedContext window plus retrieved recordsA Purchase Order received over several Purchase Receipts
Goal-basedA target and a planPlanning, or orchestrator-workers"Prepare everything to dispatch Sales Order X"
Utility-basedScores the optionsRouting work to a cheaper or stronger modelComparing Supplier Quotations on price, lead time and rejections
LearningImproves from feedbackBetter instructions, examples and retrieved contextAn invoice reader that keeps corrected drafts per supplier
1

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.

2

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.

3

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.

4

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.

5

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.

  1. 1
    PerceiveInputs 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.
  2. 2
    DecideThe 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.
  3. 3
    ActThe 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.
  4. 4
    Observe 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.
  5. 5
    OutputStructured 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

The engine that predicts text.

Assistant

The app around it, with chat, files and memory: ChatGPT, Claude.

Agent

An assistant or program that is allowed to act: call tools, change records, send things.

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

A tool has a name, a plain description, typed inputs and a return value. The model picks from the descriptions, so vague ones cause wrong calls. create_purchase_receipt_draft(po, items, qty, rejected_qty) is far safer than run_any_api_call.

Tools carry the permissions

The model only asks. The tool runs under an identity. If that is the logged-in user, the ERP's role and user permissions limit the agent automatically. If it is an admin API key, the agent can see everything.

Knowledge is not tools

Retrieval gives the agent documents to read: policies, specs, past proposals. Tools let it read live ERP records and act. A sound setup has knowledge, swappable model engines behind a router, and agents with one fixed task each.

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 automationChatbot or assistantWorkflow with LLM stepsAI agent
Decides the stepsCodeAnswers onlyCode, LLM fills stepsThe LLM
Unstructured inputNoYesYesYes
Takes actionsYes, fixedNo, or fewYes, fixedYes, chosen
PredictabilityHighestHighHighLower
Best forStable rulesQuestionsRepeatable document tasksOpen-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.

ERPNext Purchase Receipt showing accepted and rejected warehouses
Screenshot: a submitted Purchase Receipt with accepted and rejected warehouses. Source: ERPNext documentation (Frappe)

2. Inbound email to a qualified Lead

Standard ERPNext can link an inbox to a doctype so each email creates a record. The agent adds judgement: enquiry, supplier pitch or spam, which product, which territory, which owner. Output: source, company, requirement summary, suggested owner, draft reply. The reply goes out only after review.

4. Vendor invoices and expense claims

The agent reads an invoice PDF, matches supplier, order and receipt, and drafts a Purchase Invoice, or matches card lines to Expense Claims. Each draft carries a confidence note per field. Test on your own documents first: a reader that works on a few layouts can fail on a varied set, and scan quality decides which model suits.

5. Chat with your ERP, under each user's permissions

A user asks, "Which customers are over 60 days overdue in my territory?" and the agent queries through tools as that user. Two users can get different answers to the same question, which is correct. Not everyone knows how to chat with software, but everyone knows how to ask, and this can replace many one-off custom reports.

3. Bank reconciliation suggestions

ERPNext's Auto Reconcile matches a bank transaction only to a Payment Entry or Journal Entry with the same reference number. An agent can propose matches for the hand-matched remainder using amount, date window, party name and open invoices. The person accepts or rejects each one. Bank fees need their own accounting entry first.

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.

ERPNext Bank Reconciliation Tool after Auto Reconcile, with a bank charge left to record
Screenshot: the Bank Reconciliation Tool after Auto Reconcile, with a bank charge left to record. Source: ERPNext documentation (Frappe)

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

ERPNext documents move through Draft, Submitted and Cancelled, and a saved draft does not touch the ledger. Give the agent's role Create and Write but not Submit. For accounting entries, final submit stays with a person.

Workflow for approvals

Under Home > Settings > Workflow you define states, the role for each transition and conditions such as doc.grand_total <= 100000. Agent drafts enter "Pending Review"; above a set value a manager must approve.

Permissions limit the view

Role Permissions set read, write, create, submit and cancel per role. User Permissions restrict a user to records such as one Company or Territory. Run the Permitted Documents for User report for the agent's user before go-live.

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).

ERPNext Workflow transition rules table with action, next state, allowed role and condition
Screenshot: Workflow transition rules (action, next state, allowed role, condition). Source: ERPNext documentation (Frappe)

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.

ERPNext Role Permissions Manager showing read, write, create and submit rights per role
Screenshot: the Role Permissions Manager (read, write, create, submit per role). Source: ERPNext documentation (Frappe)

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.

OptionGood forWatch out for
Built-in AI of a SaaS toolOne app's own dataCan't see the ERP; data sits with another vendor
General assistant plus MCP connectorQuestions and light actions by a signed-in userNeeds user discipline; consequential actions still need approval
Workflow tool (for example n8n) plus an LLM stepRepeatable document flowsWho maintains it; credentials stored in the tool
Custom agents inside the ERPYour fields, roles and workflowsNeeds 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

  1. 1
    Week 1Pick one task. Write the PEAS spec and the output fields.
  2. 2
    Week 2Build the tool and a draft-only role. Test on last month's real documents in a copy of the system.
  3. 3
    Week 3Pilot with one user, approval workflow on.
  4. 4
    Week 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

No named task, no output fields, no owner. Define "done" before any timeline.

One giant agent

A new requirement should usually be a new, small agent, not more tools on the old one.

Admin keys, no approvals

A shared admin key turns any prompt injection into a data leak. Draft-only roles and Workflow approvals cost nothing in ERPNext.

Trusting a demo

Five clean documents prove little. Test on a month of real, messy input and count the corrections.

Automating a broken process

If accounts and inventory are wrong, an agent produces wrong drafts faster. Fix the ERP base first.

Approvals nobody can use

An approval that waits on one busy person stops the flow. Auto-approve low-value, low-risk cases by Workflow condition and route the rest.

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

Named inputs, exact output fields.

Drafts into ERPNext

Final submit stays with your people.

Your roles apply

The agent has its own narrow user.
  • AI intelligent agents
  • Types of intelligent agents
  • How AI agents work
  • Agent tools and MCP
  • Human in the loop
  • ERPNext Workflow
Talk to our Experts

Ready to Scale with Smart Tech? Let's Talk.

Transform your business processes with AI-powered automation and expert implementation.

200+ projects since 2016
Questions buyers ask

Frequently Asked Questions

Find answers to common questions about our services

What are intelligent agents in AI?

An intelligent agent is a system that perceives its environment and acts on it to reach a goal. In business software it reads inputs such as emails, documents and ERP records, decides what to do, and takes actions such as drafting a record or sending a reply. AI agents today usually use a large language model to make that decision.

Which AI agents are there?

The classic types are simple reflex, model-based reflex, goal-based, utility-based and learning agents. Modern labels such as coding agents, sales agents, multi-agent systems and orchestrator agents describe what they do or how they are arranged. Most business agents combine several types: they keep state, work towards a goal, and improve through better instructions and examples.

Is ChatGPT an agent or an LLM?

ChatGPT is an app built on large language models. In ordinary chat it is an assistant that answers. In agent mode it plans, uses a browser, terminal and connected apps, and takes actions, so it acts as an agent. OpenAI says it asks permission before consequential actions such as purchases.

What are agent tools?

Agent tools are named functions an AI agent may call, each with a description and input fields, for example "get stock balance" or "create draft Sales Order". The model chooses a tool, ordinary code runs it under a set identity, and the result goes back to the model. Narrow tools with minimum permissions are safer than general ones.

How do AI agents work with ERP data?

The agent connects through the ERP's API or an MCP server, signed in as a user or a dedicated agent user. It reads only the records the task needs and writes drafts. The ERP's role and user permissions decide what it can see, and a workflow decides who approves before anything is submitted.

Can an AI agent submit invoices or payments by itself?

It can if you give it that permission, but it should not for accounting entries. Give the agent's role create and write rights only, send its drafts through an approval workflow, and keep submit, payment and email sending with a person. Vendors such as OpenAI keep similar confirmation steps in their own agents.

What is the difference between an AI agent and workflow automation?

Workflow automation follows steps fixed in code, even if one step uses AI to read a document. An AI agent chooses its own steps and tools as it goes. Workflows are more predictable and cheaper; agents handle open-ended tasks. Start with a workflow and use an agent only where the steps cannot be fixed.

What are the 7 problem characteristics in AI?

This is a textbook topic about classifying a problem before solving it, for example whether it can be broken into parts, whether steps can be undone, and whether the world is predictable. For business agents the practical version is simpler: is the task frequent, is the input unstructured, and can a wrong draft be caught before submit?