Skip to content
← All apps04 / RELAINE

HUMAN-APPROVED AI WORKFLOW AGENT / LOCAL-FIRST MVP

RELAINEAGENTIC WORKFLOWS. HUMAN DECISIONS. VERIFIABLE EXECUTION.

Let AI propose the work. Keep people in control of the action.

RELAINE turns a natural-language business request into a validated task proposal, pauses for an explicit human decision, then executes exactly the reviewed action through persistent SQLite tools.

A real Ollama-generated create_task proposal waiting for human approval
RELAINE / PENDING APPROVALLOCAL APPLICATION · SYNTHETIC DATA

01 / PROBLEM & SOLUTION

Autonomy is useful only when execution stays accountable.

THE BUSINESS PROBLEM

A language model can interpret a request, but letting it write directly into business systems makes review, traceability and failure handling dangerously unclear.

THE PROPOSED SOLUTION

Separate proposal from execution. RELAINE validates the request, asks a local model for a strict structured action, persists an immutable snapshot, then waits for human approval.

THE MVP SCOPE

Two real actions—create_task and update_task—demonstrate the full control loop without pretending to be a general autonomous agent or a production platform.

02 / ACTUAL USER JOURNEY

One request. Five explicit states. No silent execution.

The browser never supplies replacement tool arguments. Approval names the stored proposal ID and fingerprint; the backend executes the authoritative persisted snapshot.

  1. 01

    REQUEST

    A person describes the task outcome in ordinary language.

  2. 02

    AI PROPOSAL

    LangGraph validates the request and Ollama returns a Pydantic-constrained create_task or update_task proposal.

  3. 03

    HUMAN REVIEW

    The action, parameters, rationale, proposal ID and fingerprint are visible before any business write.

  4. 04

    EXECUTION

    Only an exact approval can claim the proposal and call the matching persistent SQLite tool.

  5. 05

    AUDIT

    Submission, decision, execution and recovery events remain available as append-only history.

03 / ARCHITECTURE

Local components with deliberately narrow responsibilities.

LangGraph owns workflow state; Pydantic owns contracts; the approval service owns trust checks; SQLite owns proposals, tasks, receipts, checkpoints and audit history. The model proposes—it never receives a tool-execution path.

REQUEST→LANGGRAPH + OLLAMA→HUMAN GATE→SQLITE TOOL→AUDIT
Workflow
LangGraph routes validation, structured generation, proposal validation, approval interruption and controlled resume.
Local inference
Ollama with the already-installed gpt-oss:20b model, using ChatOllama structured output in JSON Schema mode.
Contracts
Strict Pydantic models validate action types, parameters, rationale, workflow states and API responses.
Application
FastAPI exposes submission, inspection, approval, rejection, task listing and read-only audit history on loopback.
Persistence
Python sqlite3 stores task records, proposals, checkpoints, execution receipts and audit events in one local database.
Interface
Native HTML, CSS and JavaScript present the proposal, explicit decision controls, execution result, tasks and history.

04 / SECURITY, IDEMPOTENCY & RECOVERY

The side effect is guarded before, during and after execution.

RELAINE is designed to fail visibly. Unsupported requests, missing parameters, malformed model output, unavailable Ollama and database failures are never re-labelled as successful proposals.

01

Immutable review

Each proposal receives a unique ID plus a fingerprint of its immutable action-and-parameters snapshot. Mismatches and tampering are rejected.

02

Atomic claim

The pending-to-executing transition is guarded in SQLite so duplicate or concurrent approvals cannot claim the same proposal twice.

03

Idempotent write

The business mutation and a unique execution receipt keyed by proposal ID commit in the same SQLite transaction.

04

Crash-safe recovery

Recovery finalizes a committed receipt without repeating its write, and retries only when the absence of a committed effect is provable.

05

Fail-closed ambiguity

Rejected, unapproved, completed, tampered and ambiguous legacy executions are never re-executed automatically.

06

Append-only evidence

Audit events are recorded alongside state changes where possible, while SQLite triggers prevent updates or deletions.

05 / VERIFIED RESULTS

Verified as a working MVP, not presented as a production service.

The release passed 103 non-Ollama regression tests and genuine local inference with the configured gpt-oss:20b model. The two real Ollama tests covered a smoke path and a live HTTP end-to-end workflow.

Non-Ollama regression tests
103 passed
Real Ollama tests
2 passed
Business actions
2 controlled
Hosted demo
None

These results verify the implemented paths and release packaging. They do not establish production security, multi-user behavior, model quality across arbitrary requests or operational reliability at scale.

06 / REAL SCREENS

Both captures come from the running local application with synthetic demonstration data. The first stops at pending approval; the second shows the persisted result and audit trail after approval.

07 / LIMITATIONS

A small agentic system with a clear line between suggestion and authority.

← All apps