PTAS AI Blog

How Enterprise AI Agents Work: Architecture, Tools and Real Business Applications

Most of what makes an enterprise AI agent safe to run has little to do with the model. This guide covers the architecture behind production agents, the tools and permissions they act through, where people stay in control, and the finance and document workflows where agents already do useful work.

Ask a vendor how their enterprise AI agents work and you will usually hear about the model. That is the least interesting part. An agent that posts invoices or onboards suppliers in production is mostly plumbing: the data it may see, the tools it may call, the rules it reads and the record it leaves behind.

That plumbing is what lets a CFO approve software acting inside the ERP, and what lets an auditor follow it six months later. It is also where most pilots stall. A demo on ten clean invoices proves the model can read. It says nothing about invoice 4,000, when the supplier has changed its template and the approver is on leave. The architecture below is the one we use at PTAS AI for finance and document agents. Where an example has numbers, they are illustrative.

What counts as an enterprise AI agent

An enterprise AI agent is software that takes a unit of business work (an invoice, a vendor application, a bank statement), decides the next step, carries it out through an approved connection to another system and checks that it worked. A language model does the reasoning. Everything around the model decides whether that reasoning gets to touch anything.

A chatbot answers a question and waits. An RPA bot replays recorded clicks and stops when a screen changes. An agent works toward an outcome, say "this invoice is posted against the right purchase order", and can take a different route when the input is odd. We compare them in more depth in AI agents vs chatbots and agentic AI vs RPA vs traditional automation.

How an enterprise AI agent differs from a chatbot and an RPA bot
Attribute Chatbot RPA bot Enterprise AI agent
Starts from A person's question A recorded script A business goal and the item in front of it
Unfamiliar input Gives its best guess Fails with an error Reasons about it, or routes it to a person
Acts on systems through Usually nothing The screens it was recorded on Declared tools: APIs, connectors, webhooks, files
Leaves behind A chat transcript A run log A decision record for every item

A quick test for any product with "agent" in the name: ask what it may do without a person, and how you would find out afterwards what it did. Vague answers usually mean a chat interface with a new label.

The architecture of an enterprise AI agent

Production agents are built in layers. Vendors name them differently, but the jobs are the same. We use five stages, and they follow the Understand, Decide, Act and Verify loop behind all our products.

The five stages of an enterprise AI agent Perception turns documents into typed, scored fields. Intelligence reads them against rules and master data. Orchestration picks the next agent, holds state and retries. Action calls only declared, permitted tools. Verification reads the result back from the target system. Every stage writes to one decision record. 1 Perception Documents become typed, scored fields 2 Intelligence Fields read against rules and master data 3 Orchestration Picks the next agent, holds state, retries 4 Action Calls only declared, permitted tools 5 Verification Reads the result back from the target system Decision record every step, kept with the item
The five stages of a production AI agent. Each stage writes to the same decision record, and any stage can hand an item to a person.

Perception: turning pages and events into data

An agent should never reason over a raw image. Document AI first turns the invoice, bank statement or KYC form into typed fields (vendor name, GSTIN, invoice date, line items, HSN codes, tax), and each field gets its own confidence score.

Everything after this depends on those scores. A scored field can be routed: high confidence moves on, low confidence goes to a reviewer with the field marked on the page. A paragraph of model output can't be routed like that, which is why we think OCR is the wrong frame for document automation. Documents aren't the only trigger, either. An ERP webhook for a goods receipt or a new row in the vendor master can start a run too.

DocPro screen showing the line items extracted from a retail invoice: UPC, item description with HSN code, MRP, discount, quantity, taxable value, CGST and SGST rates and amounts, cess and line total.
Line items extracted by DocPro from a retail invoice, with the HSN code, taxable value and GST split for each line.

Intelligence: the model, its context and your rules

This is the part people picture when they hear "AI agent". In our experience the model matters less than what it is given.

Context cut to the job

The model sees only what its task needs: the extracted fields, the matching purchase order, the vendor's master record, perhaps the supplier's last few invoices. It never gets the run of the ERP. Narrow context gives better answers and limits what can leak. When the agent needs a policy or a past decision, retrieval over your own knowledge base brings in the relevant passage.

Business rules read at run time

Tolerances, approval limits and exception policies sit in versioned configuration outside the model. The agent reads them on every run, so a controller can tighten a tolerance on Monday without retraining anything, and the agent has no way to widen its own limits.

A fixed output schema

The model answers in a set structure: proposed action, fields relied on, rule applied, reason. If an answer doesn't fit, it is retried once and then sent to review with the raw output attached. Free text never lands in a business system unchecked.

Orchestration: deciding what runs next

A real workflow uses several agents. In accounts payable, one reads the invoice, another matches it to the PO and goods receipt, a third checks tax and a fourth posts.

We think agents should never call each other directly. Each returns its result to an orchestrator, which writes it to the item's record and picks the next step. The orchestrator also handles retries (a timed-out ERP call is retried, then parked with the reason) and escalates anything no agent is allowed to settle. Agents messaging each other until they agree makes a lovely demo and is miserable to audit. When a payment goes wrong, you want one record of the path the item took.

Tools: how an agent acts on other systems

A tool is a function the agent may call: look up a vendor, fetch a PO, post an invoice, request an approval. Models are now good at choosing tools and filling in the arguments, which is exactly why the list needs care.

Declared tools, each with its own permission

Every agent has a short, written list of tools, each with its own permission. In our products the extraction agent can read fields and search the vendor master, but it has no tool that posts, pays or edits master data. Only the posting agent can write to the ERP, and only after approval. If an agent tries a tool it was never given, the orchestrator refuses the call and logs the attempt.

Your security team can review that list like any other access policy, which turns "is the AI safe?" into questions they already know how to answer. The full set of controls is on our AI security and governance page. For how to scope those permissions agent by agent, see our guide to AI agent security.

Connecting to ERPs and business applications

Tools reach other systems through whatever each one supports: a native connector, a REST API, webhooks, file exchange or a custom integration. For SAP, Oracle, Microsoft Dynamics, NetSuite, Tally, Zoho Books or QuickBooks, the right method depends on version and hosting, so agree it during assessment rather than assuming it from a logo on a slide. Our FinSuite integrations page states the method per system.

You will also hear about the Model Context Protocol (MCP), an open standard for exposing tools and data to AI models. It makes tools easier to connect. It does not decide which agent gets which permission, and someone still has to make that call and write it down.

Memory and state

Agents need less memory than people expect. Within a workflow, state lives on the item's record, and each agent starts from what the previous one added instead of re-reading the document. Across items, "memory" is mostly ordinary business data such as vendor history and past corrections. Keep it in your own systems, where you can inspect it and delete it, rather than inside a model.

Verification and the audit trail

A step is done when the target system confirms it. After posting, the agent reads back the ERP document number; after a vendor update, it reads the record again. Every step goes into a decision record: what the agent saw, the rules applied, what it did, what the system returned, and the model and rule versions in use. Internal audit will ask for this. So, eventually, will your statutory auditor.

One invoice through the architecture

Here is one case, with made-up values. A mid-sized Indian manufacturer receives a PDF invoice for ₹4,82,600 from a packaging supplier.

Illustrative example: one supplier invoice, step by step
Step Stage What happens
1 Perception The invoice agent extracts the header, six line items and tax. The GSTIN scores high; the HSN code on line 4 scores low.
2 Verification Arithmetic and tax checks pass. An AP reviewer confirms the HSN code in under a minute.
3 Intelligence The matching agent finds the PO and two goods receipts. One unit price is 1.8% above the PO, inside this vendor's 2% tolerance.
4 Intelligence The tax agent confirms the supplier's GSTIN is active and queues the invoice for the month-end GSTR-2B match.
5 Orchestration The amount needs the plant finance manager's approval, so the orchestrator sends the item to the approval workflow with the match summary.
6 Action Once approved, the posting agent creates the invoice in the ERP through the agreed integration.
7 Verification The ERP returns a document number. The agent reads it back and closes the item.

Two people touched that invoice, each for a question that needed a person, and nobody re-keyed a field. At a 2.5% variance, step 3 would have stopped and sent the invoice to an analyst with both documents attached. We go further into the matching logic in why we moved from 3-way to 6-way invoice matching.

Where people stay in control

The point is to spend people's attention where it changes the outcome. A well-built system brings them in at fixed points:

  • Fields below a confidence threshold go to a reviewer, with the source region marked on the page.
  • Amounts above an approval limit go to a named approver, however clean the match looks.
  • Vendor bank detail changes, new vendors and payments above an authority limit always need a person, whatever the score. Bank detail changes in particular are a common route for payment fraud.
  • Segregation of duties applies to agents as it does to staff, so whoever codes an invoice can't approve it.

Thresholds should come down over time, and only on evidence. If reviewers haven't corrected a field on one supplier's invoices in months, lowering its review rate is a reasonable call for a finance controller. The agent shouldn't make it for itself. Our guide to human-in-the-loop AI covers how to set these points and when to move them.

Real business applications of enterprise AI agents

Agents pay off where work is high in volume, heavy on documents, governed by written rules and done today by people copying data from one system to another.

Finance and accounts payable

Invoice processing and matching

This is the usual starting point, since the rules already exist in your tolerance policy and delegation of authority.

What the agents handle

Extraction, PO and goods receipt matching, tax checks, GL coding suggestions and posting after approval.

Where a person steps in

Low-confidence fields, variances outside tolerance, invoices without a PO and anything above an approval limit. The full flow is laid out on our accounts payable automation page.

Vendor onboarding

The agent reads what a new supplier sends, usually a PAN card, a GST certificate and a cancelled cheque. It checks that the legal name agrees across them, confirms the GSTIN is active and verifies the bank account before any vendor record exists. Those are the core checks in vendor management automation, and a person still approves every new vendor.

GST reconciliation

Matching the purchase register against GSTR-2B each month is large and rule-bound, which suits an agent well. It matches on GSTIN, invoice number and value, explains each mismatch (a supplier that hasn't filed, a transposed invoice number, a value difference) and drafts the follow-up to the supplier. What to do about input tax credit at risk remains a finance decision. The monthly cycle is described in GST compliance automation.

Document-heavy operations

KYC checks in banking

Lending and account opening run on identity proofs, address proofs and bank statements in every format imaginable. Agents extract them, cross-check names and addresses, test whether statement balances add up and assemble a case file. In banking and financial services, the credit or compliance officer still makes the call.

Logistics paperwork

Bills of lading and freight invoices arrive from every carrier in its own format. An agent matches freight invoices to shipment records and contracted rates, then flags surcharges nobody agreed to. There are more examples on our page for logistics teams.

Procurement and operations

Turning approved requisitions into POs and chasing missing paperwork are both good agent work. The chasing is underrated. An agent can notice an invoice with no goods receipt, ask the stores team and wait, and nobody has to keep a spreadsheet of open items. It is one of the quieter wins in procure-to-pay automation.

Where agents are a poor fit

Agents are the wrong tool for work without written rules, for very low volumes, and for decisions that rest on relationships, such as renegotiating with a strategic supplier. Automating those usually costs more than it saves.

What it takes to put agents into production

When agent projects stall, the model is rarely to blame. Usually the agent can't reach the data, the rules were never written down, or nobody owns the exceptions. A sensible order of work:

  1. Pick one workflow with real volume and clear rules. AP invoice processing is a common first choice.
  2. Write the rules down, including who owns each type of exception. If they live in one person's head, that is the first deliverable.
  3. Agree the integration method for each system with your IT team before anything is built.
  4. Test on your own documents, bad scans included, rather than a vendor's samples. You can test one of your documents with DocPro first.
  5. Start with strict thresholds and plenty of review, and loosen them as the evidence builds.
  6. Name who clears the exception queue, and how fast. Otherwise the agent has only moved the backlog.

A first workflow typically takes 4 to 12 weeks. That range is indicative; document types, integrations, the number of workflows and the deployment model all move it. If you aren't sure your organisation is ready, start with our AI automation readiness guide or these signs your team is ready for AI agents.

How PTAS AI builds enterprise AI agents

DocPro and FinSuite are built on this architecture. DocPro understands documents: its Invoice, Receipt, Bank Statement, KYC and Identity, and Purchase Order agents each have their own schema, validation rules and thresholds. FinSuite executes finance workflows, including matching, vendor management, GST compliance and posting to your ERP after approval. Together they take a document from arrival to a verified ERP entry.

When a workflow fits neither product, our engineers build custom AI agents on the same orchestration and permission model, deployed in the cloud, privately or on-premise where supported.

Frequently asked questions

What is the difference between agentic AI and an AI agent?

Agentic AI is the approach: AI systems that pursue a goal, plan their steps and use tools. An AI agent is one component built that way, usually with a single job. Enterprise systems typically run several agents under one orchestrator. Our explainer on what agentic AI is covers the concept.

Do enterprise AI agents replace finance staff?

No. They take on extraction, matching and data entry, and send exceptions, approvals and judgment calls to people. What is left for the team is the work that needs them: supplier conversations, unusual items and month-end decisions.

How do AI agents connect to SAP, Oracle or Tally?

Through tools that call the system's supported integration: a native connector, a REST API, webhooks, file exchange or a custom integration. The method depends on your version and hosting, and should be confirmed during assessment. Only the agent responsible for posting holds write access.

How do you stop an AI agent from doing something it shouldn't?

Give it a short list of declared tools, each with its own permission, and have the orchestrator refuse everything else. Keep limits in versioned configuration the agent cannot edit, require a person for high-risk actions such as bank detail changes, and record every step.

Find the first workflow worth giving to an agent

Tell us where invoices, documents or approvals still move by hand. We will look at the workflow, the rules and the systems involved, and tell you plainly whether an agent is the right fit.