Metadata-Version: 2.4
Name: agent-integrity-proto
Version: 1.0.0
Summary: Agent Integrity Protocol — real-time thinking block analysis for AI agent alignment
Project-URL: Homepage, https://github.com/mnemom/aip
Project-URL: Documentation, https://github.com/mnemom/aip/blob/main/docs/SPEC.md
Project-URL: Repository, https://github.com/mnemom/aip
Project-URL: Issues, https://github.com/mnemom/aip/issues
Project-URL: Changelog, https://github.com/mnemom/aip/blob/main/CHANGELOG.md
Author-email: "Mnemom.ai" <dev@mnemom.ai>
License-Expression: Apache-2.0
Keywords: agent,ai,alignment,conscience,integrity,llm,safety,thinking
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Description-Content-Type: text/markdown

# agent-integrity-proto

Python SDK for the Agent Integrity Protocol — real-time thinking block analysis for AI agent alignment.

## Installation

```bash
pip install agent-integrity-proto
```

## Usage

```python
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](https://github.com/mnemom/aip#readme) and [specification](https://github.com/mnemom/aip/blob/main/docs/SPEC.md).

## Requirements

- Python >= 3.10

## License

Apache 2.0. See [LICENSE](../../LICENSE) for details.
