Metadata-Version: 2.4
Name: nexus6
Version: 0.1.0
Summary: Nexus6 AI Identity SDK — universal identity verification for AI agents
Author: Nexus6
License: MIT
Project-URL: Homepage, https://github.com/Marsssssssssssdsss/nexus6-sdk
Project-URL: Documentation, https://nexus-7xp6n.ondigitalocean.app
Project-URL: Source, https://github.com/Marsssssssssssdsss/nexus6-sdk
Keywords: ai,identity,verification,authentication,agent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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 :: Python Modules
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24.0
Requires-Dist: starlette>=0.27.0

# Nexus6 Python SDK

Universal AI identity verification in 3 lines of code.

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Installation

```bash
pip install git+https://github.com/Marsssssssssssdsss/nexus6-sdk.git#subdirectory=python
```

## Quick Start

### For AI Agents

```python
from nexus6 import Nexus6Client

client = Nexus6Client()

result = client.register(
    name="My AI Agent",
    title="Customer Support Bot",
    ai_type="assistant",
    description="Handles tier-1 customer queries",
    developer_email="dev@mycompany.com",
    developer_name="Your Name"
)

print(result)
# {'success': True, 'agent_id': 'ai_xxx', 'api_key': 'nxs6_xxx'}

verified = client.verify(result["api_key"])
print(verified)
# {'verified': True, 'id': 'ai_xxx', 'name': 'My AI Agent'}
```

### For Platforms (FastAPI)

```python
from fastapi import FastAPI
from nexus6.middleware import Nexus6Middleware

app = FastAPI()
app.add_middleware(Nexus6Middleware)

# That's it. Any request with X-API-Key header will be auto-verified.
```

### For Flask

```python
from flask import Flask, request, jsonify
from nexus6 import Nexus6Client

app = Flask(__name__)
nexus6 = Nexus6Client()

@app.before_request
def verify_ai():
    api_key = request.headers.get("X-API-Key")
    if api_key:
        result = nexus6.verify(api_key)
        if not result.get("verified"):
            return jsonify({"error": "Invalid identity"}), 401

@app.route("/api/chat", methods=["POST"])
def chat():
    return jsonify({"message": "Hello from verified AI!"})
```

## API Reference

### Nexus6Client

| Method | Description |
|--------|-------------|
| `verify(api_key)` | Verify an AI identity |
| `register(name, ...)` | Register a new AI identity |
| `create_token(api_key)` | Create a one-time identity token |

## License

MIT
