receipt-intelligence-n8n
AGENTS.md0 starsChanged 3 days agoMITView on GitHub
These are the n8n workflows behind the Receipt Intelligence demo at receipt-intelligence-demo. A workflow reads a PDF receipt, asks Claude for the merchant, date, total, and line items, puts a spending category on each line, and writes one JSON file under data/receipts/. The sibling API reads that folder. Start with README.md. From the repo root: The unit tests check the purchase-order samples. They also check that every file in workflows/ parses and holds no embedded credential. GitHub Actions runs these…
- Reads credentials
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- .cursor/rules/documentation.mdcCursor rule
- .cursor/rules/python-style.mdcCursor rule
- .cursor/rules/tests.mdcCursor rule
- .cursor/rules/working-in-this-repo.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
6 rules. About 2 are common, 3 are distinctive, and 1 is very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 10
One branch: Use a plain descriptive name so this work stays separate from other work.
- Very specific: line 55
Read this guide and .cursor/rules/ before you edit.
- Distinctive: line 57
Run the tests above before opening the pull request.
- Common: line 58
Keep secrets out of files, logs, and workflow JSON.
- Common: line 63
Put an API key, password, or token in a file.
- Distinctive: line 64
Add agent roles, shipping routines, or deploy steps to this guide.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project guide
What we're building
These are the n8n workflows behind the Receipt Intelligence demo at receipt-intelligence-demo. A workflow reads a PDF receipt, asks Claude for the merchant, date, total, and line items, puts a spending category on each line, and writes one JSON file under data/receipts/. The sibling API reads that folder. Start with README.md.
How a change happens
- One issue. The issue is the request. Use .github/ISSUE_TEMPLATE.md. The title starts with one emoji code, such as 🛠️ or 📄.
- One branch. Use a plain descriptive name so this work stays separate from other work.
- One pull request. The title is a plain sentence. The body follows .github/pull_request_template.md and includes
Closes #with the issue number. - Automated tests. They run on every pull request and on every push to main.
- Roxana reviews and merges.
Where things are
| Path | What it is |
| README.md | What the workflows do |
| docs/README.md | Reading order for the guides |
| docs/n8n-setup.md | Local n8n and the API contract |
| docs/integration.md | Run n8n and the API together |
| docs/pdf-extraction.md | PDF to validated receipt JSON |
| docs/categorization.md | Categories on each line |
| docs/contributing.md | Notes for people who ship or run this locally |
| workflows/ | Exported workflows: hello-world and receipt-pdf-ingest |
| data/README.md | Receipt JSON written to disk |
| samples/README.md | Sample receipt PDFs |
| samples/po/ | Sample purchase-order PDFs and their answer key |
| docker-compose.yml | Local n8n |
| .env.example | Env names. Real secrets stay in .env, which is not committed |
| tests/ | Automated tests |
| .github/workflows/tests.yml | The same tests on GitHub |
| .cursor/rules/ | Rules for agents |
| pyproject.toml | Ruff settings |
| LICENSE | MIT license |
Tests
From the repo root:
python -m unittest discover -s tests -v
python -m pip install ruff
ruff check .
ruff format --check .The unit tests check the purchase-order samples. They also check that every file in workflows/ parses and holds no embedded credential. GitHub Actions runs these commands on every pull request and on every push to main.
For the agents
Do:
- Read this guide and
.cursor/rules/before you edit. - Stay inside the current issue.
- Run the tests above before opening the pull request.
- Keep secrets out of files, logs, and workflow JSON.
Don't:
- Change how a workflow behaves unless the issue asks for that.
- Put an API key, password, or token in a file.
- Add agent roles, shipping routines, or deploy steps to this guide.
- Weaken a test so it passes.
- Merge. Roxana merges.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

