JavaScript  

Build an Agentic AI Assistant with Strands Agents SDK and Amazon DynamoDB

Introduction

Strands Agents is an open-source SDK that simplifies the development of AI agents capable of using tools, making decisions, and automating workflows — moving far beyond basic chatbot interactions.

In this article, you'll learn how to build an Agentic AI Assistant using the Strands Agents SDK, integrated with Amazon DynamoDB, to manage support tickets. The assistant will support ticket creation, updates, and retrieval in real time. In this example, you'll build an AI agent that can:

  1. Create a new ticket and store the details in Amazon DynamoDB table.

  2. Retrieve and update the ticket details in the Amazon DynamoDB table.

We'll use Strands Agents SDK to define this agent and leverage the @tool decorator approach to define tools that securely connect to DynamoDB.

Note: The default model provider is Amazon Bedrock, and the default model is Claude 3.7 Sonnet in the US Oregon (us-west-2) region.

Prerequisites

  1. Install or update to the latest version of the AWS CLI.

  2. Get credentials to grant programmatic access.

  3. Visual Studio Code.

  4. Access to Amazon Bedrock foundation model. The default model provider is Amazon Bedroc,k and the default model is Claude 3.7 Sonnet in the US Oregon (us-west-2) region.

  5. Create a table in Amazon DynamoDB named "support_tickets", with "ticket_id" as the primary key.

Create an agent using Strands Agents SDK

Perform the following steps to create and configure an agent using Strands Agents SDK.

ChatGPT Image Jul 23, 2025, 06_42_17 PM (1)

// middleware.js
import { NextResponse } from 'next/server';

export function middleware(request) {
  const token = request.cookies.get('token')?.value;
  const url = request.nextUrl.clone();

  if (!token && url.pathname.startsWith('/dashboard')) {
    url.pathname = '/login';
    return NextResponse.redirect(url);
  }

  return NextResponse.next();
}