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
See ../docs/ for project documentation (architecture, API contract, troubleshooting). For the CLI: 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.0.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.0.tar.gz.
File metadata
- Download URL: statehouse-0.1.0.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 |
bfc01f85cef8b5862810267cb977469347484a276805a5ac0a3a2d1d7f41f6cd
|
|
| MD5 |
62f416c910f374e94cd70c060dcd6121
|
|
| BLAKE2b-256 |
3325903c6504fca671c0b747faf7722f17d00c1feafd17b061af173ea66ae8fb
|
File details
Details for the file statehouse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: statehouse-0.1.0-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 |
fb8ccfae5f0d64b97808f2610fc34ea54ef05622ac6c72e94c42f81ca3c25dc8
|
|
| MD5 |
ddd4f61f16eaa465f5aaa3104c4ff728
|
|
| BLAKE2b-256 |
adbe8358890a3a1e7563985986f076b1a163f1d1fdc2516a1857816a4f086871
|