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

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

python from langgraph_dynamodb_checkpoint import DynamoDBStore

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

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.1.tar.gz (5.0 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.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fc28422c50ef773e6aec2e697aef51c7e0b527f2df0f934131b7d7e92e22086a
MD5 5de8d396cec72fed40a93cd876c4a751
BLAKE2b-256 08886099ef76d77e923c292858f39c77a54d3918e8f2d2e4af14313c00c4bdbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 036952d2432faeaea12f2abd0d87004c631712f18466f63ce71d64ce40b13ed4
MD5 b4d76d512baacba798c30ab17e0cdd1d
BLAKE2b-256 d60d24053954b118d90d0ab8bde5cadd7b5729d910550a1c9d2c9c1a03ca149c

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