Hi everyone,
I’m building an open-source add-on for ERPNext v16 and would like feedback from people who know Frappe and ERPNext well. It’s an early concept. It’s a separate Python service that talks to ERPNext over its REST API, not a Frappe app yet.
The idea: agents prepare, a person approves
Every morning it reads stock and usage from ERPNext and warns early, before a minimum quantity is crossed. It compares your suppliers and prepares a purchase request. When you approve, it creates a draft Purchase Order or Material Request. It never submits anything, and the approver is recorded.
What it looks like (all screenshots use my test data and test suppliers)
A reorder request arrives on Telegram, with the numbers and the reasoning:
After “Start reorder”, it compares the suppliers and asks for the purchase order. It shows the score, total cost with duties and taxes, delivery time and on-time record:
It also shows why the other suppliers were not chosen, and the buttons to change quantity, change supplier or cancel:
After I pressed Create order, this is the draft Purchase Order in ERPNext. The “Agent proposal reference” custom field and the “Approved by” field are the only additions:
You can also ask it questions, on Telegram or in the web console. Late deliveries:
Supplier comparison for a quantity:
Goods receipts that don’t match their orders:
And a history of past decisions with the reasons given at the time:
How it works with ERPNext
- Reads: Item, Bin, Stock Ledger Entry, Purchase Order, Purchase Receipt, Purchase Invoice, Sales Order, Supplier Quotation, Item Alternative, Stock Reconciliation and Contact.
- Writes: only draft Purchase Orders and Material Requests, plus outgoing e-mail through ERPNext’s own Email Account. erp-agents erp-setup adds one custom field, “Agent proposal reference”, on Purchase Order.
- Sign-in: users sign in with their ERPNext login (2FA supported), and ERPNext’s own permissions decide what they can do. With sign-in on, drafts are created under the approver’s own user.
- Service account: erp-agents erp-check-access shows whether it holds only the roles the app needs.
- Stock numbers: you choose which stock columns count (reserved, on order, planned and so on), which warehouses count, and how stock in transit is treated.
What’s inside
- Four rule-based agents (stock monitor, procurement, follow-up, stock intelligence) and two optional AI agents (a morning brief and a purchasing second opinion).
- An MCP server and client with 15 tools: 13 read-only, 2 that can only prepare a request. Any MCP client can use the tools.
- Approvals on a web console, Telegram or WhatsApp. The first answer wins.
- Delivery chasing, goods-receipt checks, a vendor scorecard, supplier quote requests, demand forecasting, slow-stock detection, substitutes and stock-count assistance. Vendors are contacted only after a person presses Send.
- A history you can search (“why did you do that?”), sealed with hashes so changes show up.
AI is optional. The stock logic and vendor ranking are plain rules. If you switch the AI on, use Ollama on your own machine or a hosted model with explicit consent. Every number in an AI answer is checked against ERPNext data, and the rules answer instead if the check fails.
Try it (about 3 minutes, no ERPNext needed)
docker compose up --build starts a demo on built-in data. The repo also has a testing guide in docs/TESTING_GUIDE.md.
Repo (GPL-3.0): GitHub - vivek-vpc/erpnext-ai-agents: AI Agents for ERPNext · GitHub
What I know doesn’t work yet
- It’s tested live on ERPNext v16 only.
- It runs as a single instance (SQLite).
- It’s planned as a Frappe app, with a module per feature set, but nothing of that is built. The plan is in docs/FRAPPE_APP_PLAN.md.
Where your experience would help most
- If you’ve shipped a Frappe app: does the planned port (the logic reused, the web, scheduler and storage replaced by Frappe’s own) look sensible?
- Does a dry run (erp-agents run-once --dry-run) match your Stock Balance report? If not, which stock columns or warehouses should count differently?
- Is the supplier comparison missing something you check before ordering?
- Is anything in how it uses ERPNext (roles, the custom field, e-mail through Communication) a bad idea?
Please use a test site or a copy of your data, and leave out real company names and prices when you reply. Thanks for any time you can give it.
Thanks.
Best Regards,
Vivek Chaudhari.







