Strongly consistent state and memory engine for AI agents
Project description
Statehouse Python SDK
Python client library for Statehouse - a strongly consistent state and memory engine for AI agents.
Installation
pip install statehouse
Quick Start
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
- Project docs (architecture, API contract, troubleshooting): github.com/statehouse-dev/statehouse/tree/main/docs
- CLI reference: python/docs/CLI.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
statehouse-0.1.1.tar.gz
(16.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file statehouse-0.1.1.tar.gz.
File metadata
- Download URL: statehouse-0.1.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b22577027e7ca6526c97ce5f50793935f38f9aacafec2924429b24346524339
|
|
| MD5 |
25d8c87c76432310d420f5c3b46b1dcd
|
|
| BLAKE2b-256 |
101e7b09487d9eaa0634469aca12bfbf274025bb341c51b65604cb3d42f27b20
|
File details
Details for the file statehouse-0.1.1-py3-none-any.whl.
File metadata
- Download URL: statehouse-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b91d5f8e4cc08e70ea5513d50cdb991eb2fa2c922900556958acd37960d689e
|
|
| MD5 |
1d2e7aeb4fd05929e3500f6d32378c04
|
|
| BLAKE2b-256 |
afbaf45c5c64a15dba2d12bd1c543d2247d22f9c6e47ccef41d5324aaf1f5b19
|