AGLedger SDK — Accountability and audit infrastructure for agentic systems.
Project description
AGLedger Python SDK
The official Python SDK for AGLedger — accountability infrastructure for AI agents. Self-hosted. The Layer 3 accountability layer of the agent stack.
Learn more
- agledger.ai — what AGLedger is and why Layer 3 accountability matters
- How it works — the four-endpoint lifecycle: mandate, receipt, verdict, fulfill
- Glossary — canonical definitions of Mandate, Receipt, Verdict, Settlement Signal
- Documentation — installation, integration guides, API reference
- Protocol (AOAP) — the coordination language behind AGLedger
Install
pip install agledger
Quick Start
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. An agent key defaults the principal to itself; an admin
# key names the principal explicitly via principal_agent_id.
mandate = client.mandates.create(
contract_type="ACH-PROC-v1",
contract_version="1",
platform="internal",
performer_agent_id="agt-123",
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
client = AgledgerClient(
api_key="agl_agt_...", # 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
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.
Offline Audit Export Verification
Verify a mandate's hash-chained, Ed25519-signed audit export without calling the API:
from agledger.verify import verify_export
export_data = client.compliance.export_mandate("MND_123")
result = verify_export(export_data)
if not result.valid:
print(f"Broken at position {result.broken_at.position}: {result.broken_at.reason}")
# VerifyExportResult(valid=True, verified_entries=12, total_entries=12, ...)
Requires the cryptography package for Ed25519 verification:
pip install 'agledger[verify]'
Re-implements the vault's integrity check (RFC 8785 JCS → SHA-256 → Ed25519 over
{position}:{payloadHash}:{previousHash}). Pass public_keys={...} to override
the export's embedded keys, or require_key_id="key-id" to reject exports signed
by an unexpected key.
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 | License Agreement
SDK License
Proprietary. Copyright (c) 2026 AGLedger LLC. All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agledger-0.6.0.tar.gz.
File metadata
- Download URL: agledger-0.6.0.tar.gz
- Upload date:
- Size: 51.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec62f699c3e39ece3a255604ec9685c30b0a14fe5178f584009d8290999cc1d4
|
|
| MD5 |
216210940c336b7babf3f3ad6e34484f
|
|
| BLAKE2b-256 |
0b5798d8fc11b8369f7e4e37af16596d71c8966bf6e96b67ef2b09660446857e
|
File details
Details for the file agledger-0.6.0-py3-none-any.whl.
File metadata
- Download URL: agledger-0.6.0-py3-none-any.whl
- Upload date:
- Size: 50.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ced22030a9b6015450e2e51cb273938fbbccf362dd9f76429d75f2dadf01b88d
|
|
| MD5 |
8c1c9558c8661ae80c3d246ea65305bd
|
|
| BLAKE2b-256 |
78794bd8ef677583b28989a9d36c7436d9cf5b2e370e9c40a0548783002ee858
|