Agno supports using DynamoDB as a storage backend for Agents using the DynamoDb class.

Usage

You need to provide aws_access_key_id and aws_secret_access_key parameters to the DynamoDb class.
dynamo_for_agent.py
from agno.db.dynamo import DynamoDb

# AWS Credentials
AWS_ACCESS_KEY_ID = getenv("AWS_ACCESS_KEY_ID")
AWS_SECRET_ACCESS_KEY = getenv("AWS_SECRET_ACCESS_KEY")

db = DynamoDb(
    region_name="us-east-1",
    # aws_access_key_id: AWS access key id
    aws_access_key_id=AWS_ACCESS_KEY_ID,
    # aws_secret_access_key: AWS secret access key
    aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
)

# Add storage to the Agent
agent = Agent(db=db)

Params

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.

Developer Resources