Skip to main content
DynamoDB is a class that implements the Db interface using Amazon DynamoDB as the backend storage system. It provides scalable, managed storage for agent sessions with support for indexing and efficient querying.
ParameterTypeDefaultDescription
db_clientNone-The DynamoDB client to use.
region_nameoptional[str]-AWS region name.
aws_access_key_idoptional[str]-AWS access key ID.
aws_secret_access_keyoptional[str]-AWS secret access key.
session_tableoptional[str]-The name of the session table.
memory_tableoptional[str]-The name of the memory table.
metrics_tableoptional[str]-The name of the metrics table.
eval_tableoptional[str]-The name of the eval table.
knowledge_tableoptional[str]-The name of the knowledge table.

Methods

upsert_sessions

Bulk upsert multiple sessions for improved performance on large datasets. Parameters:
  • sessions (List[Session]): List of sessions to upsert
  • deserialize (Optional[bool]): Whether to deserialize the sessions. Defaults to True
Returns: List[Union[Session, Dict[str, Any]]]

upsert_memories

Bulk upsert multiple memories for improved performance on large datasets. Parameters:
  • memories (List[UserMemory]): List of memories to upsert
  • deserialize (Optional[bool]): Whether to deserialize the memories. Defaults to True
Returns: List[Union[UserMemory, Dict[str, Any]]]
I