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.3.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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cff4544ddce95a7b4112513c3e173faa7bb6f94813014f8711f5ffedb7402cdc
MD5 8a4daa79a06cdf6bdfd3a05dc08e0984
BLAKE2b-256 4e7dea96dc7b01d44bbebbf1b22b3ebc532e22b889f1dd93b0f3c26b5b793361

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 271b07543fe8ac9c9d5c1be89558a19f1178a00adc9ff5938e7a6dffdd344c27
MD5 d7ecddccdbe0cec79b467659abaade08
BLAKE2b-256 b194263165b008a05915e92f1f9e58461d0e713fcc287238de74e9bf36bc8f26

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