Metadata-Version: 2.1
Name: tbn-protocol
Version: 0.1.6
Summary: TBN Protocol — Trust infrastructure for AI agents. Think HTTPS for bots.
Home-page: https://tbn.hardinai.co.uk
Author: Burhan Yanbolu
Author-email: burhan@hardinai.co.uk
License: AGPL-3.0
Project-URL: Repository, https://github.com/burhanyanbolu-design/tbn-protocol
Project-URL: Documentation, https://tbn.hardinai.co.uk/architecture
Keywords: ai,agents,trust,governance,cryptography,verification
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests (>=2.28.0)

# TBN Protocol

Trust infrastructure for AI agents. Think HTTPS for bots.

Every consequential action your AI agent takes gets a cryptographic receipt —
RSA-PSS-SHA256 signed, hash-chained, independently verifiable by anyone without
server access or trust in us. The design rule: **no receipt, no effect.**

## Install

```bash
pip install tbn-protocol
```

## Quick Start

```python
from tbn import TBNClient

# 1. Get a trial API key (instant, self-service, 7 days / 100 calls per day)
client = TBNClient("MyBot", "SEARCH")
result = client.register(company="My Company", email="dev@mycompany.com")
print(result["api_key"])  # Save this — shown only once

# 2. Verify any agent's certification (no key needed)
status = client.verify_public("tbn-bot-a1cc0d69")
print(status["certification_status"])  # VALID / REVOKED / UNKNOWN

# 3. Independently verify a signed governance record (no key needed)
proof = client.verify_record("tbn_gar_1129396b50ad44065b2b2461cc885b7c")
assert proof["verified"] == True  # hash recomputed + signature checked

# 4. Search (requires your API key)
results = client.search("Find trusted AI tools for small businesses")
```

## If you already have a key

```python
client = TBNClient("MyBot", api_key="tbn_live_...")
results = client.search("Find AI compliance tools")
```

## Zero-Trust Verification

You can verify records without any API key — the verification endpoint
recomputes the hash and checks the signature, returning `verified: true`
only if both pass. You're not trusting our word; you're recomputing it.

```python
# Get TBN's public key for offline verification
key = client.get_public_key()
print(key["public_key_pem"])
print(key["algorithm"])  # RSA-PSS with SHA-256
```

## Live Endpoints (no key)

- Architecture: https://tbn.hardinai.co.uk/architecture
- Governance dashboard: https://tbn.hardinai.co.uk/governance
- Verify a record: https://tbn.hardinai.co.uk/api/gar/verify/{record_id}
- Public key: https://tbn.hardinai.co.uk/api/signing/public-key
- Pricing: https://tbn.hardinai.co.uk/api/access/plans

## License

AGPL-3.0. Commercial licensing available — contact burhan@hardinai.co.uk.

## Links

- **Live**: https://tbn.hardinai.co.uk
- **Source**: https://github.com/burhanyanbolu-design/tbn-protocol
- **PyPI**: https://pypi.org/project/tbn-protocol/


