> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-scavio-google-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DynamoDB

> Store agent sessions and run history in DynamoDB with DynamoDb.

`DynamoDb` stores Agent sessions and run history in [DynamoDB](https://aws.amazon.com/dynamodb/).

## Usage

Install the `boto3` and `openai` packages:

```shell theme={null}
uv pip install boto3 openai
```

Pass a configured DynamoDB client as `db_client`, or set all three 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.

On first use, `DynamoDb` creates missing tables with provisioned capacity. The client or credentials must allow table creation and read/write operations.

```python dynamo_for_agent.py theme={null}
from agno.agent import Agent
from agno.db.dynamo import DynamoDb

db = DynamoDb()

agent = Agent(db=db)
```

`region_name`, `aws_access_key_id`, and `aws_secret_access_key` accept the same values directly.

## Parameters

<Snippet file="db-dynamodb-params.mdx" />
