Skip to main content

algovoi-keystone-langchain

Carry an AlgoVoi keystone decision into a LangChain run trace. The decision's content-addressed execution_ref rides along as run metadata and a tag, under the vendor namespace algovoi.keystone.* (never inside a LangChain reserved field). Anyone reading the trace recomputes execution_ref from the run metadata alone with only JCS (RFC 8785) and SHA-256, and confirms the agent's recorded action is consistent with the decision that authorized it. The reference is bound to the decision, not merely correlated with a run.

from algovoi_keystone_langchain import keystone_config, verify_trace_execution_ref

# attach the keystone reference to a LangChain run
result = chain.invoke(
    user_input,
    config=keystone_config(
        decision_ref="sha256:2a444c62...",   # the pre-payment decision (from the keystone)
        action_type="payment", scope="bilateral",
        outcome="COMMITTED", executed_at_ms=1716460800000,
    ),
)

The run's metadata now carries algovoi.keystone.execution_ref and the keystone preimage fields, so LangSmith (or any tracer) shows a recomputable reference. Verify it offline from the metadata:

verify_trace_execution_ref(run.metadata)   # True iff execution_ref recomputes

keystone_trace_metadata(...) returns the framework-neutral attribute dict if you want to attach it yourself; make_callback_handler(...) builds a LangChain callback handler (needs the langchain extra) carrying the same metadata. Python and TypeScript (@algovoi/keystone-langchain) produce the same execution_ref byte for byte. Apache-2.0.

Metadata

Release files for algovoi-keystone-langchain 0.1.0

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

Source distribution (sdist)

Source distribution for algovoi-keystone-langchain 0.1.0
File Size Uploaded Provenance
algovoi_keystone_langchain-0.1.0.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for algovoi-keystone-langchain 0.1.0
File Interpreter ABI Platform
algovoi_keystone_langchain-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / algovoi_keystone_langchain-0.1.0.tar.gz

Download URL algovoi_keystone_langchain-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
653ded7481018ad1772f7c09d19029c9b7e3699e0c7a842864b613fcb0f7104a
BLAKE2b-256 checksum
How to use checksums
94b7ffb7be4c54e63a71ea10f57eec45cc723ebbcf9300dbca3612b5172d1303
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / algovoi_keystone_langchain-0.1.0-py3-none-any.whl

Download URL algovoi_keystone_langchain-0.1.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01e10e2851349528c79e2335bd4ee09d6e34b54c8c48d5f61b214919fe782dff
BLAKE2b-256 checksum
How to use checksums
66381f2736ae9ac5a777d9c4610843498418b9571d1f542f1aaee63c32c8c9d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for algovoi-keystone-langchain 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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