Back to all posts
AI Agents7 min read·October 25, 2026

How to Connect an AI Agent to an ERP Without an API

TB
ThynkBlox AI Team
AI Engineering

Can you connect an AI agent to a legacy ERP without an API?

Yes, if the ERP provides an approved way to exchange files, read selected database records or operate its screens. To connect an AI agent to a legacy ERP without an API, assess supported exports and imports first, restricted database views for reading second, and controlled screen automation where neither provides the required action. Give the agent only the access needed for one defined workflow; keep the connection read-only when you cannot verify or safely recover from a write.

The decision is about which actions your organisation can support, check and maintain. Start with a narrow task, such as preparing an order draft, rather than granting general access to the ERP.

Which connection method should you choose?

Choose separately for reading and writing. An agent might read an approved export, prepare a proposed change and leave the final entry to a person.

MethodUse it whenReading boundaryWriting boundaryMaintenance question
Supported file exchangeThe ERP has a documented export or import for your workflowApproved fields and export scheduleApproved template, checks and import permissionsWho checks changes to templates and field meanings?
Restricted database viewsYour ERP owner approves database access for reportingSelected records and columns through a read-only accountNo direct database writes in this designWho maintains the views when the ERP changes?
Controlled screen automationThe required action is available through an approved screen workflowDesignated screens and recordsNamed actions through a restricted accountWho retests navigation and confirmation steps after changes?

Confirm support with the ERP owner or supplier before choosing a route. A file upload screen, database connection or working login does not establish that the proposed use is supported.

When are supported imports the right starting point?

Start with a supported import when it covers the exact record and action you need. Ask for its documented template, required fields, validation rules and result report.

Design the agent to prepare a proposal rather than invent the import rules. Use explicit checks for required values, valid record references and permitted changes before submitting anything.

Decide how the workflow handles:

  • A file containing both accepted and rejected rows.
  • A record that already exists.
  • A submission whose result is unclear.
  • An approved file changed before upload.

Do not assume that an entire file succeeds or fails together. Establish the actual behaviour in a test environment and reconcile each proposed record against the result.

Keep an exact copy of what was approved and submitted. Approval should apply to that version; a changed file needs fresh validation and, where required, fresh approval.

When should you use database views?

Consider database views for a defined reading task when an approved export does not provide the necessary data or freshness. Ask the database owner to expose only the fields and records needed, with database-enforced read-only permissions.

For example, an order-status assistant could receive order references, fulfilment status and expected dispatch information. Its task does not justify access to employee records or supplier payment details.

Before relying on a view, agree on what each field means. Does “available stock” include reserved goods? Are cancelled orders excluded? Which timestamp shows when the underlying record last changed?

State those limits in the agent's answers. If freshness is unknown, it should not present a stock answer as current.

Exclude direct database writes from this approach. Without documented support for the exact operation, you have not established whether a database change will preserve the ERP's required checks and related records. Use an approved import, supported screen workflow or human entry instead.

For a broader access checklist, see what data an AI agent should be able to see.

How should controlled screen automation work?

Treat screen automation as a bounded sequence of permitted actions. Define the starting screen, record-selection rules, editable fields, confirmation step and evidence of success.

Avoid an instruction such as “update the order however necessary”. Prefer “open the approved order, check its current status, enter the approved delivery note and save only if the record still matches”.

Separate the agent's proposal from execution. The agent can interpret a request and propose values; the executor should enforce the permitted actions and reject anything outside them.

Require it to stop when:

  • The screen or selected record differs from what was expected.
  • A warning or additional confirmation appears.
  • A required field cannot be checked.
  • The save result is ambiguous.

Treat screen labels, navigation and timing as maintenance dependencies. Retest the affected workflow after ERP changes, and provide a clear way to pause it. If you cannot assign an owner for that work, keep execution with a person.

What write restrictions and credential controls are necessary?

Define permissions by business action. “Can access orders” is too broad. “Can create an unposted order draft for this business unit” gives you a boundary to enforce and test.

Start by excluding payments, bank-detail changes, user administration, record deletion and final posting. Add any sensitive action only through a separate decision with an accountable owner.

Use a dedicated automation identity where the ERP supports one. Grant the minimum permissions, store credentials in an approved secrets store and keep passwords, session tokens and recovery codes out of agent prompts and model-visible logs.

Check both layers of access. The account should restrict what can happen inside the ERP, while the executor should restrict which actions the agent can request. An instruction to avoid a screen is not a permission control.

Record the request, proposed action, approval where required, submitted values and confirmed result. Limit access to those records and avoid retaining unnecessary sensitive content.

Place approval immediately before the consequential action. Human approval steps for AI agents explains how to make that review specific.

When the same record differs between systems, see how to resolve conflicting ERP and CRM records in automation.

What would a bounded order-draft workflow look like?

Consider an illustrative workflow that turns a customer request into an order draft. It does not release stock or create an invoice.

  1. Read the request and identify the customer and requested items.
  2. Match them against approved ERP reference data.
  3. Send ambiguous matches or missing information to a person.
  4. Prepare a draft through the selected import or screen route.
  5. Check the saved draft against the approved proposal.
  6. Leave final approval and posting to an authorised user.

Give each request a stable tracking reference and establish how to detect an existing draft before retrying.

If a save times out, check whether the draft exists before trying again. When that cannot be established reliably, stop for review. Do not treat a missing confirmation as proof that nothing happened.

When should the ERP remain read-only?

Keep the connection read-only when the required write path is unsupported, permissions cannot be narrowed, or the result cannot be checked reliably.

The same applies when nobody owns exception handling, testing is unavailable, or a failed operation has no agreed recovery procedure.

Read-only work can still serve a clear purpose: summarising open orders, identifying records for review or preparing proposed entries for an operator. Make the boundary explicit in the interface. “Draft prepared” must not imply “saved in the ERP”.

Assess whether reading is appropriate too. If the available account exposes data beyond the approved purpose and that access cannot be restricted, pause the connection.

What common mistakes should you avoid?

The first mistake is choosing a route because a demonstration worked. Test ordinary variations, rejected records, duplicate requests, interrupted sessions and uncertain save results.

The second is assuming that approval covers later changes. If the target record changes between review and execution, recheck it before writing.

The third is leaving maintenance unowned. Assign responsibility for import templates, database views, screen changes, credential rotation and stopped jobs.

Finally, agree on success criteria before expanding access.

Frequently asked questions

Does the AI agent need a database password?

Only if the approved design requires database access. A controlled service can retrieve permitted data and give the agent a limited result. Keep the credential outside the agent's context.

Can the agent use an employee's ERP login?

Prefer a dedicated, restricted identity. If the ERP cannot provide one, resolve access, accountability and session rules before enabling writes.

Should the agent retry every failed action?

No. Retry only after establishing that the previous attempt did not create the intended record or change. Otherwise, send the uncertain result for review.

What should the first pilot prove?

It should prove that one bounded workflow produces correct results, respects access limits and stops safely when a check fails. Agree on those conditions before choosing whether to expand it, as described in how to run an AI pilot that ends in a decision.

Ready when you are

Want to talk this through for your business?

Send us the process you are thinking about. You will hear back from an engineer, not a sales team.