Muster

ERPNext AI agent · Frappe AI · governed automation

An ERPNext AI agent that understands DocTypes, fields, workflows, and permissions.

Muster gives Frappe and ERPNext teams an agent harness that can build context from sites, installed apps, modules, DocTypes, reports, scripts, and workflows before it acts.

The goal is practical: fewer generic ERP guesses, more permission-aware answers, scoped memory, token visibility, and auditable automation.

pnpm --package=@musterhq/cli dlx muster demo

Frappe context pack

A plugin-owned context layer, not a bloated core binary.

Muster keeps the main harness light. The Frappe / ERPNext pack is where site-specific context belongs: docs, installed apps, module metadata, DocTypes, fields, permissions, reports, scripts, and workflows.

Why Frappe AI needs a harness

ERP context is relational, permissioned, and constantly customized.

DocType-aware retrieval

Frappe answers need module, DocType, child table, field, custom field, and workflow context, not generic docs alone.

Permission-aware actions

Reads and writes should execute as the real paired Frappe user, with Frappe remaining the authority.

Token visibility

Long support and ERP investigation threads should show token cost and replay waste instead of hiding spend.

Scoped memory

Tenant, site, workspace, user, and session context must stay separated to avoid cross-customer leakage.

Eval-gated learning

New Frappe behavior should be backed by fixtures before it becomes durable assistant behavior.

Use cases

What Muster can help Frappe and ERPNext teams build.

support

ERP support assistant

Answer operational questions with site, module, workflow, and record context while keeping memory scoped.

developer

Frappe developer copilot

Inspect apps, DocTypes, hooks, client scripts, reports, and bench commands with an audit trail.

operator

Production runbooks

Guide deployments, migrations, scheduled jobs, and incident triage with receipts and token accounting.

automation

Permissioned actions

Create or update records only through explicit tools, setup checks, and user-bound permission context.

In practice

Why a general-purpose agent fails on ERPNext.

Point a generic coding agent at an ERPNext instance and the failure is consistent: it answers about ERPNext-the-open-source-project rather than about your site. It suggests a field that exists in the upstream DocType and not in your customised one. It writes a query against a table name it inferred from a doctype label. It proposes a workflow transition that your workflow does not have. None of this is a reasoning failure. It is a retrieval failure, and it happens because the context an ERP agent needs is not in the model's weights and is not in the files on disk either.

The context an ERPNext AI agent actually needs

ERP context is relational, permissioned, and constantly customised, which makes it a genuinely harder retrieval problem than a codebase. Before answering or acting, an agent needs to know which site it is on, which apps are installed and at what versions, which DocTypes exist and how they link, which fields are on those DocTypes today including custom fields, which workflows are defined and what states and transitions they permit, which reports and scripts already exist, and — critically — which roles and permissions apply to the person asking.

That last one is where most ERP assistant projects quietly go wrong. An agent that retrieves across everything and then answers for whoever is asking has become a permission bypass with a chat interface. The retrieval boundary has to be the permission boundary, not a filter applied afterwards to the answer.

A pack, not a bigger core

Muster keeps the site-specific part in the Frappe / ERPNext capability pack rather than in the harness. The core stays a run loop with memory scoping, tool policy, and a token ledger; the pack knows about DocTypes, fields, modules, reports, scripts, workflows, and the setup checks that tell you when a connection is misconfigured before a run depends on it. This is deliberate on both sides: the harness does not accumulate ERP knowledge it cannot test, and the pack can evolve at the speed of the ERP rather than the speed of the framework.

It is also, honestly, the one place Muster's integration is deep rather than declared. Of 34 capability packs, only two are substantial — and this is one of them. Anywhere else on this site that Muster claims integration breadth, treat it as thinner than it sounds.

Memory scoped the way an ERP is scoped

Multi-tenant ERP deployments are the case scoped memory was designed for. Facts learned while working one company's books must not surface while working another's, and inside a single company, what a finance role saw should not become retrievable by a warehouse role. Muster's lanes — tenant, workspace, user, role, session — are filtered at retrieval time by what the current run is entitled to see, with tests whose specific job is to try to make one lane leak into another.

Changes to an ERP need an audit trail

An agent that edits client scripts, server scripts, or custom fields is changing a system of record. Muster derives the file-change set from git and the filesystem rather than from the agent's own report of what it did — measured live against Codex across five runs, that self-report channel reported zero of the real edits while all of them landed on disk. The observer caught the equivalent edit in 86ms with a diff verified by git apply, and emitted a receipt hash that reproduces byte-identically on a machine that was never there. For a system an auditor will eventually look at, that is the difference between a log and evidence.

Build Frappe AI with controls first.

Muster is open source. The Frappe / ERPNext path is strongest when contributors add real fixtures, module packs, field-level retrieval tests, and production-safe adapter hardening.