Ask an AI assistant what a German statute says, and you usually get an answer that sounds right. Sometimes the wording is from an old version. Sometimes the paragraph number is off by one. Sometimes the text is simply made up.
For legal work that is the worst kind of error, because it looks correct.
So I built a plugin that makes my agent read the provision from the official source before it answers.
What de-law does
de-law is a plugin for Hermes Agent, the open source agent by Nous Research. Ask for § 203 StGB, Art. 6 Abs. 1 lit. f DSGVO or Art. 50 AI Act, and Hermes gets:
- the wording of the provision, optionally only one paragraph,
- the version status of the law (Stand) and the gazette reference,
- a link to the source page,
- a ready-made attribution line for quoting.
It also searches the index of about 6,100 German federal laws and ordinances, lists the sections of a law, and finds and reads published decisions of the German federal courts.
Official sources, no API key
The texts come from three public sources:
- Gesetze im Internet for German federal law,
- Rechtsprechung im Internet for decisions of BVerfG, BGH, BVerwG, BFH, BAG, BSG and BPatG,
- the Publications Office of the European Union for EU regulations and directives.
No account, no API key, no third party in between.
Citations the way lawyers write them
The hard part was not downloading texts. It was understanding citations. de-law accepts § 203 StGB, StGB § 203, § 43e Abs. 3 Satz 1 BRAO, Art. 6(1)(f) GDPR, Erwägungsgrund 47 DSGVO, Annex III AI Act and many more.
EU acts can be named by short names like DSGVO, GDPR, NIS2, DORA or AI Act, by CELEX number, or by their official number. Recitals are read from the original Official Journal text, because consolidated versions leave them out.
Five tools
| Tool | What it does |
|---|---|
de_law_get |
One section or article in full text, German or EU law |
de_law_search |
Find a law by abbreviation or title words |
de_law_toc |
Table of contents of a law, filterable |
de_case_search |
Find federal court decisions by file number, court and date |
de_case_get |
One decision: headnote, operative part, reasons, cited norms |
A small skill tells the model to use these tools before a web search and to quote the source line.
Errors that help the model
The tools never raise. A failure comes back as JSON with an error type and a next step for the model. If you ask for § 9999 BGB, the answer is not a nearby section. It is section_not_found with the advice to list the law instead of guessing.
That is the point of the design: the error tells the model what to do next, so it does not have to fill the gap from memory.
Version status and caching
Every answer says where the text came from: freshly downloaded, from the local cache, confirmed as current by the source, or, if the source is down, the last local copy marked as stale with its date.
What it is not
Legal texts, not legal advice. The plugin returns statute and court texts and does not interpret them. The texts are the consolidated versions from the official databases; only the Bundesgesetzblatt and the Official Journal of the EU are legally binding.
It also has limits: no commentary, no historical versions, no state law, no lower courts.
Install
hermes plugins install MadeByBrain/hermes-de-law --enable
It needs Hermes Agent v0.22.2 or newer and only the Python standard library. It is listed in the official Hermes plugin catalog.
Try it
MIT licensed and free. If you work with German or EU law and use Hermes, I would like to hear which citation formats it does not understand yet. Issues are welcome on GitHub.
I build more plugins and skills for Hermes at madebybrain.com/hermes-plugins.
Top comments (0)