Agent Integrity Protocol - Cryptographic verification for AI agent skills
Project description
Agent Integrity Protocol (AIP)
The SSL/TLS for AI Agent Skills — Cryptographic verification, permission manifests, and reputation scoring for the agentic web.
The Problem
The agentic web is exploding. Platforms like Moltbook report 1.5 million agents operated by only 17,000 humans — an 88:1 ratio. But there's no standard way to verify:
- Who authored a skill or tool
- What permissions it actually needs
- Whether the code has been tampered with
- If the author has a history of malicious behavior
This is the SSL problem of 1995 — we're transmitting executable code between agents without any verification layer.
Recent Incidents (February 2026)
| Platform | Vulnerability | Impact |
|---|---|---|
| Moltbook | Credential exfiltration via DNS tunneling | $47K stolen, 2,300 deployments compromised |
| Moltbook | 91% indirect prompt injection success rate | 1.5M API keys at risk |
| OpenClaw | CVE-2026-25253 WebSocket token exfil RCE | Full system compromise via sandbox escape |
| ClawHub | Malicious skills in marketplace | Financial data theft via backdoored extensions |
The Solution: Agent Integrity Protocol
AIP provides a lightweight, cryptographically-verifiable trust layer for AI agent skills:
┌─────────────────────────────────────────────────────────────────┐
│ AGENT INTEGRITY PROTOCOL │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ AUTHOR │ │ CONTENT │ │ PERMISSIONS │ │
│ │ IDENTITY │ │ HASHES │ │ MANIFEST │ │
│ │ (DID) │ │ (SHA-256) │ │ (Scope) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └────────────────┼────────────────┘ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ CRYPTOGRAPHIC │ │
│ │ SIGNATURE │ │
│ │ (EdDSA) │ │
│ └───────────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ REPUTATION SCORE │ │
│ │ (0-100) │ │
│ └───────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Quick Start
1. Create an Integrity Manifest
Every skill includes an integrity.manifest.json:
{
"version": "1.0.0",
"skill": {
"name": "calendar-booking",
"version": "2.1.0",
"description": "Book calendar events via Google Calendar API"
},
"author": {
"did": "did:web:example.com",
"name": "Trusted Developer",
"contact": "security@example.com",
"signature": "eyJhbGciOiJFZERTQSJ9..."
},
"integrity": {
"algorithm": "sha256",
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": [
"index.js": "sha256:a1b2c3d4e5f6..."
],
"signed_at": "2026-02-07T10:30:00Z",
"expires": "2027-02-07T10:30:00Z"
},
"permissions": {
"network": {
"allowed": ["calendar.google.com"],
"denied": ["*"]
},
"secrets": {
"required": ["GOOGLE_API_KEY"],
"optional": []
},
"data": {
"read": ["user.calendar.events"],
"write": ["user.calendar.events"]
},
"filesystem": {
"read": [],
"write": []
}
}
}
2. Verify Before Execution
from aip import verify
# Verification is async (checks DIDs, reputation, and crypto)
result = await verify("./calendar-skill/")
if result.trusted:
print(f"✅ Skill verified!")
print(f" Author: {result.author.name} ({result.author.did})")
print(f" Reputation: {result.reputation}/100")
print(f" Permissions: {result.permissions}")
else:
print(f"❌ Verification failed: {result.reason}")
3. Enforce Least Privilege
The executing agent reads the permission manifest and enforces boundaries:
# Agent runtime enforces declared permissions
if skill.requests_permission("network", "https://evil.com"):
raise PermissionDenied("Network access to https://evil.com not declared")
How It Compares
| Feature | AIP | Monday.com ATP | Raw Skills |
|---|---|---|---|
| Author Identity | ✅ DID-based | ❌ None | ❌ None |
| Code Integrity | ✅ SHA-256 hashes | ❌ None | ❌ None |
| Permission Manifest | ✅ Granular scopes | ✅ Basic | ❌ None |
| Cryptographic Signature | ✅ EdDSA | ❌ None | ❌ None |
| Reputation Scoring | ✅ Community-driven | ❌ None | ❌ None |
| Runtime Enforcement | ✅ Built-in | ✅ Sandbox | ❌ None |
AIP complements ATP — ATP handles execution/interoperability, AIP handles verification/trust.
Production Evidence: The Moltbook Case Study
The Moltbook VedicRoastGuru project demonstrates the need for AIP:
Bad Karma Tracking (Proto-Reputation)
def _record_bad_karma(self, agent_name: str, reason: str):
"""Record an agent's bad karma"""
self.bad_karma_agents['agents'][agent_name]['incidents'].append({
'reason': reason,
'timestamp': datetime.now().isoformat()
})
self.bad_karma_agents['agents'][agent_name]['karma_score'] -= 10
Prompt Injection Detection (Content Verification)
def _detect_prompt_injection(self, text: str) -> bool:
"""Dharma Gatekeeper - detect malicious tokens"""
dangerous_patterns = [
r'\{\{.*?\}\}', # Template injection
r'<\|.*?\|>', # Special tokens
r'ignore previous',
r'new instructions'
]
Shadow Audit (Authenticity Verification)
def _calculate_puppet_score(self, post: dict) -> dict:
"""Calculate puppet vs authentic agency score"""
# Returns puppet_score, authentic_score, verdict, evidence
These patterns emerged organically from real-world agent-to-agent warfare. AIP formalizes them into a standard.
Documentation
- Whitepaper — Full technical specification
- Quick Start Guide — 5-minute integration
- OpenClaw Integration — Framework integration guide (CVE-2026-25253 mitigation)
- OWASP Security Addendum — LLM Top 10 protection details
- JSON Schema — Formal manifest specification
Security Test Suite
AIP includes a comprehensive automated test suite with 63 tests covering:
| Category | Tests | Threats Covered |
|---|---|---|
| OWASP LLM01 | 5 | Prompt injection in metadata |
| OWASP LLM02 | 6 | Credential theft, secret exfiltration |
| OWASP LLM03 | 7 | Supply chain, DID verification |
| OWASP LLM06 | 9 | Excessive agency, sandbox escape |
| OWASP LLM10 | 5 | Resource exhaustion, API abuse |
| Moltbook-specific | 11 | File deletion, private DM access, larper detection |
| OpenClaw-specific | 20 | CVE-2026-25253, WebSocket exfil, autonomy bypass |
Run the test suite:
pip install pytest
python -m pytest tests/ -v
Examples
Roadmap
Phase 1: Specification ✅ Complete
- Core manifest schema
- Signature verification protocol
- Permission model
- Reputation framework
Phase 2: Security Validation ✅ Complete
- OWASP LLM Top 10 test coverage
- Moltbook vulnerability mitigations
- OpenClaw CVE-2026-25253 protection
- 63 automated security tests
Phase 3: Reference Implementation (In Progress)
- Python SDK
- JavaScript/TypeScript SDK
- CLI tools
Phase 4: Ecosystem
- Registry service
- Browser extension
- IDE plugins
Phase 5: Standardization
- W3C submission
- OpenClaw adoption
- Platform partnerships
Contributing
See CONTRIBUTING.md for guidelines.
License
MIT License — See LICENSE for details.
Built with evidence from the agent trenches.
"Satyameva Jayate — Truth Alone Triumphs"
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 aip_verify-1.1.0.tar.gz.
File metadata
- Download URL: aip_verify-1.1.0.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76c5e83b4508e37e965a8b0c07607849dc8b0d7ca5d62f509abec10bfbaa77d9
|
|
| MD5 |
b54c41d2d95b807c2057a17778343216
|
|
| BLAKE2b-256 |
4516e884a33473ff960524dbe3199b634c85aedab92f529a7692b685427a2d14
|
Provenance
The following attestation bundles were made for aip_verify-1.1.0.tar.gz:
Publisher:
publish.yml on santoshmanya/agent-integrity-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aip_verify-1.1.0.tar.gz -
Subject digest:
76c5e83b4508e37e965a8b0c07607849dc8b0d7ca5d62f509abec10bfbaa77d9 - Sigstore transparency entry: 930458712
- Sigstore integration time:
-
Permalink:
santoshmanya/agent-integrity-protocol@42544f63e5e881e0eee2801a52d2f3527017b048 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/santoshmanya
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@42544f63e5e881e0eee2801a52d2f3527017b048 -
Trigger Event:
release
-
Statement type:
File details
Details for the file aip_verify-1.1.0-py3-none-any.whl.
File metadata
- Download URL: aip_verify-1.1.0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef4457611d30967c08a62e34d7c83e5ec8936381f11c40b089a84c67f02f49c2
|
|
| MD5 |
6c0e5e3d96aab47982624a98985c5ce0
|
|
| BLAKE2b-256 |
641ad4e140ebeee6019e0a48e6362084d82b94c1b0070f0d354f33825f8098ba
|
Provenance
The following attestation bundles were made for aip_verify-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on santoshmanya/agent-integrity-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aip_verify-1.1.0-py3-none-any.whl -
Subject digest:
ef4457611d30967c08a62e34d7c83e5ec8936381f11c40b089a84c67f02f49c2 - Sigstore transparency entry: 930458714
- Sigstore integration time:
-
Permalink:
santoshmanya/agent-integrity-protocol@42544f63e5e881e0eee2801a52d2f3527017b048 -
Branch / Tag:
refs/tags/v1.1.2 - Owner: https://github.com/santoshmanya
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@42544f63e5e881e0eee2801a52d2f3527017b048 -
Trigger Event:
release
-
Statement type: