lexprotocol
Cryptographic attestation and reputation infrastructure for AI agents.
Every action your agent takes gets a signed, timestamped, immutable record — giving it a verifiable trust score (LEX Score, 0–100) any third party can audit, without needing access to your systems.
Install
pip install lexprotocol
Zero required dependencies (falls back to stdlib urllib if requests/httpx aren't installed).
Usage
Decorator — wrap any function, transparent, silent by default:
from lexprotocol import attest
@attest
def classify_document(text: str) -> str:
return model.classify(text)
Manual one-liner:
from lexprotocol import record
record("route_customer_query", result="transferred_to_billing", agent="my-agent")
LangChain — 2-line drop-in:
from lexprotocol.integrations.langchain import LexCallbackHandler
llm = ChatOpenAI(callbacks=[LexCallbackHandler()])
Check your agent's reputation:
import lexprotocol
lexprotocol.configure(agent_name="my-classifier")
rep = lexprotocol.reputation()
print(rep.trust_score, rep.leaderboard_rank)
Links
- Docs: https://thelexprotocol.com
- API: https://lexprotocol.fly.dev/docs
- Leaderboard: https://thelexprotocol.com/leaderboard
License
MIT
Metadata
Release files for lexprotocol 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lexprotocol-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for lexprotocol-2.0.0-py3-none-any.whl |
Release files / lexprotocol-2.0.0-py3-none-any.whl
| Download URL | lexprotocol-2.0.0-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de951907f7d79143c321be31c8d50662918121c68b46659d7022dd1337b084be
|
|
BLAKE2b-256 checksum How to use checksums |
4459eb176d3b31894834a85a922e2785c384b61b2e43aca958205e6c4afb31f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for lexprotocol 2.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.