Skip to content
All writing
18 Oct 2026 · 7 min read

How Eve Came Into Existence: An Agentic ERP Chatbot on a Graph

How we built Eve, an agentic AI chatbot for ERPNext that answers from live business data on a FalkorDB graph and only drafts records for a person to approve.

Aswin LalCo founder, Full Stack
How Eve Came Into Existence: An Agentic ERP Chatbot on a Graph

What does this number mean? Why is it negative? Who still owes us money?

I asked myself these every time I opened ERPNext. I'm not an accountant, and I don't know much about running a business from a ledger standpoint, so the ERP we use every day was hard and confusing for me. The team had been quietly hoping for some agentic fix for this. Then we heard about Graph Hacks and FalkorDB, and their hackathon track gave me an idea. That's how Eve started.

Graph databases were alien to me (they still are, somewhat). But AI development and agents have come so far that I knew building something wouldn't be that hard.

ERPNext in two minutes

ERPNext is an open source ERP (Enterprise Resource Planning) application built on the Frappe framework. If I have to put it simply, it's a ledger system you can run your whole business on: customers, invoices, accounting, employees, stock, assets... pretty much everything.

Everything in a Frappe app is built on one idea, the DocType. A DocType is the structure every record follows. An invoice is a DocType, a payment is a DocType, an employee is a DocType... and DocType itself is a DocType.

That gave us a huge head start. Since every record follows the same model, schema generation was a piece of cake. Eve walks through the modules, reads each DocType, and checks two things: what it links to, and which child tables it has. Link fields become LINKS_TO edges and child tables become HAS_CHILD edges. On our site that's 926 DocTypes, 2,804 links and 463 child relationships. Once Eve has the schema, she syncs the actual data from the ERP into the graph.

Keeping that data in sync was trickier than it sounds. Frappe has hooks for every save, submit, cancel, delete and rename, so Eve queues each change once its transaction commits and writes them to the graph in batches. But ERPNext also updates things like invoice status, outstanding amounts and stock levels with direct SQL, which fires no hooks. So a sweep every 5 minutes catches what the hooks miss, and a full rebuild runs every night. The rebuild goes into a second graph and is swapped in only when it's complete, so nobody ever queries a half-built graph.

Three graphs, not one

Eve keeps three graphs in FalkorDB for each site:

  • Schema graph: what the ERP can hold, with one node per DocType.
  • Data graph: what the ERP does hold, with one node per record. Our seeded test site has 12,383 records, 6,465 child rows and 76,865 links.
  • Memory graph: each user's conversations and the insights Eve saves, so she remembers what we talked about last time.

Raw LINKS_TO edges are honest but not very helpful. "This invoice links to this customer" doesn't say how. So we added business rules that turn links into edges that mean something: FOR_CUSTOMER, PAID_BY, SOLD_TO, SUPPLIES, STOCKED_IN, TOOK_LEAVE, MANAGED_BY and others, 21 edge types in all.

A bowl of noodles

The first time I opened the FalkorDB graph view I was lost. ERPNext has a lot of modules, and the synced schema was, for lack of a better word, a noodles bowl. You only understand the connections if you give it time and look closely. Make the right Cypher calls and you start to see patterns in your data. Give it enough time and you see that those patterns mean something.

For example, this Cypher fetches every invoice and payment record for customers:

MATCH p = (c:Customer)<-[:FOR_CUSTOMER]-(si:`Sales Invoice`)
OPTIONAL MATCH q = (si)-[:PAID_BY]->(pe:`Payment Entry`)
RETURN p, q
LIMIT 50

You get a bunch of small graphs that together make a beautiful pattern. Look closely and you'll see a break in it. Here the break is an invoice with no payment attached, which means that invoice hasn't been paid yet. You can spot an unpaid invoice without reading a single report.

Graph of sales invoices and their payment records for each customer

Letting Eve write the Cypher

Seeing the data makes it much easier to understand and judge. Writing Cypher to find it is still tiring, though. So what do you do? What we did was have AI write the Cypher and answer our questions from the result.

The basic setup was running within hours. We connected Eve to an LLM (we tried Sonnet and DeepSeek; she works with Anthropic, OpenAI, Gemini, or anything OpenAI-compatible through LiteLLM), and she could find things in our business data and answer questions right from the ERPNext desk. There's an "Ask Eve" panel on every page. She answered the doubts I had: what this negative number means, how much we still have to collect from customers, and so on. Even I was amazed.

The Ask Eve chat panel answering inside ERPNext

She doesn't only improvise Cypher. Eve has a set of graph tools for the questions we kept asking:

  • who_knows: who created, commented on or sells to a customer, so you know who to ask
  • also_bought: customers who bought X also bought Y, three hops across the graph
  • dormant_customers and supplier_risk: who stopped buying, and which suppliers you depend on too much
  • explain_connection: the shortest path between any two records, for when you ask "how are these two related?"
  • run_cypher: for anything else, she writes her own query

You don't have to take her word for it, either. Every answer can expand to show the exact Cypher she ran, its parameters and the first rows, and source chips link straight back to the ERP records.

Eve can write, but only drafts

Later we added record creation as well. An ERP agent that can write is scary, so we were strict about it:

  • Eve only proposes a record. You see a card in the chat and click Create or Cancel.
  • The insert runs as you, so Frappe's normal permissions and validations still apply.
  • She never submits anything. Everything she creates is a draft for a human to review.
  • Writing is off by default and limited to an allowlist of DocTypes.
  • Every Cypher query she reads with is read-only. FalkorDB enforces that (GRAPH.RO_QUERY), and Eve also checks for write keywords before sending a query. Every query is logged.

Giving Eve a face

Since Eve was really helping me, the idea of giving her a face came to me: a mascot. The team suggested a geometric shape or a blob, but deep down I wanted Eve to have a human face. She made the hard parts of the ERP easier for me, and even though she's an AI agent, she deserved a face. Her face was born after four or five iterations, and later she came to life too. She's a wavy-haired girl (though I like to believe she's a chibi version of a mean young accountant).

Eve mascot evolution board

Testing with fake data

We didn't want to point a hackathon project at real books, so we wrote a seeder that generates three years of ERPNext and HRMS data. Seeded data has one problem: every record is owned by Administrator, so "who knows about this customer?" always answered "Administrator". We added fake sales people, assignments and comments so the people side of the graph had someone to find. Eve's performance on all of this was really satisfying.

What's next

Right now Eve is pre-production, a v0.something. Next I'm building her into something you can actually deploy, a true v1.0.

The code is on GitHub: github.com/aswnss-m/eve. This post was first published on Aswin's blog.

Building something like this? Talk to the people who wrote it.

Response within one business day.