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:
Create a new ticket and store the details in Amazon DynamoDB table.
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
Install or update to the latest version of the AWS CLI.
Get credentials to grant programmatic access.
Visual Studio Code.
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.
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.
.png)
// 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();
}