[RFQ] Frappe in the agentic world

@rmehta The following gaps in Frappe Framework for agentic development have crystallized for me, over the past years:

  • An agent works best if it can read and update docs along with the code. Docs should serve three audiences—AI agents, human developers, and end users on the site—with distinct layers for each (e.g. agent context like AGENTS.md, developer reference next to code, user-facing help served from the site). Today there is no single convention: patterns are ad hoc (www/ markdown, config/docs.py, pyproject.toml URLs, AGENTS.md), so agents don’t know where to look. Nor are docs served from the site in a unified, searchable way. We need a standardized layout next to code and a built-in site route that indexes and serves the user-facing layer per tenant. Start with app-global docs (same content on every site running the app), but design the layout and serving layer so site-specific overrides can be added later. Sync means docs live in git next to code and are picked up automatically on deploy/bench migrate—no separate CMS or manual copy step.

  • Agents often run into problems running Frappe tests. Integration tests depend on exact DB state and are hard to set up. Frappe v16+ added bench run-tests --test-category unit and UnitTestCase / IntegrationTestCase, but agents don’t know about it yet, and most tests in the ecosystem are still written as integration tests. We should migrate tests to unit tests where possible and provide a simple, well-documented default command for running unit tests only—optimized for minimal setup (works on a fresh disposable site without manual config) and fast feedback (single app or changed file). Support two tiers: no-site tests with mocked Frappe context for pure logic, and site-backed unit tests for Frappe-specific code (permissions, hooks, DocType lifecycle). Frappe should set conventions and ship example migrations; apps adopt incrementally.

  • The standard way of editing DocTypes was human changes via the Desk UI. This is inconvenient for LLMs, even with vision. Since DocTypes are themselves documents (meta), we need a generic CLI for CRUD on any DocType/record—not a DocType-specific tool. That covers schema changes, Custom Fields, and other setup records through one interface. Proposed shape: pipe JSON on stdin, print the final document on stdout, support --dry-run:

    echo '{"new": "data"}' | bench doc create DocType --dry-run
    bench doc read DocType DocName
    echo '{"modified": "data"}' | bench doc update DocType DocName --dry-run
    bench doc delete DocType DocName --dry-run
    

    On success (non-dry-run), write to the DB only—use the existing export/sync workflow separately (export-doc, bench migrate). All operations require --site (fall back to current_site when set, as with other bench commands).

These three gaps are equally important; no single one blocks the others.

Regarding the review bottleneck, Greptile (referral link) is working well for us. They support cross-repository context, produce low-noise reviews that catch the worst mistakes, and have a free for open-source plan.

7 Likes

I have been researching on getting the correct workflow for building Frappe and ERPNext apps with increased accuracy.

My research work until now:

  1. Created comprehensive Agentic Skills for any agentic workflow to generate proper Frappe applications. I forked this from another good soul but kept on adding all the skills required. I think it have covered almost 80 to 90% frappe knowledge as skills.

Agentic research

I decided to customize Hermes agentic framework for frappe apps and none of the frontier agents could create me things properly. So I created Hermes Agent workflow and personalities - frappe-architect, frappe-developer and so on. Agent.md workflows to link skills and personalities. Now I am getting a decent output but still not happy. I am trying to do a similiar one with OpenHands that works like “Replit” for Frappe.

Code Indexing:

Frappe is very unique as functionalities can be injected or overridden using custom apps and hooks.py. There are lot of module dependencies. I created Frappe Forge to index the whole Frappe code base and it looks like this:

This data can be made available to any LLM to understand relationship between doctypes and methods and save tokens. We can extend this to any Frappe app and build a huge semantic layer that can be also used to “decompose” erpnext is required in the future.

Frappe needs to provide tools to create modules, doctypes so speed up the process and do light with the runtime dependencies.

. @rmehta - I am happy to contribute for a co-creation with if you Frappe is interested. There are lot of moving parts :slight_smile:

I have Side bar based Frappe AI Chat APP with a external MCP server and Agent:

4 Likes

Great work. Is this available as open-source?

Which tool did you use for the index?

Validation Environment is very important -one that can be started quickly and disposed quickly. The current installation process is cumbersome. So I built Frappista - bootable Frappe Containers that can be used by agents with staruptime under 8 sets.

Next one is my PR(under Review) to make Redis optional for developer environment will help a lot.

Hoping this will get approved soon. I will then release my OpenHands runtime for Frappe.

1 Like