Metadata-Version: 2.4
Name: statehouse
Version: 0.1.0
Summary: Strongly consistent state and memory engine for AI agents
Author: Statehouse Team
License: Proprietary
Project-URL: Homepage, https://statehouse.dev
Project-URL: Documentation, https://github.com/statehouse-dev/statehouse/tree/main/docs
Project-URL: Repository, https://github.com/statehouse-dev/statehouse
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
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
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: grpcio>=1.60.0
Requires-Dist: grpcio-tools>=1.60.0
Requires-Dist: protobuf>=4.25.0
Requires-Dist: click>=8.1.0
Requires-Dist: tabulate>=0.9.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.7.0; extra == "dev"

# Statehouse Python SDK

Python client library for Statehouse - a strongly consistent state and memory engine for AI agents.

## Installation

```bash
pip install statehouse
```

## Quick Start

```python
from statehouse import Statehouse

# Connect to daemon
client = Statehouse(url="localhost:50051")

# Write state
tx = client.begin_transaction()
tx.write(agent_id="agent-1", key="memory", value={"fact": "sky is blue"})
tx.commit()

# Read state
state = client.get_state(agent_id="agent-1", key="memory")
print(state.value)  # {"fact": "sky is blue"}

# Replay events
for event in client.replay(agent_id="agent-1"):
    print(f"[{event.commit_ts}] {len(event.operations)} operations")
```

## Features

- **Clean API**: No gRPC or protobuf visible to users
- **Type-safe**: Full type hints
- **Async & Sync**: Both interfaces supported
- **Pythonic**: Context managers, exceptions, iterators

## Documentation

See [../docs/](../docs/) for project documentation (architecture, API contract, troubleshooting). For the CLI: [docs/CLI.md](docs/CLI.md).
