endoxa
Governed beliefs for agents. An append-only ledger, SMT-checked consistency, defeasible revision, and calibration instruments — a layer you give an agent, not a framework you build one inside.
Status: pre-alpha. The library was extracted whole from the research system it grew in, where it has run for months. Versions before 1.0 may move the public API: what is shown below is where the extraction landed, not a promise.
The problem
An LLM agent will tell you Socrates is mortal, and twenty turns later that he is immortal, and never notice. It has no place to put a claim other than its own context, no way to check a new claim against the ones it already made, and no record of why it believes any of them. Asking it to be consistent is asking the thing that lost track to keep track.
endoxa is the place to put them.
What it does
- Checks. Beliefs and the rules they live under go to a bundled SMT solver, which answers satisfiable, unsatisfiable, or unknown when its deliberation budget runs out — a real answer, not a failure.
- Decides. On a conflict it finds what is actually to blame and orders the candidates by how readily each may be given up. A rule the agent learned may be retracted; a rule it was given may not.
- Holds. When two beliefs are equally credible, the conflict cannot be settled from the inside. That is a state with a name, not a coin flip.
- Records. Every operation is an entry in an append-only ledger. A retracted belief keeps its row and stops counting, so the history of what the agent believed survives the change.
- Measures. Whether the agent's confidence matched its accuracy, over what it claims to know, what it claims to be able to do, and when it chooses to ask.
Example
from endoxa.governance import Belief, Constraints, Rule, govern
constraints = Constraints(
rules=(
Rule(
name="mortality",
axiom="fof(m, axiom, ![X]: (human(X) => mortal(X))).",
confidence=0.9,
),
),
)
beliefs = [
Belief(target="human(socrates)", truth_value=True, confidence=1.0, context="user"),
Belief(target="mortal(socrates)", truth_value=False, confidence=0.6, context="agent"),
]
outcome = govern(beliefs, constraints)
outcome.consistent # False
# The operations to perform, in order: here, retracting the 0.6-confidence
# claim -- not the rule, and not the one the user asserted.
outcome.ops
govern decides; it does not mutate. The operations it returns are what you
append to the ledger and apply to your own store.
Three runnable scripts go further — what happens over a run of turns, what a conflict that cannot be settled looks like, and what the instruments report. See examples/.
Install
Requires Python 3.14 or newer. That floor is real rather than cautious: the
package is written in 3.14 syntax and will not parse on an older interpreter. If
pip declines to install this, that is why.
pip install endoxa
The core takes one dependency. Two packages need more and are opt-in:
pip install "endoxa[trace]" # the ordered series of an agent's propositions
pip install "endoxa[coverage]" # how densely rules connect predicates
Design notes
- The solver is bundled and frozen. endoxa answers about consistency without
reaching for an external prover. Its verdicts are checked against Z3's over
generated formulas in two fragments — propositional, and equality with
uninterpreted functions — chosen because both solvers are complete on them, so
a disagreement is a bug rather than an artefact of one giving up first.
Quantifier instantiation sits outside that on purpose: it is anytime, and
answers
UNKNOWNwhen its budget runs out, which is a correct answer and not one a verdict comparison can score. That part has ordinary tests instead. The differential needs Z3, which is a dev dependency and is not shipped. - The ledger is the record, not a cache. Operations are appended; the current
view is folded from them. An unsettleable conflict appears in that view as
UNRESOLVEDrather than as a silent choice. - Instruments are imported by nothing else. A measure its subject can reach is a measure its subject can move, so the dependency is forbidden by contract and checked in CI.
- One name catches everything this raises.
endoxa.errors.EndoxaErroris the base of every error the library raises on its own behalf, and no dependency's exceptions reach past the boundary — a malformed rule is aRuleSyntaxError, not the grammar library's business. Each class is also the built-in you would have reached for anyway, soexcept ValueErrorkeeps working. - Requires Python 3.14+.
Issues
Issues are open and they are read. What is not offered is a response time: this is one person's pre-alpha library, so a report may sit for a while and a pull request may sit longer. Filing one is still the best way to move something up the list — what is reported is what gets looked at first.
Security reports go through private advisories rather than public issues. See SECURITY.md.
License
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file endoxa-0.4.0.tar.gz.
File metadata
- Download URL: endoxa-0.4.0.tar.gz
- Upload date:
- Size: 89.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b795a143678f87afecdc262d90940fba0d9568091fc791d37cf1d5a456a3c67d
|
|
| MD5 |
5d432d84ffffa82abd5d3403e1197570
|
|
| BLAKE2b-256 |
62279962cdf0ee484bf3a7e25902ee7cf78e97081a46401cad908f9e99160a39
|
Provenance
The following attestation bundles were made for endoxa-0.4.0.tar.gz:
Publisher:
release.yml on noise01/endoxa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
endoxa-0.4.0.tar.gz -
Subject digest:
b795a143678f87afecdc262d90940fba0d9568091fc791d37cf1d5a456a3c67d - Sigstore transparency entry: 2570486903
- Sigstore integration time:
-
Permalink:
noise01/endoxa@63b6b06319135c45a32fe97ea1fc0ce800344afc -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/noise01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@63b6b06319135c45a32fe97ea1fc0ce800344afc -
Trigger Event:
push
-
Statement type:
File details
Details for the file endoxa-0.4.0-py3-none-any.whl.
File metadata
- Download URL: endoxa-0.4.0-py3-none-any.whl
- Upload date:
- Size: 112.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
033c4e1329e9004ff808b4713bbdb4bd175aa0cd1cd192bc522c853a83f1817e
|
|
| MD5 |
c2442f0a5a4d466da0dd410812eba150
|
|
| BLAKE2b-256 |
462a46aa0bdd9efc4ea48a3afff731b07be578aca99ace787b9efa70bcb283c6
|
Provenance
The following attestation bundles were made for endoxa-0.4.0-py3-none-any.whl:
Publisher:
release.yml on noise01/endoxa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
endoxa-0.4.0-py3-none-any.whl -
Subject digest:
033c4e1329e9004ff808b4713bbdb4bd175aa0cd1cd192bc522c853a83f1817e - Sigstore transparency entry: 2570486912
- Sigstore integration time:
-
Permalink:
noise01/endoxa@63b6b06319135c45a32fe97ea1fc0ce800344afc -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/noise01
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@63b6b06319135c45a32fe97ea1fc0ce800344afc -
Trigger Event:
push
-
Statement type: