This release is a pre-release and may not be stable for production use.
annpack
Python binding for the ANNPack reference runtime.
ANNPack compiles a documentation tree into a single immutable, content-addressed artifact and issues offline-verifiable evidence for every passage it returns. A third party can check that a cited passage existed unmodified in a named artifact at a named source revision — without the artifact, without network access, and without trusting the service that produced the citation.
Relationship to versions below 0.5
Releases in the 0.1.x line published a different system: an approximate
nearest-neighbour index built on FAISS, searched in the browser through a WASM
runtime. That architecture is not carried forward. The current line is a Rust
implementation of the ANNPack v3 container format, exact BM25 retrieval with
normative tokenization, and the EVIDENCE-v1 receipt chain. The format, the CLI
surface, and the artifact bytes all differ. 0.1.x artifacts cannot be read by
this runtime, and no migration path exists between them.
Requirements
The binding drives the annpack binary as a subprocess; it does not parse
artifact bytes in Python. Untrusted input is handled entirely by the Rust
runtime.
Install the binary from the project's releases, then either place it on PATH,
set ANNPACK_BINARY, or pass binary= to the client.
Usage
from annpack import Client
client = Client()
report = client.build("docs/", "knowledge.annpack", name="vendor-docs", version="1.0.0")
print(report["root_hash"])
results = client.search("knowledge.annpack", "rotate the signing key", limit=5)
for hit in results["results"]:
print(hit["score"], hit["citation"]["canonical_url"])
Retrieval evidence
A run bundle collects one agent run's retrieval evidence into a single portable file: a standalone receipt per retrieved passage, plus the metadata needed to locate the run in an application's own logs.
bundle = client.bundle(
"knowledge.annpack",
"rotate the signing key",
"run.json",
limit=5,
application="support-agent/2.1",
model="claude-opus-5",
)
report = client.verify_run("run.json")
assert report["attested"]
print(report["pack_roots"], report["source_revisions"])
attested means every receipt proved its passage existed unmodified in the
named artifact. The query, application, model, and answer travel with the
receipts and are attested by nothing — the report keeps the two separate.
OpenTelemetry attributes
telemetry() returns span and event attributes that bind a retrieval to the
immutable artifact it read, so a trace remains checkable after the corpus moves.
attributes = client.telemetry("knowledge.annpack", "rotate the signing key")
span = attributes["span"] # annpack.root, annpack.pack, annpack.source_revision, ...
Verification without this package
Receipt verification is implemented independently in Rust, Python, and JavaScript, and all three are held to the same conformance suite. Verifying a receipt does not require this binding, the artifact, or network access.
License
Apache-2.0.
Metadata
Release files for annpack 0.7.0rc2
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 |
|---|---|---|---|---|
| annpack-0.7.0rc2.tar.gz | 6.7 kB | With provenance | Details for annpack-0.7.0rc2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| annpack-0.7.0rc2-py3-none-any.whl | Python 3 | none | any | Details for annpack-0.7.0rc2-py3-none-any.whl |
Total release size: 11.4 kB
Release files / annpack-0.7.0rc2.tar.gz
| Download URL | annpack-0.7.0rc2.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d4d01cd281a8278d7f330335f980b838728e21d72de0520a83505202930103b
|
|
BLAKE2b-256 checksum How to use checksums |
d26b9aac9076566745bad1562a98ecba95bcd49e3844c738b9ac7dce460e6577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Aug 12, 2026.
Transparency logRelease files / annpack-0.7.0rc2-py3-none-any.whl
| Download URL | annpack-0.7.0rc2-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c3cf182b6224525422bcb04d9dab1558baa054f8fc1dd4c36bd4fbb74c0aceb
|
|
BLAKE2b-256 checksum How to use checksums |
7f9dee9b1b4bb5b5e97a8d4a588ebd1092944d93b479d597b5e64cc93db25691
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Aug 12, 2026.
Transparency logSecurity for annpack 0.7.0rc2
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 annpack-0.7.0rc2.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 Aug 12, 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.