Metadata-Version: 2.4
Name: lexprotocol
Version: 2.0.0
Summary: Cryptographic attestation and reputation infrastructure for AI agents
Author-email: LexProtocol <chase@thelexprotocol.com>
License: MIT
Project-URL: Homepage, https://thelexprotocol.com
Project-URL: Documentation, https://lexprotocol.fly.dev/docs
Project-URL: Repository, https://github.com/lexprotocol/lexprotocol-py
Project-URL: Bug Tracker, https://github.com/lexprotocol/lexprotocol-py/issues
Keywords: attestation,reputation,agents,ai,trust-score,langchain,crewai,autogen,langgraph,audit-trail
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: requests
Requires-Dist: requests>=2.28; extra == "requests"
Provides-Extra: httpx
Requires-Dist: httpx>=0.24; extra == "httpx"

# 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

```bash
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:**

```python
from lexprotocol import attest

@attest
def classify_document(text: str) -> str:
    return model.classify(text)
```

**Manual one-liner:**

```python
from lexprotocol import record

record("route_customer_query", result="transferred_to_billing", agent="my-agent")
```

**LangChain — 2-line drop-in:**

```python
from lexprotocol.integrations.langchain import LexCallbackHandler

llm = ChatOpenAI(callbacks=[LexCallbackHandler()])
```

**Check your agent's reputation:**

```python
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
