text: Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryCassandra Chat Message HistoryDynamodb Chat Message HistoryEntity Memory with SQLite storageMomento Chat Message HistoryMongodb Chat Message HistoryMotÃ¶rhead MemoryMotÃ¶rhead Memory (Managed)Postgres Chat Message HistoryRedis Chat Message HistoryZep MemoryRetrieversText embedding modelsAgent toolkitsToolsVector storesGrouped by providerIntegrationsMemoryDynamodb Chat Message HistoryOn this pageDynamodb Chat Message HistoryThis notebook goes over how to use Dynamodb to store chat message history.First make sure you have correctly configured the AWS CLI. Then make sure you have installed boto3.Next, create the DynamoDB Table where we will be storing messages:import boto3# Get the service resource.dynamodb = boto3.resource("dynamodb")# Create the DynamoDB table.table = dynamodb.create_table(    TableName="SessionTable",    KeySchema=[{"AttributeName": "SessionId", "KeyType": "HASH"}],    AttributeDefinitions=[{"AttributeName": "SessionId", "AttributeType": "S"}],    BillingMode="PAY_PER_REQUEST",)# Wait until the table exists.table.meta.client.get_waiter("table_exists").wait(TableName="SessionTable")# Print out some data about the table.print(table.item_count)    0DynamoDBChatMessageHistoryâ€‹from langchain.memory.chat_message_histories import DynamoDBChatMessageHistoryhistory = DynamoDBChatMessageHistory(table_name="SessionTable", session_id="0")history.add_user_message("hi!")history.add_ai_message("whats up?")history.messages    [HumanMessage(content='hi!', additional_kwargs={}, example=False),     AIMessage(content='whats