Skip to main content

LangGraph BaseStore backend for Pixeltable — persistent, versioned, multimodal agent memory.

Project description

langgraph-store-pixeltable

LangGraph BaseStore backend for Pixeltable — persistent, versioned, multimodal agent memory.

Why Pixeltable for LangGraph Memory?

Feature PostgresStore PixeltableStore
Persistence Yes Yes + versioned
Vector search pgvector only Any embedding model
Multimodal values JSON only Image, Video, Audio via .table
Incremental embedding Manual Automatic via computed columns
History No Full version history per row
Computed columns No Arbitrary UDFs with lineage
External service Requires PostgreSQL + pgvector Embedded, no Docker

Installation

pip install langgraph-store-pixeltable

Quick Start

from langgraph.store.pixeltable import PixeltableStore

store = PixeltableStore(table_name="agent_memory.items")
store.setup()

# Store a memory
store.put(("users", "alice"), "prefs", {"color": "blue", "language": "Python"})

# Retrieve it
item = store.get(("users", "alice"), "prefs")
print(item.value)  # {"color": "blue", "language": "Python"}

# Search within a namespace
results = store.search(("users",), filter={"color": "blue"})

# List namespaces
namespaces = store.list_namespaces(prefix=("users",))

Semantic Search

from sentence_transformers import SentenceTransformer

model = SentenceTransformer("all-MiniLM-L6-v2")

store = PixeltableStore(
    table_name="agent_memory.semantic",
    index={
        "dims": 384,
        "embed": lambda texts: model.encode(texts).tolist(),
        "fields": ["text"],
    },
)
store.setup()

store.put(("docs",), "d1", {"text": "Pixeltable handles multimodal data"})
store.put(("docs",), "d2", {"text": "LangGraph builds stateful agents"})
store.put(("docs",), "d3", {"text": "Python is great for AI"})

results = store.search(("docs",), query="multimodal AI pipelines", limit=2)
for r in results:
    print(f"{r.key}: {r.value['text']} (score={r.score:.3f})")

With LangGraph Agents

from langgraph.prebuilt import create_react_agent
from langgraph.store.pixeltable import PixeltableStore

store = PixeltableStore(table_name="agent_memory.items")
store.setup()

agent = create_react_agent(model, tools=tools, store=store)

.table Escape Hatch

Access the raw Pixeltable table for computed columns, UDFs, and multimodal lineage:

import pixeltable as pxt

t = store.table  # the underlying Pixeltable table
t.add_computed_column(value_length=t.value['text'].apply(len), if_exists='ignore')
rows = t.select(t.key, t.value, t.value_length).collect()

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langgraph_store_pixeltable-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langgraph_store_pixeltable-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_store_pixeltable-0.1.0.tar.gz.

File metadata

File hashes

Hashes for langgraph_store_pixeltable-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f34e0df0a0d8264ef59b6939d43d96ba3ab6d3b31d5f2723d20633882050190
MD5 a636ea348b269d14f1ca2bcdfe3343ae
BLAKE2b-256 219e118aad7eb6701c0c1148b9205024124fef8f37408842dc9b556e22fdabe8

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_store_pixeltable-0.1.0.tar.gz:

Publisher: release.yml on pixeltable/langgraph-store-pixeltable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file langgraph_store_pixeltable-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_store_pixeltable-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c6e1af4582acb667e5c95da203249bc54f61486776865cfc867dd266df32fdc
MD5 63e1e760efd371cdd2b261e7bc1c058f
BLAKE2b-256 b44dadc63881cde12a35a83fb8a235a32f725e9cafbffbb2daccbe34dc5c38c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for langgraph_store_pixeltable-0.1.0-py3-none-any.whl:

Publisher: release.yml on pixeltable/langgraph-store-pixeltable

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page