DEV Community

Cover image for Building My First AI Agent with Strands Agents
Jamal
Jamal

Posted on

Building My First AI Agent with Strands Agents

An agent is a program that uses a large-language model (LLM) to decide which actions to take based on a user's request. Strands Agents wraps this loop into a simple Python API.

If you've been trying to build Agentic AI applications recently, you've probably noticed a major problem: boilerplate overload. Frameworks like LangChain or LangGraph are incredibly powerful, but sometimes you just want a clean, fast, lightweight, and model-agnostic way to build production-ready agents.

Enter Strands Agents—a lean, modern open-source SDK designed to let developers build robust AI agents without the architectural bloat.

In this 4-part series, we are going to explore how to take Strands from a blank screen to a production-grade multi-agent system. Let's get our hands dirty with Part 1!

🚀 Quick Start

1. 🛠️ Prerequisites

Before we write code, let's set up a clean playground.

Make sure you have:

  • Python 3.10+
  • AWS account with access credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) and access granted to the amazon.nova-2-lite-v1 (or another Bedrock model) on Amazon Bedrock
  • uv package manager

2. 🤖 What Is Agentic AI?

Agentic AI refers to autonomous software systems powered by artificial intelligence that can perceive their environment, make decisions, and take actions independently to achieve specific goals.

3. 📦 Installation

Step 1: Clone the Repository

git clone https://github.com/d3vjamal/strands-agents-labs.git
cd strands-agents-labs
Enter fullscreen mode Exit fullscreen mode

*Lab 1: Run your first agent
*

from strands import Agent
from strands_tools import file_read, file_write
from dotenv import load_dotenv
from strands.models.bedrock import BedrockModel
import os

load_dotenv()


bedrock_model = BedrockModel(
    # Set your preferred model ID here (e.g., "global.amazon.nova-2-lite-v1:0")
    model_id="<YOUR_MODEL_ID>",
    region_name="eu-west-2",
    temperature=0.3,
)

system_prompt = "You are a an agent which can read and write files to current directory"

# Create the agent with tools
local_agent = Agent(
    system_prompt=system_prompt, # Define a system Prompt
    model=bedrock_model,
    tools=[file_read, file_write],  # Add your custom tools here
)


local_agent("can you create a weather.md file, with the content about current temperature in kolkata India right now?, if not able find weather put reason of it")
Enter fullscreen mode Exit fullscreen mode

Run your first lab :

uv run labs/01-your-first-agent/agent.py
Enter fullscreen mode Exit fullscreen mode

📖 Background

In this lab the agent is asked to create a markdown file with weather information. Because the agent does not have internet access, it must reason about what it can do (write a file) and what it cannot do (fetch live data) — a great first lesson in tool-aware reasoning.

🔑 Key Concepts

Concept Description
Agent The core class that ties together a model, tools, and a system prompt
system_prompt Instructions that shape the agent's personality and capabilities
BedrockModel Model provider connecting to Amazon Bedrock
file_read / file_write Built-in Strands tools for local file operations
load_dotenv() Loads AWS credentials from a .env file

Part 2 : HTTP tool integration

Top comments (0)