Amazon Nova Act Python SDK

3.3.316.0 · active · verified Thu Apr 16

Amazon Nova Act is a Python SDK for building and deploying highly reliable AI agents that automate browser-based workflows at scale using natural language. It allows developers to define workflows by combining natural language prompts with Python code, integrate external tools using a decorator, and manage fleets of AI agents. The library is actively developed, with the current version being 3.3.316.0, and receives regular updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize the `NovaAct` client with an API key, navigate to a starting page, and execute a natural language instruction using `nova.act()`. The `NOVA_ACT_API_KEY` environment variable is required for authentication.

import os
from nova_act import NovaAct

# Ensure your Nova Act API key is set as an environment variable
# export NOVA_ACT_API_KEY="your_api_key"
api_key = os.environ.get('NOVA_ACT_API_KEY', '')

if not api_key:
    print("Error: NOVA_ACT_API_KEY environment variable is not set.")
    print("Please visit nova.amazon.com/act to generate an API key and set it: export NOVA_ACT_API_KEY='your_api_key'")
else:
    try:
        with NovaAct(starting_page="https://example.com", api_key=api_key) as nova:
            print("Opening example.com and performing an action...")
            nova.act("Find the main heading on the page and click it.")
            print("Action completed.")
    except Exception as e:
        print(f"An error occurred: {e}")

view raw JSON →