Metadata-Version: 2.4
Name: asqav
Version: 0.2.4
Summary: Quantum-safe identity and cryptographic audit trails for AI agents.
Project-URL: Homepage, https://asqav.com
Project-URL: Documentation, https://asqav.com/docs
Project-URL: Repository, https://github.com/jagmarques/asqav-sdk
Author-email: Asqav <hello@asqav.com>
License-Expression: MIT
Keywords: agents,ai,audit,cryptography,identity,ml-dsa,observability,post-quantum
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: httpx
Requires-Dist: httpx>=0.24.0; extra == 'httpx'
Description-Content-Type: text/markdown

# asqav

[![PyPI](https://img.shields.io/pypi/v/asqav)](https://pypi.org/project/asqav/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Thin API client** for [asqav.com](https://asqav.com). All cryptographic operations (ML-DSA signing, key generation) happen server-side. No native dependencies required.

## Installation

```bash
pip install asqav
```

## Usage

```python
import asqav

# Initialize with your API key (get one at asqav.com)
asqav.init(api_key="sk_...")

# Create an agent
agent = asqav.Agent.create("my-agent")

# Sign an action
sig = agent.sign("api:call", {"model": "gpt-4"})

# Issue a token
token = agent.issue_token(scope=["read", "write"])
```

## What this SDK does

| This SDK | asqav Cloud (server-side) |
|----------|---------------------------|
| API calls | ML-DSA key generation |
| Response parsing | Cryptographic signing |
| Error handling | Token issuance |
| OTEL export | Signature verification |

The SDK is intentionally minimal (~900 lines). All quantum-safe cryptography runs on asqav's servers.

## API Reference

### Initialization

```python
asqav.init(api_key="sk_...")  # or set ASQAV_API_KEY env var
```

### Agent

```python
agent = asqav.Agent.create("name", algorithm="ml-dsa-65")
agent = asqav.Agent.get("agt_xxx")

agent.sign("action", {"key": "value"})
agent.issue_token(scope=["read"], ttl=3600)
agent.issue_sd_token(claims={...}, disclosable=[...])  # Business tier
agent.suspend(reason="investigation", note="...")  # Temporary disable
agent.unsuspend()  # Re-enable suspended agent
agent.revoke(reason="manual")  # Permanent revoke
```

### Tracing

```python
with asqav.span("api:openai", {"model": "gpt-4"}) as s:
    response = openai.chat.completions.create(...)
    s.set_attribute("tokens", response.usage.total_tokens)
```

## Requirements

- Python 3.10+

## Get your API key

Sign up at [asqav.com](https://asqav.com)

## License

MIT
