Skip to main content

Cryptographic audit trails for AI agents

Project description

Sigil Notary

PyPI version License: MIT Python 3.12+

Tamper-evident audit trails for AI agents.

Sigil gives AI agents cryptographically signed, hash-chained audit trails via the Model Context Protocol. Every action gets a verifiable receipt with an Ed25519 signature and SHA-256 chain link.

Install

pip install sigil-notary

MCP Server Usage

Sigil ships as an MCP server that any MCP-compatible AI agent can use natively.

Claude Code

Add to your .claude/settings.json or project MCP config:

{
  "mcpServers": {
    "sigil": {
      "command": "uvx",
      "args": ["sigil-notary"],
      "env": {
        "SIGIL_API_KEY": "sg_your_key_here",
        "SIGIL_API_URL": "https://api.sigil-notary.dev"
      }
    }
  }
}

Available MCP Tools

Tool Description
attest_action Record an action and get a signed, hash-chained receipt
verify_receipt Verify a receipt's signature and chain integrity
get_chain Retrieve the full audit trail for the current agent

Python SDK

For programmatic access, use the Python client directly:

from sigil import SigilClient

client = SigilClient(api_key="sg_your_key_here")

# Record an action
receipt = client.attest(
    action_type="file_write",
    payload={"path": "/app/config.yaml", "summary": "Updated DB connection string"}
)
print(f"Receipt #{receipt.seq}: {receipt.receipt_hash[:16]}...")

# Verify a receipt
result = client.verify(receipt.id)
print(f"Valid: {result.valid}, Chain intact: {result.chain_valid}")

# Get the audit trail
chain = client.get_chain(agent_id="my-agent")
for r in chain.receipts:
    print(f"  #{r.seq} {r.action_type}{r.timestamp}")

Async Client

from sigil.client import AsyncSigilClient

async with AsyncSigilClient(api_key="sg_your_key_here") as client:
    receipt = await client.attest("api_request", {"endpoint": "/users"})

Environment Variables

Variable Required Default Description
SIGIL_API_KEY Yes API key for authentication
SIGIL_API_URL No http://localhost:8100 Notary API base URL
SIGIL_AGENT_ID No from key Agent identity for chain queries

Development

git clone https://github.com/sly-the-fox/sigil.git
cd sigil
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check .

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigil_notary-0.2.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sigil_notary-0.2.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file sigil_notary-0.2.0.tar.gz.

File metadata

  • Download URL: sigil_notary-0.2.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sigil_notary-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9b252a24d5889f7c58131fff8764ea7b1e0679f1fb52a41b8f4e0745fef1646c
MD5 4d9033c2ed34281bee7ac922668b17ed
BLAKE2b-256 8760d7944c7febd402da45508b6c2b391397ddabd657127be3100e71f1f442de

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigil_notary-0.2.0.tar.gz:

Publisher: publish.yml on sly-the-fox/sigil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sigil_notary-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sigil_notary-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sigil_notary-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e6630b37ad1887d18faecd38d34a1cd526a2e78fe055491f15bc3120a1d137d
MD5 b01740fde0dc30334f9830e8947e02db
BLAKE2b-256 38de2f3dec20e4b0b74695f9374c9b26878f665c553b69bdaf5d74a838b0e270

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigil_notary-0.2.0-py3-none-any.whl:

Publisher: publish.yml on sly-the-fox/sigil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page