langgraph-singlestore
SingleStore-backed persistence for LangGraph:
long-term memory (BaseStore) and, in progress, graph checkpointing
(BaseCheckpointSaver).
Status
| Component | Status |
|---|---|
langgraph.store.singlestore.SingleStoreStore |
Implemented — CRUD, TTL sweeper, namespace listing, optional vector search. |
langgraph.store.singlestore.AsyncSingleStoreStore |
Implemented — async wrapper over the sync store via the default executor. |
langgraph.checkpoint.singlestore.SingleStoreSaver |
Scaffolding — raises NotImplementedError. |
langgraph.checkpoint.singlestore.AsyncSingleStoreSaver |
Scaffolding — raises NotImplementedError. |
Installation
pip install langgraph-singlestore
Store quickstart
from langgraph.store.singlestore import SingleStoreStore
store = SingleStoreStore(
host="127.0.0.1",
port=3306,
user="root",
password="",
database="langgraph",
)
store.setup() # idempotent; applies pending migrations
store.put(("users", "u1"), key="profile", value={"name": "Ada"})
item = store.get(("users", "u1"), key="profile")
Callers may pass any one of:
- an existing
singlestoredb.Connectionviaconnection=..., - an existing SQLAlchemy
Poolviaconnection_pool=..., or - plain connection kwargs (
host,user, ...) — an internalQueueConnectionPoolis built lazily.
connection and connection_pool are mutually exclusive.
TTL
Pass a TTLConfig and start the background sweeper to expire items:
from langgraph.store.base import TTLConfig
store = SingleStoreStore(ttl_config=TTLConfig(...), **conn_kwargs)
store.setup()
store.start_ttl_sweeper()
# ...
store.stop_ttl_sweeper()
Vector search
Pass an index config with dims, embed, and an ann_index_config
to enable semantic search():
from langgraph.store.singlestore import SingleStoreStore
from singlestore_langchain_core import ANNIndexConfig
store = SingleStoreStore(
index={
"dims": 1536,
"embed": my_embeddings,
"ann_index_config": ANNIndexConfig(...),
},
**conn_kwargs,
)
store.setup()
results = store.search(("docs",), query="what is singlestore?")
Async
AsyncSingleStoreStore exposes the same constructor and shares the sync
class's state; async methods delegate to the sync implementation via the
default executor.
from langgraph.store.singlestore import AsyncSingleStoreStore
store = AsyncSingleStoreStore(**conn_kwargs)
await store.asetup()
await store.aput(("users", "u1"), key="profile", value={"name": "Ada"})
Checkpoint saver
SingleStoreSaver / AsyncSingleStoreSaver are placeholders today: the
constructors accept configuration but every I/O method raises
NotImplementedError. Track progress in CHANGELOG.md.
Layout
This package uses PEP 420 namespace packages under langgraph.checkpoint.*
and langgraph.store.*, matching the layout used by
langgraph-checkpoint-postgres and friends. Shared connection, filter, and
index helpers live in
singlestore-langchain-core.
Development
make lint
make test # unit tests, sockets disabled
make integration_tests # boots a SingleStore container via singlestoredb
Release files for langgraph-singlestore 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langgraph_singlestore-0.1.0.tar.gz | 19.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langgraph_singlestore-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.1 kB
Release files / langgraph_singlestore-0.1.0.tar.gz
| Download URL | langgraph_singlestore-0.1.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84776f2ee58310b536f9ca0ebddd8f87f152fb1b483a705cf91f92a8a074af00
|
|
BLAKE2b-256 checksum How to use checksums |
e6988d924ac4776bd8b6c3cb99642bf7130562698620eeca045655786d2d10c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.11.16 Linux/6.17.0-1022-azure
|
Release files / langgraph_singlestore-0.1.0-py3-none-any.whl
| Download URL | langgraph_singlestore-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4acea37d2d10d5acfabbcb9ac40c05c3d65ad2a03fecbbf6d6899e691c7e4f8
|
|
BLAKE2b-256 checksum How to use checksums |
13b50ace6f37afa8785f7a6d5ed2ee9753908f9ff2a32a1663053ee8c031b683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.3 CPython/3.11.16 Linux/6.17.0-1022-azure
|