Metadata-Version: 2.4
Name: agent-iam-ratchet
Version: 0.1.0
Summary: Sensitivity Ratchet SDK — irreversible permission narrowing for AI agents
Project-URL: Homepage, https://github.com/mattyopon/agent-iam-ratchet
Project-URL: Repository, https://github.com/mattyopon/agent-iam-ratchet
Author: Yutaro Maeda
License-Expression: MIT
Keywords: agents,ai,iam,permissions,ratchet,security
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT 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 :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: crewai>=0.80.0; extra == 'all'
Requires-Dist: langchain-core>=0.3.0; extra == 'all'
Requires-Dist: openai-agents>=0.1.0; extra == 'all'
Provides-Extra: crewai
Requires-Dist: crewai>=0.80.0; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.3; extra == 'dev'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.3.0; extra == 'langchain'
Provides-Extra: openai-agents
Requires-Dist: openai-agents>=0.1.0; extra == 'openai-agents'
Description-Content-Type: text/markdown

# agent-iam-ratchet

Sensitivity Ratchet SDK — irreversible permission narrowing for AI agents.

## Install

```bash
pip install agent-iam-ratchet
```

With framework integrations:

```bash
pip install 'agent-iam-ratchet[langchain]'
pip install 'agent-iam-ratchet[crewai]'
pip install 'agent-iam-ratchet[openai-agents]'
```

## Quick Start

```python
from agent_iam_ratchet import RatchetSession, Sensitivity

session = RatchetSession(scopes=["read:*", "write:*", "delete:*", "execute:*"])

# Agent reads a confidential document
session.access(Sensitivity.CONFIDENTIAL)
print(session.effective_scopes)
# {'read:*', 'write:*'} — delete and execute permanently removed

# Agent reads restricted data
session.access(Sensitivity.RESTRICTED)
print(session.effective_scopes)
# {'read:*'} — only reads remain

# Irreversible — even accessing public data won't restore permissions
session.access(Sensitivity.PUBLIC)
print(session.effective_scopes)
# {'read:*'} — still read-only
```

## Why?

AI agents that access sensitive data can exfiltrate it by writing to lower-sensitivity channels. The sensitivity ratchet prevents this by permanently narrowing permissions after sensitive data access.

## License

MIT
