agentseal-sdk
April 9, 2026 ยท View on GitHub
Tamper-proof audit trails for AI agents. Every action your agent takes is cryptographically chained and verifiable.
Install
pip install agentseal-sdk
Quickstart
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 hash 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.
@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
License
MIT