mantle-agent-attest
Verifiable AI-agent-run attestations on the Mantle EVM L2. Built for the Mantle Turing Test Phase 2 hackathon on DoraHacks.
The pitch
AI agents are increasingly running unattended (scraping, payments, trades). The Turing-test question becomes: how do you prove a given log came from a specific agent and wasn't doctored?
mantle-agent-attest does this in three steps:
- Hash the agent's JSONL audit log (e.g. from birddog or agentleash) into a Merkle root.
- Sign the root with the agent's EVM key (personal-sign).
- Post the
(runId, root, signature)triple on-chain to a tinyAgentAttestationRegistrycontract on Mantle.
Anyone can later verify:
- "this single event was part of run X" (Merkle inclusion proof)
- "run X was signed by agent Y" (ecrecover on-chain)
Install
pip install mantle-agent-attest # core (Merkle + sign)
pip install "mantle-agent-attest[onchain]" # + web3 for on-chain submit/read
Python 3.10+.
Quickstart (offline)
import json
from mantle_agent_attest import build_attestation, verify_inclusion
# any JSONL agent log works (birddog, agentleash, your own)
events = [json.loads(line) for line in open("runs/watchdog.jsonl")]
att = build_attestation(
events,
run_id="scrape-2026-05-20",
signer_key="0x...", # your agent's EVM private key
)
print(att.root_hex, att.signature, att.signer)
# prove that one event was part of the run:
target = events[3]
proof = att.proof_for(3)
assert verify_inclusion(target, proof, att.root)
Publish on-chain (Mantle Sepolia)
# 1. Deploy the registry once (forge / hardhat / foundry — see contracts/README.md)
forge create \
--rpc-url https://rpc.sepolia.mantle.xyz \
--private-key $YOUR_KEY \
contracts/AgentAttestationRegistry.sol:AgentAttestationRegistry
# 2. Use the deployed address to attest a run
export MANTLE_REGISTRY=0xDeployedRegistryAddress
export AGENT_KEY=0xYourAgentPrivateKey
python examples/submit_attestation.py runs/watchdog.jsonl --run-id scrape-2026-05-20
Mantle Sepolia testnet has free gas via the public faucet.
Why Mantle
- Cheap, fast EVM L2 — attestations cost cents, not dollars
- Standard
ecrecoveron personal-sign, so any wallet can verify - The contract is ~50 lines of Solidity; no admin, no upgrade path
Companion libraries
mantle-agent-attest is the on-chain verification layer for the
@mukundakatta agent-stack:
- birddog — audited Bright Data egress (produces the JSONL we hash)
- agentleash — USD/call budget + tool-arg gate (also JSONL)
- recruitertriage — small-LM recruiter inbox triage
You can attest any of these audit logs without code changes.
Security notes
- The deployed registry is permissionless. Anyone can post any
(runId, root, sig), butsigneris recovered from the sig, so impersonation isn't possible. runIdis locked on first submit; pick collision-resistant IDs.block.timestampontsis approximate (~12 sec on Mantle).- This library is alpha. Don't use the example key on mainnet.
License
MIT
Metadata
Release files for mantle-agent-attest 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mantle_agent_attest-0.1.0.tar.gz | 10.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mantle_agent_attest-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / mantle_agent_attest-0.1.0.tar.gz
| Download URL | mantle_agent_attest-0.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
790e40fe9d62dbba6007d3b72b7e8158fce970042a9afb8b16b8bd5f3242dc6b
|
|
BLAKE2b-256 checksum How to use checksums |
ae9ba45177492de5088df15752e0c76177e0177fa1e7797164f07e47be3b1e21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / mantle_agent_attest-0.1.0-py3-none-any.whl
| Download URL | mantle_agent_attest-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b14ebcba86cb9bb33bdd23ededada21dae9d9fea3ca454cb3696ad26fade5f54
|
|
BLAKE2b-256 checksum How to use checksums |
50258be6b7d5efa022632f2f4afe3633e836b7b07d63f380f87b8a0d92eb073d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for mantle-agent-attest 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.