Metadata-Version: 2.4
Name: substr8-langgraph
Version: 0.1.0
Summary: LangGraph adapter for Substr8 RunProof generation
Author-email: Substr8 Labs <hello@substr8labs.com>
License: MIT
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.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: langgraph>=0.2.0
Requires-Dist: substr8-core>=0.2.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# substr8-langgraph

LangGraph adapter for Substr8 RunProof generation.

## Installation

```bash
pip install substr8-langgraph
```

## Quick Start

```python
from langgraph.graph import StateGraph
from substr8_langgraph import instrument_graph

# Build your graph
graph = StateGraph(...)
compiled = graph.compile()

# Instrument it
instrumented = instrument_graph(
    compiled,
    agent_id="my-agent",
    project="my-project",
)

# Execute - RunProof is generated automatically
result = instrumented.invoke({"input": "hello"})

print(result["run_id"])       # Unique run identifier
print(result["proof_status"]) # "verified" if valid
print(result["proof"])        # Full RunProof object
```

## Features

- **Automatic event capture**: Tool calls, LLM interactions, node transitions
- **Hash chain integrity**: Every event is cryptographically linked
- **Merkle root commitment**: Efficient verification of complete trace
- **Sync & async support**: Works with `invoke()` and `ainvoke()`
- **Streaming support**: Proof emitted as final event

## RunProof Schema

Proofs follow the `runproof/v2` schema. See [docs.substr8labs.com/sdk](https://docs.substr8labs.com/sdk) for details.

## License

MIT
