Metadata-Version: 2.5
Name: ag-ui-validate
Version: 0.4.0
Summary: Conformance validator for the AG-UI protocol
Project-URL: Homepage, https://github.com/langport-dev/ag-ui-validate
Project-URL: Repository, https://github.com/langport-dev/ag-ui-validate
Project-URL: Issues, https://github.com/langport-dev/ag-ui-validate/issues
Author: Faraz
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: ag-ui-protocol>=0.1.0; extra == 'dev'
Requires-Dist: httpx>=0.27; extra == 'dev'
Requires-Dist: mypy>=1.14; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: transport
Requires-Dist: httpx>=0.27; extra == 'transport'
Description-Content-Type: text/markdown

# ag-ui-validate (Python)

Native Python port of
[ag-ui-validate](https://github.com/langport-dev/ag-ui-validate), a
conformance validator for the [AG-UI protocol](https://docs.ag-ui.com).
Same rule catalog, same fixture corpus, byte-identical CLI flags and
JSON/SARIF/JUnit output as the TypeScript implementation — checked against
it on every PR by Parity CI.

```bash
pip install ag-ui-validate   # or "ag-ui-validate[transport]" for just the endpoint-validating extras
```

To install from source instead:

```bash
git clone https://github.com/langport-dev/ag-ui-validate
cd ag-ui-validate/py
pip install -e ".[dev]"
```

## CLI

```bash
ag-ui-validate http://localhost:8000/agui   # live endpoint (POSTs a RunAgentInput)
ag-ui-validate run.jsonl                    # recorded stream (NDJSON/JSONL or SSE capture)
cat run.jsonl | ag-ui-validate -            # stdin
```

Exit codes: `0` clean, `1` findings at error level (or warnings over
`--max-warnings`), `2` tool failure. See `ag-ui-validate --help` for the
full flag list.

## pytest plugin

```python
from ag_ui_validate.pytest_plugin import assert_valid_agui

def test_my_agent_stream(captured_events):
    assert_valid_agui(captured_events, features=["shared-state"], max_warnings=0)
```

Registers automatically as a pytest plugin on install — no `conftest.py`
setup needed. An async counterpart, `assert_valid_agui_endpoint`, validates
a live endpoint directly from a test.

## More

See the
[main README](https://github.com/langport-dev/ag-ui-validate#readme) for
the full rule catalog and design commitments, and
[docs/PYTHON-PORT-PLAN.md](https://github.com/langport-dev/ag-ui-validate/blob/main/docs/PYTHON-PORT-PLAN.md)
for the port's milestone history.
