Metadata-Version: 2.5
Name: martian-sdk
Version: 0.1.1
Summary: Martian SDK for agent evaluations, adversarial testing, and CI gates
Project-URL: Homepage, https://martiansecurity.ai/
Project-URL: Repository, https://github.com/MorningHQ/martian-redteam
Project-URL: Documentation, https://github.com/MorningHQ/martian-redteam/tree/main/docs
Project-URL: Issues, https://github.com/MorningHQ/martian-redteam/issues
Author: Martian Security
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: httpx>=0.28.1
Requires-Dist: pydantic-settings>=2.10.0
Requires-Dist: pydantic>=2.11.0
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=14.0.0
Requires-Dist: tenacity>=9.1.0
Requires-Dist: typer>=0.16.0
Provides-Extra: evals
Requires-Dist: alembic>=1.13; extra == 'evals'
Requires-Dist: mlflow-skinny==3.16.1; extra == 'evals'
Requires-Dist: pandas>=2.2; extra == 'evals'
Requires-Dist: pytest>=8; extra == 'evals'
Requires-Dist: sqlalchemy>=2.0; extra == 'evals'
Provides-Extra: mcp
Requires-Dist: httpx2<3,>=2.12; extra == 'mcp'
Requires-Dist: jsonschema<5,>=4.23; extra == 'mcp'
Requires-Dist: mcp<3,>=2.1.1; extra == 'mcp'
Requires-Dist: referencing<1,>=0.36; extra == 'mcp'
Description-Content-Type: text/markdown

# Martian SDK

One Python SDK for agent evaluations and adversarial testing.

- `martian.evals`: pinned datasets, local MLflow evaluation, Backend-scored
  regression gates and recorded CI sessions.
- `martian.redteam`: adversarial probes against a customer callback, with
  simulation and judging through the Martian Backend API.
- `assert_redteam(...)`: record saved adversarial probe results alongside
  dataset and quality checks in one eval session.
- `martian ci`: one persisted session for evals, redteam, or both, with typed Python results.

The distribution is `martian-sdk`; install its `evals` extra for both modules.
Use an available PyPI release or a validated wheel. Hosted use requires
compatible Backend SDK APIs and authorized tenant credentials.

```bash
uv sync --locked --extra evals
uv run --extra evals martian --help
uv run --extra evals martian redteam validate examples/config.yaml
# In the customer checkout, after configuring the Backend origin and one Martian API token:
martian ci --evals-path tests/evals --redteam-config redteam.yaml --output results
```

[Unified SDK and CI](https://github.com/MorningHQ/martian-redteam/blob/main/docs/sdk-and-ci.md) documents imports, the shared connection,
installation, the combined gate, compatibility and rollout limits.
[Documentation index](https://github.com/MorningHQ/martian-redteam/blob/main/docs/README.md) covers the existing redteam contracts.

The wheel retains `martian_redteam`, `martian_evals_kit` and `martian-redteam`
for existing integrations. Both test engines run in the customer's process.
The Backend admits and stores customer work; Agents owns redteam simulation and judging.
The same Backend API key authorizes both modules when granted the required capabilities.

## Development

```bash
uv sync --locked --extra evals
uv run --extra evals ruff format --check src tests examples
uv run --extra evals ruff check src tests examples
uv run --extra mcp --extra evals mypy src
uv run --extra evals pytest -q
uv build
```

The existing eval regression suite has moved into this SDK's CI. Tests use
local MLflow and loopback service fixtures; hosted/paid execution is a separate
qualification. See [development](https://github.com/MorningHQ/martian-redteam/blob/main/docs/development.md).

## License

Apache-2.0. See [LICENSE](https://github.com/MorningHQ/martian-redteam/blob/main/LICENSE)
and [NOTICE](https://github.com/MorningHQ/martian-redteam/blob/main/NOTICE).
