Metadata-Version: 2.4
Name: agledger
Version: 0.4.0
Summary: AGLedger SDK — Accountability and audit infrastructure for agentic systems.
Author-email: AGLedger LLC <support@agledger.ai>
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Keywords: accountability,agents,agledger,audit,mandates
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
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: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.27.0
Requires-Dist: pydantic<3,>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Description-Content-Type: text/markdown

# AGLedger Python SDK

Accountability and audit infrastructure for agentic systems. Self-hosted.

## Install

```bash
pip install agledger
```

## Quick Start

```python
import os
from agledger import AgledgerClient

client = AgledgerClient(
    api_key=os.environ["AGLEDGER_API_KEY"],
    base_url=os.environ["AGLEDGER_EXTERNAL_URL"],  # your AGLedger instance URL
)

# Create a mandate
mandate = client.mandates.create(
    enterprise_id="ent_123",
    contract_type="ACH-PROC-v1",
    contract_version="1",
    platform="internal",
    criteria={"item": "widgets", "max_quantity": 100},
)

# Activate it
client.mandates.transition(mandate.id, "activate")

# Submit a receipt
receipt = client.receipts.submit(mandate.id, evidence={"quantity": 95, "vendor": "acme"})

# Verify
result = client.verification.verify(mandate.id)
```

## Configuration

```python
client = AgledgerClient(
    api_key="ach_ent_...",                              # or set AGLEDGER_API_KEY env var
    base_url="https://agledger.internal.example.com",   # your instance URL
    max_retries=2,                                      # default: 2
    timeout=30.0,                                       # default: 30s
)
```

## Async Support

```python
from agledger import AsyncAgledgerClient

async with AsyncAgledgerClient() as client:
    mandate = await client.mandates.get("mnd-123")
```

## Resources

23 resource sub-clients: `mandates`, `receipts`, `verification`, `disputes`, `webhooks`, `reputation`, `events`, `schemas`, `dashboard`, `compliance`, `registration`, `health`, `admin`, `a2a`, `capabilities`, `notarize`, `enterprises`, `projects`, `proxy`, `federation`, `federation_admin`, `agents`, `references`.

## Licensing

AGLedger is **free for single-node deployments** (Docker Compose with bundled database). An Enterprise License is required for external database connections, federation, and multi-node deployments.

Full details: [agledger.ai/pricing](https://agledger.ai/pricing) | [License Agreement](https://agledger.ai/license)

## SDK License

Proprietary. Copyright (c) 2026 AGLedger LLC. All rights reserved.
