Metadata-Version: 2.5
Name: stratl
Version: 0.1.0
Summary: Stratl SDK: record AI decisions as Stratl Record Format (SRF) evidence
Project-URL: Homepage, https://stratl.ai
Project-URL: Documentation, https://docs.stratl.ai/developers/build/python-sdk/
Project-URL: Changelog, https://docs.stratl.ai/reference/changelog/
Author-email: Stratl <hello@stratl.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agents,ai,audit,decision-records,evidence,srf
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: httpx>=0.27
Requires-Dist: jcs>=0.2
Requires-Dist: pydantic>=2.8
Provides-Extra: dev
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# stratl (Python SDK)

```bash
uv add stratl        # or: pip install stratl
```

```python
import stratl

with stratl.decision(agent="claims-triage", subject=("claim", "8843")) as d:
    d.model("anthropic", "claude-sonnet-5", prompt, response)
    d.tool("providers.lookup", args, result)
    d.approval(
        required=True,
        approver="dr.mensah@insurer.rw",
        authority="medical_director",
        decision="approved",
    )
    d.action("claim.deny", target="claim/8843", result="executed")
    d.outcome(adverse=True, category="claim_denial")
```

`stratl.srf` holds the record models and canonicalisation used by the API and the conformance suite.

Whatever you pass in is fingerprinted on your side: strings as UTF-8, `bytes` as they are,
everything else as RFC 8785 canonical JSON. The record carries only the `sha256:` fingerprints;
`Client.submit` uploads the exact bytes that were hashed to the custody store, only the ones it
does not already hold. The TypeScript SDK uses the same rules, so both produce the same
fingerprint for the same content. If Stratl cannot be reached, the record and its content are
spooled to `.stratl-spool/` and `submit` returns `"spooled"`; call `client.flush_spool()` later.
