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-0.1.1.tar.gz (64.7 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-0.1.1-py3-none-any.whl (37.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agent_integrity_proto-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e7ec60e973f563028db88333a13adec8fb5b99586a78388e3ce87e2fdd5ae50c
MD5 f85456c29293492fec0ff9187faaca52
BLAKE2b-256 cdaa1caf6e0fbe08ad9d938b6f933804cf07f94cc853e5d9afe53d050c2c7fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_integrity_proto-0.1.1.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-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_integrity_proto-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9170aca4ac3f488b2bc6dc4b994a817c06efce2602def7ba6d3d033853508f6b
MD5 2390186d2727a5de7a27b6b7ebc9496b
BLAKE2b-256 fe01e57d0e48b4a05abe08fef6f5f9174125e7efe377ddc123f1b6f76bba767a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_integrity_proto-0.1.1-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