Metadata-Version: 2.4
Name: smolagents-openttt
Version: 0.1.0
Summary: TTTPS Proof-of-Time step callback for smolagents: cryptographic audit-trail timestamps for agent step outputs via the public KPP Provenance API
License: MIT
Project-URL: Homepage, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Repository, https://github.com/Helm-Protocol/OpenTTT
Project-URL: Issues, https://github.com/Helm-Protocol/OpenTTT/issues
Keywords: smolagents,proof-of-time,provenance,temporal-attestation,audit-trail,agent-observability
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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24

# smolagents-openttt

TTTPS Proof-of-Time step callback for [smolagents](https://github.com/huggingface/smolagents).
Attaches a cryptographic audit-trail timestamp (a signed Proof-of-Time receipt)
to each agent `ActionStep.tttps_receipt`, sealed against the public self-serve
[KPP Provenance API](https://kpp.kenosian.com).

This attaches a cryptographic audit-trail timestamp and integrity hash. It does
**not** certify legal or regulatory compliance (EU AI Act, FDA, and so on).
Treat it as an audit-trail timestamp, not a compliance claim.

Note: this package only depends on `httpx`, not `smolagents` itself. The
callback is duck-typed against `memory_step.model_output` so it has no import
dependency on smolagents' internals. You still need `smolagents` installed in
your own project to actually get `step_callbacks` invoked.

## Install

```bash
pip install smolagents-openttt
```

## Usage

```python
from smolagents import CodeAgent
from smolagents_openttt import ttts_pot_step_callback_kpp_live

agent = CodeAgent(
    tools=[],
    model=your_model,
    step_callbacks=[ttts_pot_step_callback_kpp_live],
)
result = agent.run("your task")

for step in agent.memory.steps:
    print(getattr(step, "tttps_receipt", None))
    # {"status": "ok", "receipt_id": "...", "receipt": "...", "time": "...", ...}
```

Set `KPP_API_KEY` (mint one for free via `POST https://kpp.kenosian.com/v1/keys`)
and optionally `KPP_BASE` / `KPP_TIMEOUT_S` as environment variables.

Fail-open: any network/upstream error degrades the receipt to
`{"status": "degraded", ...}`. It never raises, and the step's
`model_output`/`observations`/`action_output` are never touched.

## License

MIT
