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

Install package

pip install langgraph-store-dynamodb

Usage

Basic Initialization

from langgraph_store_dynamodb import DynamoDBStore

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.4.tar.gz
Algorithm Hash digest
SHA256 98cfe55cdb9a9b4bee870ec45c5a8da728522057e1173ef3e7703252ff5be51e
MD5 2446e264f009ff771de6d5b40d9dabd5
BLAKE2b-256 edc2ff2ce2dbe709dd3c59dc07ab50aac59b15a39c67d87a62bfe43001f8949e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langgraph_store_dynamodb-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb0ba77db709a46b9bbe2f68b363643ef7ee8ee2b39cef7b135317a588a273b
MD5 7321d7824e3026e97c8f4f32c28979e1
BLAKE2b-256 2ef58a96d10a1be6f1774d8cd7a755c66c0d460fafd365acad0e787e9336f6b3

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