langchain-nti
Full 5-pillar post-quantum security for LangChain agents, powered by NTI (Neutral Trust Infrastructure).
Install
pip install langchain-nti
Quick Start
from langchain.agents import AgentExecutor from langchain_nti import NTICallbackHandler
Attach NTI to any LangChain agent
handler = NTICallbackHandler(agent_id="finance_agent") handler.grant_capability("execute_transfer")
executor = AgentExecutor( agent=agent, tools=tools, callbacks=[handler], )
Every tool call is now cryptographically verified before execution.
What It Enforces — All 5 Pillars of NTI
| Pillar | What It Does |
|---|---|
| 1. Zero-Trust Capability Enforcement | Agents have zero inherent permissions. Every action requires an explicit capability grant, evaluated in real-time with caveats (Expires, MaxExecutions, ValueLimit, PathRestricted). |
| 2. NIST Post-Quantum Cryptography | Every request is signed with CRYSTALS-Dilithium5 (NIST Level 5). Envelope encryption uses CRYSTALS-Kyber1024 + ChaCha20Poly1305. |
| 3. BFT Multi-Agent Consensus | Multi-agent decisions require threshold signature collection. Prevents single-agent prompt injection and rogue agent behavior. |
| 4. Merkle-Chained Audit Trails | Every evaluated action is hashed into a SHA-256 Merkle audit chain. Tamper-proof compliance logs, verifiable via verify_history(). |
| 5. P2P Agent Mesh & State Persistence | Cryptographic agent identity, key rotation, and X25519 DH handshakes. Audit trails persist to disk and self-verify on reload. |
BFT Consensus Example
handler.register_voter_key("voter_01", voter_public_key_bytes) handler.register_voter_key("voter_02", voter_public_key_bytes)
Multi-agent consensus enforced automatically on evaluation.
Why NTI
Autonomous LLM agents are prone to prompt injection, hallucinated function calls, and unconstrained action execution. NTI provides a cryptographically verifiable execution barrier in <1ms overhead, ensuring agents cannot execute unauthorized actions even if compromised at the prompt level.
License
PolyForm Shield License 1.0.0. Source-available. Free for all non-competing use. See LICENSE.
Links
- Core SDK (PyPI): https://pypi.org/project/ube-foundation/
- Core SDK (crates.io): https://crates.io/crates/ube-foundation
- Homepage: https://abisheakp197.github.io/Neutral-Trust-Infrastructure/
- Whitepaper: ./WHITEPAPER.md
Metadata
Release files for langchain-nti 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_nti-0.1.1.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_nti-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / langchain_nti-0.1.1.tar.gz
| Download URL | langchain_nti-0.1.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4640ed994e974c9a07d7e9c834d48150c4eb4a58dedfb9fbc7c68c8aaaba8ee7
|
|
BLAKE2b-256 checksum How to use checksums |
2d256355cc247da4b10a9220f63a7c018fd18ba210211721673f191efb0fdeab
|
| 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 Oct 4, 2026.
Transparency logRelease files / langchain_nti-0.1.1-py3-none-any.whl
| Download URL | langchain_nti-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
391c9feb6e6017f457c99c7475a2646808bcea0938fa9369f43894cf44e0a3ce
|
|
BLAKE2b-256 checksum How to use checksums |
317a0d29d2f0bd93ba5afaca908ec1d0df1ee89d32645ab27f83fc125ede9f24
|
| 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 Oct 4, 2026.
Transparency log