← CookbookView source on GitHub ↗

AWS Strands

AWS Strands Starter Agent

A simple demonstration of using the Strands library with Nebius Token Factory's API to create an AI assistant that can fetch weather information.

Features

Prerequisites

Environment Variables

The application requires the following environment variable. You can create a .env file in the project root to store it.

Installation

  1. Clone this repository and navigate to the agent's directory.

    bash cd agents/aws-strands-weather-agent 2. Create a virtual environment and install dependencies using uv:

    ```bash

    Create a virtual environment

    uv venv

    Activate the virtual environment

    source .venv/bin/activate

    Install dependencies from pyproject.toml and uv.lock

    uv sync ```

  2. Create a .env file and add your NEBIUS_API_KEY.

    NEBIUS_API_KEY="your-nebius-api-key"

Usage

Run the main script:

uv run agent.py

The script will:

  1. Create a weather assistant agent.
  2. Ask the agent to compare the temperature in New York and Chicago for the upcoming weekend.
  3. Output the assistant's response.

Customization

You can modify the agent.py file to: