Skip to main content

DynamoDB dtore for LangGraph

Project description

LangGraph DynamoDB Store

A DynamoDB-based store implementation for LangGraph that allows long term memory implementation.

This implements both sync and async methods for BaseStore

bash pip install langgraph-store-dynamodb

Usage

Basic Initialization

python from langgraph_store_dynamodb import DynamoDBStore

Initialize the store with a table name

store = DynamoDBStore( table_name="your-dynamodb-table-name", max_read_request_units=10, # Optional, default is 10 max_write_request_units=10 # Optional, default is 10 )

Alternative Initialization Using Context Manager

from langgraph_dynamodb_checkpoint import DynamoDBStore

with DynamoDBStore.from_conn_info(table_name="your-dynamodb-table-name") as store:
    # Use the store here

Parameters

DynamoDBStore Constructor

  • table_name (str): Name of the DynamoDB table to use for storing checkpoints
  • max_read_request_units (int, optional): Maximum read request units for the DynamoDB table. Defaults to 10
  • max_write_request_units (int, optional): Maximum write request units for the DynamoDB table. Defaults to 10

Table Structure

The store automatically creates a DynamoDB table if it doesn't exist, with the following structure:

  • Partition Key (PK): String type, used for namespace
  • Sort Key (SK): String type, used for memory key

AWS Configuration

Ensure you have proper AWS credentials configured either through:

  • Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
  • AWS credentials file (~/.aws/credentials)
  • IAM role when running on AWS services

The AWS credentials should have permissions to:

  • Create DynamoDB tables (if table doesn't exist)
  • Read and write to DynamoDB tables

Notes

  • The store automatically creates the DynamoDB table if it doesn't exist
  • Uses on-demand billing mode for DynamoDB
  • Implements methods required by the LangGraph BaseStore interface

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_dynamodb-0.1.2.tar.gz (6.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_dynamodb-0.1.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file langgraph_store_dynamodb-0.1.2.tar.gz.

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8d2beab7d3e29cfac7e07e7a86ad0c00ff787021973d4a1cbf4e4a05278f48b9
MD5 b5cee2815561512283d315c6158fbae6
BLAKE2b-256 2f3661767be80c8b94fff3fbe76ac7707e0111fa33a8d79fb282767e0b326f79

See more details on using hashes here.

File details

Details for the file langgraph_store_dynamodb-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 78440f7076ae39badda6e8e88327e7432a412e7c3f768b796c63633d87acb4e7
MD5 d435604dec8b312c1973758f9dd3d2a1
BLAKE2b-256 ea13d5d50266e9c7fe87d697fec9916dee9a8e6b38eaa84ccd2efa86f2e4fa2c

See more details on using hashes here.

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