A permission state machine for AI agents with full audit trail on-chain
When an AI agent acts on your behalf, how do you know it had permission to do what it did?
Current AI agent systems lack:
Authority Ledger records every permission change as an on-chain event with cryptographic evidence.
| Level | Name | Description |
|---|---|---|
| 3 | EXECUTE | Full autonomous execution |
| 2 | SUGGEST | Agent suggests, human confirms |
| 1 | OBSERVE | Read-only access |
| 0 | REVOKED | No permissions |
# Clone the repo
git clone https://github.com/your-username/authority-ledger.git
cd authority-ledger
# Install dependencies
forge install
# Build
forge build
# Test
forge test
# Deploy
forge script script/Deploy.s.sol --rpc-url $RPC_URL --broadcast
| Contract | Address |
|---|---|
| AuthorityState | 0xe7da77beBf85a0b3BEDf46c056e7Fb4f77AC2aD8 |
| EvidenceStore | 0xe70c84F38A5dB8A5c3cF22112036dab70cad16DD |
authority.registerAgent(agentAddress);
authority.grantAuthority(
agentAddress,
AuthorityLevel.EXECUTE, // level
0x0, // scope (all permissions)
86400 // duration (24 hours)
);
(bool hasAuth, uint8 level) = authority.checkAuthority(agentAddress, AuthorityLevel.SUGGEST);
authority.revokeAuthority(
agentAddress,
RevokeReason.DRIFT_DETECTED,
evidenceId // reference to evidence
);
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Authority Ledger โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ AuthorityState.sol EvidenceStore.sol โ
โ โโโ Authority levels โโโ Evidence storage โ
โ โโโ State transitions โโโ Diversity checks โ
โ โโโ Audit logging โโโ IPFS integration โ
โ โโโ ERC-8004 integration โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Run all tests
forge test
# Run with gas report
forge test --gas-report
# Run specific test
forge test --match-test testGrantAuthority -vvv
All 11 tests passing โ
authority-ledger/
โโโ contracts/
โ โโโ AuthorityState.sol
โ โโโ EvidenceStore.sol
โโโ test/
โ โโโ AuthorityState.t.sol
โโโ script/
โ โโโ Deploy.s.sol
โโโ frontend/
โ โโโ index.html
โโโ DESIGN.md
โโโ DEPLOYMENT.md
โโโ SUBMISSION.md
| Track | Prize |
|---|---|
| Agents With Receipts โ ERC-8004 | $4,000 |
| Private Agents, Trusted Actions | $5,750 |
| Best Use of Delegations | $3,000 |
| Synthesis Open Track | $14,059 |
MIT
Authority Ledger โ Because every permission change deserves a receipt.