Metadata-Version: 2.4
Name: agentseal-sdk
Version: 0.1.0
Summary: Tamper-proof audit trails for AI agents.
Project-URL: Homepage, https://agentseal.io
Project-URL: Documentation, https://agentseal.io/docs
Project-URL: Repository, https://github.com/JoeyBrar/agentseal
Author: JoeyBrar
License-Expression: MIT
Keywords: agents,ai,audit-trail,compliance,governance,mcp
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27.0
Description-Content-Type: text/markdown

# agentseal-sdk

Tamper-proof audit trails for AI agents. Every action is cryptographically chained — tamper with one record and the entire chain breaks.

## Install

```bash
pip install agentseal-sdk
```

## Quickstart

```python
from agentseal import Seal

seal = Seal(api_key="as_sk_...")

# Record an action
seal.record(
    agent="my-bot",
    action="email:send",
    params={"to": "user@example.com"},
    reasoning="User requested password reset",
)

# Query the audit trail
entries = seal.query(agent="my-bot")

# Verify chain integrity
result = seal.verify(agent="my-bot")
print(result)  # {"valid": True, "entries_verified": 1}
```

## API

### `Seal(api_key, base_url=DEFAULT)`

Create a client. Supports `with Seal(...) as seal:` context manager.

### `seal.record(agent, action, params, reasoning, authorized_by)`

Record an agent action to the tamper-proof chain. Returns `{id, sequence, entry_hash, parent_hash}`.

### `seal.query(agent, action_type, since, until, limit)`

Query recorded entries with optional filters. Returns a list of entry dicts.

### `seal.verify(agent)`

Verify hash chain integrity. Returns `{"valid": True, "entries_verified": N}` or `{"valid": False, "broken_at_sequence": N, "reason": "..."}`.

### `@seal.track(agent, action)`

Decorator to auto-record function calls.

```python
@seal.track(agent="my-bot")
def send_email(to, subject, body):
    ...  # function runs, then the call is recorded automatically
```

## Get an API key

Sign up at [agentseal.io](https://agentseal.io)

## License

MIT
