endoxa
SMT-checked premises, verified revision proposals, and independent calibration instruments. Callers own adopted membership, confidence updates, history, storage, and application.
Status: pre-alpha. Releases before 1.0 may change the public API. Review the changelog before upgrading across minor versions.
The problem
An LLM agent will assert that a door is open, contradict itself twenty turns later, and never notice. Keeping track inside its own context mixes claims, standing rules, and confidence scores in one mutable prompt, with no check that adopted premises hold together or which records conflict when they do not.
endoxa checks submitted premises outside the prompt and proposes minimal, verified revisions without taking ownership of your store.
What it does
- Checks. Submitted assertions, closed TPTP FOF rules, and ground functional
exclusions go to
unsat, returningSAT,UNSAT, orUNKNOWNunder explicit per-check instantiation limits (max_rounds,max_matches). - Proposes.
propose_revisionevaluates candidate adoption or repair trials across complete inputs under explicit priorities (RevisionPolicy) and bounded budgets (max_withdrawals,max_checks), returningAdopt/Withdrawdata without mutating anything. - Holds. Equal-ranked repairs and inconclusive
UNKNOWNchecks defer explicitly rather than flipping a coin or applying partial search results. - Measures. Independent
endoxa.instruments.calibrationandendoxa.instruments.coveragecompute Brier, transition, and rule-graph metrics without touching governance state.
Example
from endoxa.governance import Assertion, PremiseSet, propose_revision
premises = PremiseSet(
assertions=(
Assertion(id="observation-1", atom="open(door)", truth_value=True, confidence=0.8),
Assertion(id="observation-2", atom="open(door)", truth_value=False, confidence=0.3),
)
)
outcome = propose_revision(premises)
assert outcome.decision == "proposed"
assert outcome.changes[0].target.id == "observation-2"
assert outcome.final.status == "SAT"
# Withdraw removes this ID from adoption. Its original negative claim stays negative.
# Nothing has been applied or saved.
See examples/ and the docstrings under endoxa.governance
for premise checks (check_consistency, check_entailment, check_support),
input validators (canonical_atom, validate_id, validate_confidence),
functional_scope retention, ranking rules, and safe atomic application via
RevisionBinding.
Install
Requires Python 3.14 or newer.
pip install endoxa
The core takes one dependency (unsat). Two optional extras add trace records
or rule-graph coverage measurements:
pip install "endoxa[trace]" # ordered trace records and async store protocol
pip install "endoxa[coverage]" # rule-network predicate coverage over unsat.Expr
What this is not
- Not a reasoner. endoxa does not decide whether a claim is true in the world. You hand it assertions and FOF rules, and it checks whether they hold together and what minimal withdrawal restores consistency. It makes no model calls and reads no external context.
- Not a knowledge base or ledger. Callers own storage, persistence schemas, adopted membership, confidence accounting, and historical replay. No database codec or state store ships here.
- Not a general-purpose SMT solver. Satisfiability checking is delegated to
unsatover Boolean formulas and uninterpreted first-order logic with equality. For arithmetic, bit-vectors, arrays, or strings, callunsator Z3 directly. - Not a new idea. Truth maintenance is Doyle (1979) and de Kleer (1986), and belief revision has decades of AGM theory behind it. This is that machinery packaged as a typed, immutable checking and proposal layer with independent calibration instruments.
- Not measured against an alternative. There is no benchmark claiming that an agent using endoxa is more accurate or better calibrated than one without it. What is checked lives in the test suite: contract invariants, boundary isolation, and consistency-checking behavior.
Design notes
- Backed by
unsat.unsat>=0.3.0provides the SMT engine and TPTP FOF parser.parse_premise_fof,parse_query_fof, andendoxa.instruments.coverageexchangeunsat.Exprvalues directly. - Pure proposals, caller-owned application.
propose_revisionnever mutates inputs; callers validateRevisionBindingagainst current records and apply changes atomically. - Instruments sit above everything.
endoxa.instrumentsis never imported by lower layers, enforced byimport-linterin CI. - One error hierarchy. Every exception raised on the package's behalf derives
from
endoxa.errors.EndoxaError(and standard built-ins such asValueErrororTypeError), wrapping external parser failures asRuleSyntaxError.
Development & Issues
uv sync --locked --all-extras --dev
uv run ruff check . && uv run ruff format --check . && uv run ty check && uv run lint-imports && uv run rumdl check . && uv run pytest --cov=endoxa
Bug reports and PRs are welcome on GitHub issues (maintained on a best-effort basis). Report security vulnerabilities through private advisories rather than public issues.
License
Apache-2.0. See LICENSE.
Metadata
Release files for endoxa 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| endoxa-0.10.0.tar.gz | 35.8 kB | Without provenance | Details for endoxa-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| endoxa-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for endoxa-0.10.0-py3-none-any.whl |
Total release size: 81.5 kB
Release files / endoxa-0.10.0.tar.gz
| Download URL | endoxa-0.10.0.tar.gz |
|---|---|
| Size | 35.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0409b6c9495525108014bd1371c3ef27071abf8da1e72652dafa390a81550fbc
|
|
BLAKE2b-256 checksum How to use checksums |
7a0b4166acb638c363099002f3df0004c45d472355328ff67d214d13b857617f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / endoxa-0.10.0-py3-none-any.whl
| Download URL | endoxa-0.10.0-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5cfd55988d9a9424c7a3941a46c44792d933bf3362b27346d3239e52c7b2550
|
|
BLAKE2b-256 checksum How to use checksums |
9d39c9068d8833627625467f2d2cd394f1f2be5c494729f06e8238e4236481f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for endoxa 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.