Metadata-Version: 2.4
Name: aump
Version: 0.1.0
Summary: Python SDK and validator for the Agentic User Mandate Protocol
Project-URL: Homepage, https://usermandateprotocol.com/
Project-URL: Documentation, https://usermandateprotocol.com/sdks/python/
Project-URL: Repository, https://github.com/Agentic-User-Mandate-Protocol/aump-py
Project-URL: Issues, https://github.com/Agentic-User-Mandate-Protocol/aump-py/issues
Author: Agentic User Mandate Protocol Authors
License: Apache-2.0
License-File: LICENSE
Keywords: agents,ai,conformance,mandates,protocol
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.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Requires-Dist: jsonschema>=4.23.0
Description-Content-Type: text/markdown

# aump-py

Python SDK and validator for the Agentic User Mandate Protocol.

This package provides:

- bundled AUMP v0.1 JSON Schemas;
- mandate schema and semantic validation;
- evidence event schema validation;
- evidence event semantic validation against mandate reference, retention, and
  required event policy;
- deterministic `allowed`, `denied`, and `requires_escalation` action
  evaluation;
- MCP, A2A, and UCP/AP2 bridge validation helpers;
- a small in-process runtime for examples and agent applications;
- a CLI for schema validation and action evaluation.

## Install In This Workspace

```bash
uv sync
```

## Global Install Smoke

After the package is published, the CLI should work with either `uv tool` or
standard Python installers:

```bash
uv tool install aump
aump --help
```

## CLI

Validate a mandate:

```bash
uv run aump validate mandate ../conformance/fixtures/mandates/marketplace-buyer.valid.json
```

Validate an evidence event:

```bash
uv run aump validate evidence-event ../conformance/fixtures/events/deal-accepted.valid.json
```

Validate evidence semantics against a mandate:

```bash
uv run aump validate-evidence \
  --mandate ../conformance/fixtures/mandates/marketplace-buyer.valid.json \
  --event ../conformance/fixtures/events/deal-accepted.valid.json
```

Evaluate an action:

```bash
uv run aump evaluate-action \
  --mandate ../conformance/fixtures/mandates/marketplace-buyer.valid.json \
  --action ../conformance/fixtures/actions/accept-ping-pong.allowed.json
```

## Python

```python
from aump import evaluate_action
from aump.policy import parse_datetime

result = evaluate_action(mandate, action, now=parse_datetime("2026-04-25T18:00:00Z"))
assert result["decision"] in {"allowed", "denied", "requires_escalation"}
```

## Test

The tests prefer the sibling `conformance/fixtures` corpus when this workspace
is cloned end to end. CI falls back to the pinned
`tests/fixtures/conformance` snapshot so this repo can validate itself.

```bash
uv run ruff check .
uv run pytest
```
