Skip to main content
Agno supports using DynamoDB as a database with the DynamoDb class.

Usage

Install the boto3 and openai packages:
To connect to DynamoDB, you will need valid AWS credentials. You can set them as environment variables:
  • AWS_REGION: The AWS region to connect to.
  • AWS_ACCESS_KEY_ID: Your AWS access key ID.
  • AWS_SECRET_ACCESS_KEY: Your AWS secret access key.
dynamo_for_agent.py

Params

ParameterTypeDefaultDescription
idOptional[str]-The ID of the database instance. UUID by default.
db_clientOptional[Any]-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.
culture_tableOptional[str]-The name of the cultural knowledge table.
traces_tableOptional[str]-The name of the traces table.
spans_tableOptional[str]-The name of the spans table.