Most enterprise approval workflows aren’t systems. They’re email threads with a spreadsheet bolted on. When a decision gets disputed or an auditor comes knocking, the answer lives in someone’s inbox. If that person left the company, the answer may be gone entirely.
Developer Manjunath built an open source platform to fix this using LangGraph, FastAPI, and SQLite. The full source, architecture diagrams, state machine documentation, and 56 passing tests are on GitHub.
The Core Technical Pattern
The workflow engine uses two LangGraph primitives to handle human-in-the-loop pauses without polling loops or background daemons.
interrupt_before: Tells the graph to halt before a named node, persist the current state to the checkpointer, and return control to the caller. The graph resumes on the next explicit invocation with the same thread ID.AsyncSqliteSaver: A persistent checkpoint backend that survives server restarts. Unlike the defaultMemorySaver, which is process-local,AsyncSqliteSaverwrites to SQLite and is readable by any process with the correct connection string.
In production, swapping CHECKPOINT_DB_URL to a Postgres connection string is the only change required. The application code stays identical.
Why Interrupt Beats Polling
The conventional human-in-the-loop approach writes a “pending review” flag to a database and polls until a human updates it. That pattern has two failure modes: the polling process is a single point of failure, and concurrent reviewers can both see “pending” and submit conflicting decisions.
The interrupt approach eliminates both. When the graph reaches the review node, it halts. No polling process. No flags. The checkpoint store holds the state. Resume happens via a single API call that loads the checkpoint, applies the reviewer’s decision, and continues execution from that exact node.
Immutable Audit Logging
Every event is appended to a log with no update or delete operations. The developer made one deliberate structural choice worth copying: document content, raw field values, and personal data are never written to the audit trail. Only structured metadata is logged, such as the risk score, the event type, and the actor. This keeps the audit log outside the data retention requirements that apply to the documents themselves.
Pluggable Workflow Modules
The platform ships with two workflow modules today: compliance review and procurement. Both were added without touching the orchestration engine. Adding a third requires one new folder in workflows/ and implementing a standard interface with three methods: name, build_graph, and get_input_schema.
The compliance review module runs six automated stages before a human sees anything, producing a risk score and a full rule evaluation. The reviewer gets the complete automated output, not a summary, before submitting a decision.
Production Path
The platform is designed local-first with a documented migration to Azure: SQLite to Postgres, local file storage to Blob Storage, API keys to Key Vault, and uvicorn to Container Apps. The developer describes it as one environment variable change per component.
If you’re building any approval, review, or escalation flow where decisions need to be traceable after the fact, this architecture is worth reading before you start wiring up another email chain.
