Skip to main content

sagrada-engine

A deterministic belief-revision operator for AI agents. Every change to what an agent believes — assert, revise, retract, merge, split — goes through one operator that records it in a hash-chained, replayable log. The model proposes; the operator writes; the record replays — so what was believed, and when, is something you recompute rather than something you are told.

No network, no telemetry, no model calls. The wheel is a single compiled extension (Rust core, PyO3 binding) with zero Python dependencies.

pip install sagrada-engine

Sixty seconds

>>> import sagrada
>>> state = sagrada.PyKnowledgeState()
>>> state = state.apply_assert("deploy-rule", "production deploys require two approvals")
>>> state = state.apply_retract("deploy-rule")
>>> state = state.apply_assert("deploy-rule", "production deploys require one approval")

>>> [(h['operation_type'], h['definition']) for h in state.concept_history('deploy-rule')]
[('assert', 'production deploys require two approvals'), ('retract', None), ('assert', 'production deploys require one approval')]

>>> state.verify_chain()
True

The rule was asserted, retracted, and quietly replaced with a weaker one. The history shows all three events — including the retraction — and the chain verifies. A memory that only stored the current value would show one clean assert of the weaker rule, with no sign a stricter policy had ever existed.

What it guarantees

  • Deterministic, canonical state. States serialize to a canonical byte form and hash with SHA-256. Determinism is over the record, not the call: hand the same record log to any wheel in this release and the state hash comes back byte-identical. Measured on all four shipped platforms — Linux x86_64, Linux aarch64, macOS arm64, macOS x86_64 — by replaying one log emitted on another; the empty state is 01ea42171f2295cbb54a24c017724becb37a712b2fcd5b9f525d1e9ea045650a on each. Re-running the same apply_* calls does not reproduce a hash, and shouldn't: each write mints a fresh concept id and timestamp, so it is a genuinely different history. 0.3.0 ships no Windows wheels.
  • Hash-chained history. Each operation appends a record chained by SHA-256. verify_chain() recomputes the chain: tampering with any record, or its order, fails it. reconstruct() goes further and replays the operations, checking that the records still produce the state they claim to.
  • Revision with postulates. The nine operations (assert, refine, revise, retract, relate, restructure, merge, split, reinforce) are classified against AGM-style belief-revision postulates; every record carries its classification, and agm_report() re-derives it for any transition. Write-time invariants — closure, status, finiteness — are enforced and refused at the boundary. The postulates themselves are reported, not enforced: read the report; silence is not compliance.
  • Temporal queries. state_at(n), per-term history, range diffs, and provenance (W3C PROV) export — questions a current-state snapshot cannot answer.

Immutability is the API: every apply_* returns a new state; the old one is untouched.

What the record does and does not establish

Replay a record log and you recompute the same state hash, so an edit to any record — or to their order — shows up. That is tamper-evidence, and it is not authorship: the chain is unsigned, so a party who rewrites the whole log and recomputes every hash produces a chain that verifies. Binding a record to a signer is what ER1 receipts are for.

And today this operator is the only implementation, so "recompute" means running this wheel. A published canonical-form spec — so anyone can write a verifier in any language, against golden vectors, the way er1-verify already works — is what this package owes you next. Until it exists, verification is reproducible but not yet independent, and you should read the claim above with that scope.

What it is not

It is not a database, a vector store, or an LLM framework. It is the small deterministic organ those systems lack: the one place writes go, so that reads can be trusted. Pair it with any model, any retrieval stack, any framework.

Part of Sagrada

The Sagrada system, published by Cruxia Labs:

  • er1-verify — offline verifier for ER1 action receipts; three conformant implementations on disjoint stacks (Python, Node, browser WebCrypto).
  • sagrada-mcp — MCP server that mounts this operator as governed agent memory.
  • sagrada-linter — coherence linter for prompts and agent transcripts.

License: Apache-2.0.

Metadata

Release files for sagrada-engine 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sagrada-engine 0.3.0
File
sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
sagrada_engine-0.3.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
sagrada_engine-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
sagrada_engine-0.3.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
sagrada_engine-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
sagrada_engine-0.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
sagrada_engine-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
sagrada_engine-0.3.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
sagrada_engine-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 13.5 MB

Release files / sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 895.0 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0cf51585d19026f919c3ffb991d876c3f035bef4a2fcde8b103101bf8f450814
BLAKE2b-256 checksum
How to use checksums
e25722c383e822e0d72176196243213d6f194209774b4aa4c6aa9bc857f7d346
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL sagrada_engine-0.3.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 845.3 kB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
7d1c2e28b04c2b2d23a6abf2c0fdeef9af3daa8b8237224f3c2de5fdf748399d
BLAKE2b-256 checksum
How to use checksums
194789b62fa1d0402a4b668985c7746364273cd5f7ddf57295790b4b5d65fc05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL sagrada_engine-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Size 786.6 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
35fa4ba6a170a55e873bc175206e357403344ac44883464e90d2be680e6689f9
BLAKE2b-256 checksum
How to use checksums
ad02e1567b78cc56c21c6366bf7e1ff2dd53a3cae2da3d390b412cfd1c7d3e61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL sagrada_engine-0.3.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 839.3 kB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0b5252e3c7388a927b79cd893d1e61da7fd9ba9a194c46d32b11526e06c17d4d
BLAKE2b-256 checksum
How to use checksums
16d3425b1e68b1650e87f44bb24699f09aed6a77b4b6ae1f69a65f231afb1aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 896.1 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e9cf03b6e06d11f1bb8b0bc02294559cdc9cc5531659df2a1881a736a4321769
BLAKE2b-256 checksum
How to use checksums
e4b9b2cb6ce694076f8e6b093c90b3ca6abe7d421bdf28226347e197af5f0e00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL sagrada_engine-0.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 845.9 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
8bb58fba0ed66f0935bb39d26f6fa2f7b0dbe8f45ff087a2b158d9d35c690e99
BLAKE2b-256 checksum
How to use checksums
c00d66964a249bcafa47ba501debe20156684f40c5bde3ef8b1a38e9857118ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL sagrada_engine-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Size 787.1 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f427495f2ecdb384c2c2e43fc53eb077e43c238ef60193b9d6f62f139a4f515b
BLAKE2b-256 checksum
How to use checksums
117e33c51b4f510f10756db5e5515609cdd235420b1f86ceb7079914eecbb5c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL sagrada_engine-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 839.6 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
deccc0b3d910ebb9c7b60f2c0db0c13bcd5d7187b2d3474b0e1d223f195a0b92
BLAKE2b-256 checksum
How to use checksums
23d9ed8bb87b9fb6c34621af88ddf06eaa6c61c398a903aae8add4172ff5d1b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 896.6 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
041a2c405df3ae5a99f36218869928efdb948e3ffbde6976b2a05bbef47d71f3
BLAKE2b-256 checksum
How to use checksums
1b9839d2aaa32f840e4af985133167a88d71a18a472933b73b9bb672f2e29851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL sagrada_engine-0.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 846.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
2a02c25f05b458222ae9eec9a18c6a524dbc3f0cc8cb66f11ffe9ef954ae2873
BLAKE2b-256 checksum
How to use checksums
975922be50dd7689e9df3ad76883195c51fd4c13ac0d6c2a774a6f1f139cd332
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL sagrada_engine-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 789.7 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f28c28fe163a6aa366a05caca4a2383564091b3fb3ac632692fe735539b091ca
BLAKE2b-256 checksum
How to use checksums
003920ef998f2adb0b252ca62b5e25687db60eb2727c1cda53a278e5ee9ce68f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL sagrada_engine-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 841.7 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c74bf5156c5f619a9396929027a551765361b109ad753a6158f29fdd718b3332
BLAKE2b-256 checksum
How to use checksums
beed2ef97700213d45b27f1ab5ffc5c06d22685ef039d52901c69590125cf614
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 896.6 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
0ee04158bbc7aba39fcb47fe25965d5313004092e3ee3a62b0db2c4adefe1e9b
BLAKE2b-256 checksum
How to use checksums
edf6881307ddb5b5e8331526984d7b2612a9ac2ca7a1bc5ab0fdc61d620e81a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL sagrada_engine-0.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 846.6 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
c33be2394f9b297fa513097cb8f58aa62589249bde5ed4a92d74e5f6568dd1bf
BLAKE2b-256 checksum
How to use checksums
5ee5808e2beadcf170baf54998a0b4704d72daed88340e9b4be2de9f67f25cd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL sagrada_engine-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Size 789.8 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a2471a1f9568a9f6efe3d43ae61b08567ec8cdcd389fdec5c4a9b06b9502334c
BLAKE2b-256 checksum
How to use checksums
2a4620c514794032d50b696b879af48572affe6c4068529a2da1212c3c1dd879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release files / sagrada_engine-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL sagrada_engine-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 841.6 kB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
42e1396fc2fb97a20344c0264ec82f6441f28d8a659b16b832471f932c95774b
BLAKE2b-256 checksum
How to use checksums
421ebec12122b097b0a680287cd54a26dffbd5fa879b74c6f8854955c5aa2243
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.3.0 This release

16 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page