One abstraction for state machines, resource flows, game mechanics, and token standards.
Build models you can simulate, analyze, and generate code from.
| Draw | Generate | Prove |
|---|---|---|
| Build state machines visually. Places, transitions, arcs — stored as JSON-LD with content-addressed identity. | AI constrained by the model produces correct code. The topology defines what's valid — the LLM fills in the implementation. | ZK circuits verify every transition without revealing state. Groth16 proofs from net topology. |
| pflow.xyz | pilot.pflow.xyz | Read about ZK → |
Places hold tokens. Transitions move them. Arcs define the rules. From coffee shops to poker games to blockchain bridges — the same formal structure, the same tools, the same proofs.
| Category | Demos |
|---|---|
| Tools | Petri Net Viewer, What is a Petri Net?, Thinking in Petri Nets, ODE Simulation & Prediction, Zero-Knowledge Proofs, Code to Flow |
| Games | Tic-Tac-Toe, ZK Tic-Tac-Toe, Texas Hold'em |
| Resources | Coffee Shop, Knapsack, Producer-Consumer, Vet Clinic, Predator-Prey, Enzyme Kinetics |
| Workflows | Loan Approval, Hiring Pipeline |
| Computation | TCP Handshake, Thermostat, Dining Philosophers, Stoplight |
| Classification | Poker Hand |
| Repository | Description |
|---|---|
| pflow-xyz | Visual editor & ODE simulator — Draw |
| go-pflow | Go library — simulation, process mining, ZK proofs, code generation |
| petri-pilot | MCP server + deterministic full-stack app generation — Generate |
| book-pflow-xyz | "Petri Nets as a Universal Abstraction" — practitioner's guide |
Draw (pflow.xyz) ──▶ Generate (go-pflow + petri-pilot) ──▶ Prove (ZK circuits)
▲ │
└────────────────────────────────────────────────────────────┘
petri-pilot provides MCP (Model Context Protocol) tools — AI assistants like Claude can design models and generate complete applications.
Connect your agent via Smithery:
petri_validate → Check model structure
petri_simulate → Fire transitions, trace state
petri_analyze → Reachability, deadlocks, liveness
petri_codegen → Generate Go backend
petri_frontend → Generate ES modules UI
petri_application → Full-stack app from high-level spec
petri_extend → Modify existing models
The LLM designs models. Templates produce apps. No LLM-generated code in the output.
- Visual Editor: pflow.xyz
- Demos: pilot.pflow.xyz
- Code to Flow: pilot.pflow.xyz/code-to-flow
- Book: book.pflow.xyz
- Blog: blog.stackdump.com