Frappe/ERPNext is the perfect meta framework for agentic harness

Hi, my background is in applied machine learning and harness engineering that recently have gotten involved with ERPNext agentic data migration project and I just want to make the case that ERPNext is perfect for agent native workflows from a technical perspective and here is why:

  1. Total uniformed inspection - one pattern, every entity. You can get every DocType via GET /api/routes/DocType/<name>, this returns the complete schema for every doctype. Agents just need to use this endpoint to “discover“ the data model of any custom ERPNext system. There are no no special cases like Customers vs Items. The schema itself is data.
  2. The schema is writable as data — the agent can extend the target. createfield = insert a Custom Field row → Frappe ALTER TABLEs → the field is live and visible in metadata. What this means is that, if you have an Excel data sheet with new columns, the agent can introspect the schema and create the new rows and links using it’s own judgement. We tested on data migration POC agent harness and it works surprisingly well.
  3. Uniform CRUD + a tiny generic tool set. /api/resource/<doctype> is auto-generated for every doctype, so 9 generic tools (describe, get, list, create, update, set-mapping, import, …) cover the entire domain. An agent harness doesn’t need 50 hand-written tools; it needs a handful of shape-generic ones.
  4. Structured, machine-actionable failures. Because validation is app-layer (zero FKs), failures come back as typed exceptions — LinkValidationError, LinkExistsError, MandatoryError — with the offending field name in the message. The agent can read “Could not find Item Group: Machinery” and know exactly what to do: create that Item Group. Agent conflict engine is literally a structured projection of these same signals.
  5. Relationships are declarative, so they’re plan-able. Link/Dynamic Link/Table/fetch_from are all visible in metadata. An agent can: build a dependency graph (masters → transactions), dedup by the name/autoname field, and know “this field is read-only because it’s fetched from that linked doc.”
  6. Auditability is built in. Every document carries creation/modified_by/docstatus/versions, plus the write-on-submit ledgers. An agent’s actions are inherently traceable — which can pairs with a JSONL run transcripts to give a full “what did the model do and what did the system accept” trail. This also gives the ability roll back any data schema in an agentic workflow.

However there are some challenges that agent builders need to work around:

  • Business logic is not 100% declarative - validate()/on_submit() live in Python controllers, not tabDocField. A Sales Order’s pricing, tax, and stock side-effects on submit are invisible to schema introspection. So “read the metadata” gives the agent the data contract, not the behavior contract.
  • Errors are stringly/HTML-ish, you have to manually parse some errors to get the structured data to feed the agents context.
  • Multi-step flows are orchestration, not one call. to create major schema changes, it involves orchestrating multiple API requests using tool use. There is not a single batch API which we can create columns A, B, C, and records X, and Y and link them to F, and G.
  • Naming semantics are subtle. name vs the autoname field vs naming-series, case-insensitivity, and fetch_from overwriting writes.
  • The REST surface is thin. CRUD is uniform, but batch/bulk and complex ops (submit, amend) have their own semantics — hence our Data Import path for volume.

In short: ERPNext/Frappe is unusually agent-friendly because it exposes schema-as-data and uniform CRUD — but the agent still needs a translation layer that turns “metadata + typed exceptions” into “conflicts + actions,” which is exactly what I have been building as a layer on top of ERPNext as an open-source project.

Is anyone else exploring agentic workflows with, would love to chat about your experiences, discoveries, and challenges.

Any updates on this?

We are just trying to use this huge capability to its maximum level through Noviz.in agentic building, while efficiently reducing token consumption by planning the to-and-fro mechanism through server-side rendering, reports, analytic engine and so on.

Check our architectural flow: Noviz Platform Architecture: Core, Connectors, Permissions, Workflow and RAG | Noviz

Frappe Marketplace: https://cloud.frappe.io/marketplace/apps/noviz_ai

Interesting approach! Reducing token usage while keeping the workflow efficient seems especially important for agentic systems working with large ERPNext datasets. Curious to see how this develops.

Hi @zshanhui , thanks for sharing this. I’ve been exploring a similar direction with Atlas, an agent workspace built within Frappe, so several points here resonate with what we’re building.

Our focus is bringing the development workflow together: project context, connected servers, tools, skills, memory and recurring bots. You can register a development server, connect its projects, and make project knowledge available to coding tools such as Codex and Cursor through MCP. Although Atlas lives within Frappe, the connected projects can be other types of applications too.

Bots can be configured through chat, given recurring responsibilities, and delegate focused work to existing specialists or temporary agents. Browser-assisted testing is another useful workflow: using a dedicated test account, an agent can walk through a feature, check validation and mobile layouts, capture evidence, and repeat the checks after a fix.

Your point about business behaviour living beyond the schema is especially relevant. Access to metadata helps an agent discover the system, but dependable work also needs relevant source context, permissions and checks against the actual outcome. We’re strengthening that verification layer in Atlas, including inspecting tool receipts and reviewing proposed instruction improvements.

One distinction I’d make around recovery is that a missing linked record doesn’t always mean the agent should create it—it could be a mapping error or a typo. Knowing when to retry, investigate or ask the user seems just as important as having the tools to act.

The replies about token efficiency are relevant too. My preference is to give agents focused context and perform filtering or aggregation close to the data, while keeping the underlying evidence available for verification.

Atlas is still evolving, and we haven’t established it as a complete migration solution. I’d be interested to see your project and compare approaches, particularly around dependency ordering, conflict handling and recovering from partially completed work.