Engrammic Primitives
The schema library for Engrammic, a structured memory system for AI agents.
Most AI agents treat context like a scratchpad. Engrammic treats it like cognition: observations become claims, claims become facts, facts become beliefs. This library defines the types and rules that make that work.
Library for integrators. If you just want to use Engrammic memory in your agent, see engrammic-mcp for the hosted service or engrammic to self-host.
Install
pip install engrammic-primitives
What's Inside
Schema types for four cognitive layers:
| Layer | What it holds | Example |
|---|---|---|
| Memory | Raw observations | "User mentioned they prefer dark mode" |
| Knowledge | Claims with evidence | "User prefers dark mode" (based on 3 mentions) |
| Wisdom | Synthesized beliefs | "Optimize for low-light viewing in this user's sessions" |
| Intelligence | Reasoning chains | Step-by-step derivation of a conclusion |
Scoring functions for promotion decisions:
from primitives.eag import combined_confidence, should_promote_r1
# When should a claim become a fact?
decision = should_promote_r1(confidence=0.8, corroboration_count=3)
Transition predicates for enforcing layer rules (e.g., Knowledge requires evidence).
Protocols for storage backends (implement these to build your own store).
When to Use This
You're building something that stores and retrieves structured agent context, and you want compatibility with the Engrammic ecosystem.
If you just want to use Engrammic:
- engrammic-mcp for the hosted service
- engrammic to self-host
Modules
| Module | Purpose |
|---|---|
primitives.schema |
Node and edge type definitions |
primitives.eag |
Confidence, promotion, decay logic |
primitives.eag.transitions |
Layer transition predicates and constraints |
primitives.protocols |
Storage and lifecycle interfaces |
primitives.scoring |
Freshness and relevance formulas |
Learn More
- LeAP Paradigm for the full cognitive architecture spec
License
Apache 2.0
Metadata
Release files for engrammic-primitives 0.2.4
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 |
|---|---|---|---|---|
| engrammic_primitives-0.2.4.tar.gz | 67.7 kB | With provenance | Details for engrammic_primitives-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| engrammic_primitives-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for engrammic_primitives-0.2.4-py3-none-any.whl |
Total release size: 106.3 kB
Release files / engrammic_primitives-0.2.4.tar.gz
| Download URL | engrammic_primitives-0.2.4.tar.gz |
|---|---|
| Size | 67.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
977b8a320b10e3f77bf8adf938d062e081cc2508a63b330a207adc8f7047e6fa
|
|
BLAKE2b-256 checksum How to use checksums |
511190e7d82c76566b2198b7ead87f8b0a4064d01cad2b7423b42545a6f3e56e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 28, 2026.
Transparency logRelease files / engrammic_primitives-0.2.4-py3-none-any.whl
| Download URL | engrammic_primitives-0.2.4-py3-none-any.whl |
|---|---|
| Size | 38.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d87b2772f77069d6c32e7d6dd212ebec9ae74fe038157669b590e2fbbb201fa3
|
|
BLAKE2b-256 checksum How to use checksums |
512b1e63a9bbd54b8b8be53160e400a1e0db0c37a11e92b54d6842ca6ef2b838
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 28, 2026.
Transparency logSecurity for engrammic-primitives 0.2.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for engrammic_primitives-0.2.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 28, 2026.
Transparency logA 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.