OpenDecision

September 20, 2026 · View on GitHub

Tests Version Python License

OpenDecision is the open-source equivalent of TypeSafe's Jev.

Send it application state or a document and typed questions. It returns structured answers that code can use directly.

Jev and OpenDecision use the same core pattern: state plus typed questions in, structured answers out. Both provide Choice, Noul, and Score.

OpenDecision provides:

  • Choice to select one option from a list.
  • Noul to measure whether a statement is true.
  • Score to place state on an ordered scale.
  • Relation to report supports, contradicts, unknown, or conflicted.
  • Document processing with evidence retrieval and source passages.
  • A Python API, a FastAPI server, and a TypeSafe SDK compatible endpoint.

The default backend is MoritzLaurer/ModernBERT-large-zeroshot-v2.0. It runs locally and produces classification scores without generating text.

OpenDecision is licensed under Apache 2.0.

What can it do?

Play Doom

OpenDecision can choose actions for a bot in ViZDoom's Deadly Corridor at wall-clock speed.

The input is structured game state: health, ammo, kills, target position, goal position, and recent damage. The demo uses a disclosed tactical router, a target-tracking actuator, and a one-tic damage reflex. OpenDecision chooses between the actions available in the current tactical situation.

OpenDecision plays Doom at skill 5

Watch skill 1 · Watch skill 3 · Run the demo

These are fixed-seed recordings. No win rate has been measured.

Answer questions about data and documents

OpenDecision accepts plain text, JSON, or other Python values as state. The document API splits long documents, finds relevant passages, answers each question, and returns the passages used.

Insurance claim example

The sample claim contains a demand letter, policy facts, a police report, medical records, bills, and employer records.

QuestionAnswer
Are the medical expenses documented?established
Is a serious injury documented?refuted
Is the rental need fully supported?unknown
Are documents still outstanding?established

The current synthetic claim experiment retrieves all 17 required facts and matches all 10 composed decisions. This is one development case. See the insurance claim benchmark.

GDPR example

The GDPR example uses a 54,171-character document split into 31 sections.

QuestionAnswer
Must a personal data breach be reported within 72 hours?true
Must every organization appoint a Data Protection Officer?false
Can pre-ticked boxes count as valid consent?false
What is the maximum fine for serious infringements?EUR 20 million or 4% of worldwide turnover

The current retrieval experiment answers 9 of 10 objective questions correctly. See the questions and saved results.

Yes/no answer modes

POST /v1/documents/decide has one noul_mode setting:

ModeResult
binaryAlways chooses true or false.
three_wayReturns supports, contradicts, or unknown.
bothRuns both evaluations. This is the default.

In both mode, OpenDecision reports confirmed, tentative, or conflicted. A conflict has answer: null. Both score distributions remain in the response.

These modes are for document Noul questions. They are separate from the internal scoring used by Choice.

Get started

OpenDecision requires Python 3.13 or later.

pip install OpenDecision

Or add it to a uv project:

uv add OpenDecision

Run a decision in Python:

from opendecision import OpenDecisionEngine

engine = OpenDecisionEngine()

result = engine.choice(
    state="The customer was charged twice for one subscription.",
    instructions="Which team should handle this request?",
    criteria={
        "billing": "Payments, invoices, refunds, and duplicate charges",
        "technical": "Software bugs and integration problems",
        "sales": "Pricing and new purchases",
    },
)

print(result["choice"])
# billing

Start the API:

opendecision serve

In a uv project, run uv run opendecision serve.

Open http://127.0.0.1:8000/docs to send requests from the interactive API page.

The model downloads from Hugging Face on first use.

Documentation

API surface

GET  /health
POST /v1/systemone
POST /v1/documents/decide
GET  /docs
GET  /openapi.json

POST /v1/systemone accepts the core TypeSafe request shape. A local OpenDecision server can be used as the base_url for compatible clients.

Current status

OpenDecision v0.1.1 is a developer preview.

Treat the model scores as uncalibrated. Evaluate the model and thresholds on your own data before using the results in an automated decision process.