Skip to main content

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


Download files

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

Source Distribution

agent_integrity_proto-1.0.0.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

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

agent_integrity_proto-1.0.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_integrity_proto-1.0.0.tar.gz.

File metadata

  • Download URL: agent_integrity_proto-1.0.0.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for agent_integrity_proto-1.0.0.tar.gz
Algorithm Hash digest
SHA256 13b3f868ab9923a7d30b499b8362ccbca720d3b377ca64f9a0e9e546b78e88a0
MD5 a7a5c02c7b7d7e4b2942d52583afdd3e
BLAKE2b-256 f63b47cc001508a79be8a7e964afa55245e923e76854abf46773db04abf67bb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_integrity_proto-1.0.0.tar.gz:

Publisher: publish.yml on mnemom/aip

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

File details

Details for the file agent_integrity_proto-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_integrity_proto-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38ae0e73c9f441acb13c4920f847e6cd0024f6e659de3730f2673e005b5a02a4
MD5 4f14352a1f3deb5262b16714930892f3
BLAKE2b-256 507226ad6813fc9a1059b61a6b362f804cc2881c8cadd14a9d406b2ec389459f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_integrity_proto-1.0.0-py3-none-any.whl:

Publisher: publish.yml on mnemom/aip

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