Sheldon
Local evidence in. Source-grounded context out.
Sheldon is a local-first context compiler for small language models. It turns Markdown, text, LaTeX, PDF, and structured records into compact context packets with visible citations, temporal state, conflict warnings, and a generation gate.
Sheldon does not hide a hosted model behind the package. Core ingestion, retrieval, state resolution, packet compilation, bundle verification, and the HTTP API run locally. Model calls are explicit and optional.
Install
python -m pip install sheldon-context
The distribution is named sheldon-context because the older sheldon name on
PyPI belongs to an unrelated project. The command is simply sheldon, and the
Python import is sheldon_context.
Five-minute path
Create a note:
# Release state
Current release: 2.4.
The 2.3 line is supported for security fixes only.
Then compile it:
sheldon --db /tmp/sheldon.db ingest release.md
sheldon --db /tmp/sheldon.db query "Which release is current?"
The packet includes the selected evidence and citations. With --json, inspect
generation_gate.status before calling a model:
ready: the cited sources and packet fingerprint are current.caution: generation is allowed, but a warning must be preserved.blocked: source drift or an unresolved integrity issue must be repaired.
Python
from pathlib import Path
from sheldon_context import LocalContextEngine
engine = LocalContextEngine(Path(".sheldon-context/context.db"))
try:
engine.ingest_text(
"Current release: 2.4. The 2.3 line gets security fixes only.",
source="release-note",
title="Release state",
)
result = engine.query("Which release is current?", token_budget=600)
print(result["packet"])
print(result["generation_gate"])
finally:
engine.close()
What the compiler owns
local sources
-> typed evidence and temporal state
-> retrieval and conflict resolution
-> budgeted, cited context packet
-> generation gate and replayable bundle
-> your local or self-hosted model
This boundary matters. Evidence can be present while a model still omits, misreads, or mixes it. Sheldon makes the pre-generation evidence path explicit and keeps generated answers separate from deterministic context artifacts.
Useful commands
sheldon --help
sheldon ingest --help
sheldon query --help
sheldon compile-context --help
sheldon bundle --help
sheldon verify-bundle --help
sheldon serve --help
The complete research and evaluation surface remains available under:
sheldon research --help
Optional local backends
python -m pip install "sheldon-context[lsa]"
python -m pip install "sheldon-context[embeddings]"
python -m pip install "sheldon-context[pdf]"
python -m pip install "sheldon-context[mlx]"
The dependency-free hashed and TF-IDF retrieval paths remain available without those extras. Sentence-transformer and MLX weights are never bundled into this package.
Research boundary
Sheldon is alpha research software. The repository includes frozen positive, mixed, and negative studies. Package verification proves artifact integrity and installability; it does not turn every experimental method into a confirmed accuracy improvement.
The current supported mechanism claim is narrow: reader adaptation and fixed demonstrations can improve how a local model uses supplied evidence. A universal context-rendering advantage, robust multi-source execution, and reliable abstention have not been established.
Links
MIT licensed. Built by Om Bhojane.
Metadata
Release files for sheldon-context 0.1.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 | |
|---|---|---|---|---|
| sheldon_context-0.1.0.tar.gz | 730.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sheldon_context-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / sheldon_context-0.1.0.tar.gz
| Download URL | sheldon_context-0.1.0.tar.gz |
|---|---|
| Size | 730.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab5384afea852c926e936c181605eb15d5051e7631747aa345c8a81518a039d0
|
|
BLAKE2b-256 checksum How to use checksums |
22bbb71136c2685d7b567c80b79a6ec7695c069a40abe7eb43051e583cf4e443
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logRelease files / sheldon_context-0.1.0-py3-none-any.whl
| Download URL | sheldon_context-0.1.0-py3-none-any.whl |
|---|---|
| Size | 761.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e91da77924e7fe297e91e0c9de62e6319b35fbb22a4a2a6969dfdf379a473e37
|
|
BLAKE2b-256 checksum How to use checksums |
460614cdb1254a57bb0d5a6707bf8bb4df52aac324530ccfb96d584964a887c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 5, 2026.
Transparency logSecurity for sheldon-context 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sheldon_context-0.1.0.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 Sep 5, 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.