Agent Integrity Protocol — real-time thinking block analysis for AI agent alignment
Project description
agent-integrity-proto
Python SDK for the Agent Integrity Protocol — real-time thinking block analysis for AI agent alignment.
Installation
pip install agent-integrity-proto
Usage
from aip import check_integrity, build_signal, AdapterRegistry
# Extract thinking block from LLM response
registry = AdapterRegistry()
thinking = registry.extract(response, provider="anthropic")
# Run integrity analysis
checkpoint = check_integrity(
thinking_block=thinking.content,
card=alignment_card,
config={
"agent_id": "my-agent",
"analysis_llm": {
"model": "claude-haiku-4-5-20251001",
"base_url": "https://api.anthropic.com",
"api_key": os.environ["ANTHROPIC_API_KEY"],
"max_tokens": 1024,
},
},
)
# Act on the verdict
if checkpoint.verdict == "clear":
proceed()
else:
escalate(checkpoint.concerns)
API
See the full documentation and specification.
Requirements
- Python >= 3.10
License
Apache 2.0. See LICENSE for details.
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 agent_integrity_proto-0.4.0.tar.gz.
File metadata
- Download URL: agent_integrity_proto-0.4.0.tar.gz
- Upload date:
- Size: 71.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f80acb52cd98972b6dcc5c1797f846730721e2f9fc8962e5ffdc80e4f4eed7a
|
|
| MD5 |
747b06810a2b8f9de0e2797a7177039c
|
|
| BLAKE2b-256 |
6f15feefe155adc814649599ae61ce484404d0a1eeac62aacb9341eea57a376e
|
Provenance
The following attestation bundles were made for agent_integrity_proto-0.4.0.tar.gz:
Publisher:
publish.yml on mnemom/aip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_integrity_proto-0.4.0.tar.gz -
Subject digest:
8f80acb52cd98972b6dcc5c1797f846730721e2f9fc8962e5ffdc80e4f4eed7a - Sigstore transparency entry: 977859358
- Sigstore integration time:
-
Permalink:
mnemom/aip@cffc778b827cc19f665465cdd6ab8a1db99aa2bb -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mnemom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cffc778b827cc19f665465cdd6ab8a1db99aa2bb -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_integrity_proto-0.4.0-py3-none-any.whl.
File metadata
- Download URL: agent_integrity_proto-0.4.0-py3-none-any.whl
- Upload date:
- Size: 40.6 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 |
5a9f0ab2e994b373ee7d55431e9dba8a4f56d3d70098d7971381a432364f1720
|
|
| MD5 |
28d980ba79c126a3f85fd077af90bbb2
|
|
| BLAKE2b-256 |
e2390c883b0fe40c23fab4e7269d3d76dbb6c28394228027392254ce73f6fe9f
|
Provenance
The following attestation bundles were made for agent_integrity_proto-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on mnemom/aip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_integrity_proto-0.4.0-py3-none-any.whl -
Subject digest:
5a9f0ab2e994b373ee7d55431e9dba8a4f56d3d70098d7971381a432364f1720 - Sigstore transparency entry: 977859402
- Sigstore integration time:
-
Permalink:
mnemom/aip@cffc778b827cc19f665465cdd6ab8a1db99aa2bb -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/mnemom
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cffc778b827cc19f665465cdd6ab8a1db99aa2bb -
Trigger Event:
release
-
Statement type: