Enthra
ProductOpen sourcePricingCompareAboutDocs
GitHubOpen the demo
On this page
  • How it fits together
  • Run it on your computer
  • Read your own drawings
  • Train the reader
  • The tools
  • Put it online
  • Settings
  • Engine API

Docs

How to run Enthra yourself, read your own plant drawings, and call the engine.

How it fits together

Enthra is two parts:

  • enthra, the web app (Next.js). It keeps plants, items, reviews and files in Postgres, and draws every screen.
  • engine, a Python service (FastAPI). It reads drawings, builds the plant model, and runs the simulator, safety checks, design tools and live twin.

The web app talks to the engine over HTTP. Everything Enthra knows about a plant lives in one plant model: equipment, lines, valves, instruments, and what connects to what, following the DEXPI information model.

Run it on your computer

You need Node 20 or newer and Python 3.12 or newer. Start the engine:

git clone https://github.com/enthra-labs/engine
cd engine
python -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python -m uvicorn server:app --port 8320

Then the web app, in a second terminal:

git clone https://github.com/enthra-labs/enthra
cd enthra
npm install
npm run dev

Open http://localhost:3320. The two demo plants load on first visit. The status bar at the bottom shows whether the engine is live. On Windows, use .venv\Scripts\ instead of .venv/bin/.

Read your own drawings

Reading needs an NVIDIA graphics card and the reader packages:

.venv/bin/pip install -r requirements-reader.txt

Click Read new drawings and upload the P&IDs as PDF or images. Add equipment data sheets too if you have them; they are matched to equipment by tag. Enthra finds every symbol, tag and line, follows lines across sheets, and builds the plant model.

The review screen colours each item by how sure the reader is. Confirm, fix, delete or add items. Every sheet you fix is saved as a practice page for retraining.

Want something to try it on? The example-plant repo has a full drawing set with the right answers.

Train the reader

The trained symbol finder is not in the repo (it is a 170 MB file). Make your own:

.venv/bin/python -m enthra.reader.synth --pages 1500
.venv/bin/python -m enthra.reader.detect train --iters 6000
.venv/bin/python -m enthra.reader.evaluate h2o2-demo

synth draws labelled practice sheets in the style of real P&IDs. detect train trains the symbol finder on them, about an hour on an RTX 4060. evaluate scores it against a demo plant. Once you have fixed sheets in the review screen, Retrain in the app adds them to the practice set.

Current score: 83% of all items right on both demo plants.

The tools

  • Lists and exports. Equipment list, line list, instrument index, valve list and bill of materials, as Excel, CSV or PDF, and the whole plant as DEXPI XML.
  • Search. Plain words like "pumps with no spare", with results shown on the drawings. Document lookup cites the page.
  • Simulation. Flows, temperatures and pressures on every line, what-if questions, a bottleneck finder and an energy finder. Every assumption is listed.
  • Change Manager. Upload a new revision of a sheet to see what changed and what it affects, and raise a change request.
  • Safety Studio. A HAZOP draft, a relief valve check with the sums shown, a safeguard map and an action tracker.
  • Design Studio. Change the plant by asking, copy and scale it, size equipment, estimate cost, compare options.
  • Live Twin. Upload sensor history as CSV. Enthra matches tags to the drawings and finds fouling, stuck or drifting sensors, and upsets.
  • Training. A training simulator on the plant's own drawing, with scenarios, scores and records.

Put it online

Both parts deploy to Vercel.

  • Engine: import enthra-labs/engine. No settings needed. An online engine has no graphics card, so it can't read new drawings; everything else works.
  • Web app: import enthra-labs/enthra. Add DATABASE_URL and ENGINE_URL. Files are kept in the database unless you add Cloudflare R2 keys.

Put both in the same region as the database, or every page waits on a long round trip.

Settings

The web app reads these from .env.local:

  • DATABASE_URL: Postgres, for example Neon. Without it, an embedded Postgres is kept in .data/.
  • R2_ACCOUNT_ID, R2_ACCESS_KEY_ID, R2_SECRET_ACCESS_KEY, R2_BUCKET: Cloudflare R2 for drawings and documents.
  • FILES_IN_DB: set to 1 to keep files in the database. Automatic on Vercel when R2 is not set.
  • ENGINE_URL: where the engine runs. Defaults to http://127.0.0.1:8320.

Engine API

Every screen in Enthra is built on these endpoints. The online engine at https://enthra-engine.vercel.app answers all of them except reading. Try one:

curl https://enthra-engine.vercel.app/demo-plants

Status and demo plants

GET /health
Engine version and uptime.
GET /demo-plants
The demo plants with sheet and equipment counts.
GET /demo-plants/{id}/model
A demo plant's full plant model as JSON.
GET /demo-plants/{id}/files/{path}
A demo plant's drawings, data sheets and sensor history.
GET /demo-plants/{id}/sheet-png/{sheet}
One demo sheet as a PNG.

Reader

Needs the reader packages and an NVIDIA graphics card. The online engine answers /reader/status only.

GET /reader/status
Whether a trained reader is available, and its training steps.
POST /reader/jobs
Start reading a plant.form: name, files (PDF or images), answer_key (optional)
GET /reader/jobs/{job}
Progress of a reading job.
GET /reader/jobs/{job}/result
The plant model the reader built, with a confidence per item.
GET /reader/jobs/{job}/pages/{sheet}.png
A read page as a PNG.
POST /reader/jobs/{job}/fixed/{sheet}
Save an engineer's fixed sheet as a practice page.JSON: the fixed items
POST /reader/retrain
Retrain the reader with the practice pages.

Simulation

Every call takes the plant model as JSON: { "model": ... }.

POST /sim/run
Flows, temperatures and pressures on every line, plus checks against design.
POST /sim/whatif
Answer a what-if question in plain words.+ question
POST /sim/bottleneck
Raise every feed step by step and report what runs out of room first.
POST /sim/energy
Where steam, cooling and power go, and what could be saved.

Safety and design

Every call takes the plant model as JSON: { "model": ... }.

POST /safety/hazop
A HAZOP draft: nodes, deviations, causes, consequences, safeguards.
POST /safety/relief
Relief valve check in the API 520/521 style, with the sums shown.
POST /design/ask
Change the plant from a plain request, like adding a spare pump.+ request
POST /design/scale
Copy the plant at a new capacity, between 0.1x and 10x.+ factor
POST /design/sizing
Size pumps, vessels, exchangers and lines from the simulation.
POST /design/cost
Equipment and plant cost estimate.+ inputs (optional)
POST /design/compare
Compare saved design cases side by side.cases

Changes, twin and exports

POST /revisions/compare
What changed between two revisions of a sheet.form: old, new, old_items
POST /revisions/page-png
First drawing page of an uploaded revision as a PNG.the file
POST /twin/analyse
Match sensor history to the drawings and find faults.form: csv, model
POST /twin/pi-test
Test a connection to an AVEVA PI Web API server.JSON: url
POST /export/table-pdf
A list as a printable A3 PDF.JSON: title, columns, rows
POST /docs/text
Text of each page of a PDF, for looking things up in documents.the PDF
Enthra

Plant drawings into a living plant model. Free and open source.

Product
  • Demo plant
  • All tools
  • Pricing
  • Compare
  • Roadmap
  • FAQ
Open source
  • GitHub
  • Web app
  • Engine
  • Docs
  • Example drawings
  • Brand files
Company
  • About
  • Brand
  • Security
  • Subprocessors
  • Privacy
  • Terms
Contact
  • Book a demo
  • X
  • Email
  • Report a bug
© 2026 Enthra Labs LLCMIT license. Demo plants are fictional.