Notte
Notte provides all the essential tools for building and deploying AI agents that interact seamlessly with the web. This integration connects Notte with Steel's infrastructure, allowing for seamless automation of web tasks and workflows in the cloud.

This guide shows how to use Notte with Steel to run a simple task in a live cloud browser, then shut everything down safely.
Requirements
-
Steel API key
-
Gemini API key
-
Python 3.11+
Step 1: Project Setup
Create a virtual environment and a minimal project:
python3 -m venv .venv && \
source .venv/bin/activate && \
mkdir notte-steel && cd notte-steel && \
touch main.py .env
Step 2: Install Dependencies
pip install steel-sdk notte python-dotenv
Step 3: Environment Variables
Create a .env
file with your API keys and a default task:
STEEL_API_KEY=your-steel-api-key-here
GEMINI_API_KEY=your-gemini-api-key-here
TASK="Go to Wikipedia and search for machine learning"
Step 4: Initialize Steel & Notte, then Connect via CDP
Set up Steel, load env vars, and prepare to start the Notte agent.
# main.py
import os
import time
import asyncio
from dotenv import load_dotenv
from steel import Steel
import notte
load_dotenv()
# Replace with your own API keys
STEEL_API_KEY = os.getenv("STEEL_API_KEY") or "your-steel-api-key-here"
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY") or "your-gemini-api-key-here"
# Replace with your own task
TASK = os.getenv("TASK") or "Go to Wikipedia and search for machine learning"
Step 5: Run a Notte Agent Task
Create a Steel session, connect Notte via CDP, run your task, and print the result.
async def main():
print("๐ Steel + Notte Assistant")
print("=" * 60)
if STEEL_API_KEY == "your-steel-api-key-here":
print("โ ๏ธ WARNING: Please replace 'your-steel-api-key-here' with your actual Steel API key")
print(" Get your API key at: https://app.steel.dev/settings/api-keys")
return
if GEMINI_API_KEY == "your-gemini-api-key-here":
print("โ ๏ธ WARNING: Please replace 'your-gemini-api-key-here' with your actual Gemini API key")
print(" Get your API key at: https://console.cloud.google.com/apis/credentials")
return
print("\nStarting Steel browser session...")
client = Steel(steel_api_key=STEEL_API_KEY)
try:
session = client.sessions.create()
print("โ
Steel browser session started!")
print(f"View live session at: {session.session_viewer_url}")
print(
f"\033[1;93mSteel Session created!\033[0m\n"
f"View session at \033[1;37m{session.session_viewer_url}\033[0m\n"
)
cdp_url = f"{session.websocket_url}&apiKey={STEEL_API_KEY}"
start_time = time.time()
print(f"๐ฏ Executing task: {TASK}")
print("=" * 60)
try:
with notte.Session(cdp_url=cdp_url) as notte_session:
agent = notte.Agent(
session=notte_session,
max_steps=5,
reasoning_model="gemini/gemini-2.0-flash"
)
response = agent.run(task=TASK)
duration = f"{(time.time() - start_time):.1f}"
print("\n" + "=" * 60)
print("๐ TASK EXECUTION COMPLETED")
print("=" * 60)
print(f"โฑ๏ธ Duration: {duration} seconds")
print(f"๐ฏ Task: {TASK}")
if response:
print(f"๐ Result:\n{response.answer}")
print("=" * 60)
except Exception as e:
print(f"โ Task execution failed: {e}")
finally:
if session:
print("Releasing Steel session...")
client.sessions.release(session.id)
print(f"Session completed. View replay at {session.session_viewer_url}")
print("Done!")
except Exception as e:
print(f"โ Failed to start Steel browser: {e}")
print("Please check your STEEL_API_KEY and internet connection.")
if __name__ == "__main__":
asyncio.run(main())
Run It
npm run start
Youโll see a session viewer URL in your console, open it to watch the automation live.
Full Example
Complete main.py
you can paste and run:
"""
AI-powered browser automation using notte-sdk with Steel browsers.
https://github.com/steel-dev/steel-cookbook/tree/main/examples/steel-notte-starter
"""
import os
import time
import asyncio
from dotenv import load_dotenv
from steel import Steel
import notte
load_dotenv()
# Replace with your own API keys
STEEL_API_KEY = os.getenv("STEEL_API_KEY") or "your-steel-api-key-here"
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY") or "your-gemini-api-key-here"
# Replace with your own task
TASK = os.getenv("TASK") or "Go to Wikipedia and search for machine learning"
async def main():
print("๐ Steel + Notte Assistant")
print("=" * 60)
if STEEL_API_KEY == "your-steel-api-key-here":
print("โ ๏ธ WARNING: Please replace 'your-steel-api-key-here' with your actual Steel API key")
print(" Get your API key at: https://app.steel.dev/settings/api-keys")
return
if GEMINI_API_KEY == "your-gemini-api-key-here":
print("โ ๏ธ WARNING: Please replace 'your-gemini-api-key-here' with your actual Gemini API key")
print(" Get your API key at: https://console.cloud.google.com/apis/credentials")
return
print("\nStarting Steel browser session...")
client = Steel(steel_api_key=STEEL_API_KEY)
try:
session = client.sessions.create()
print("โ
Steel browser session started!")
print(f"View live session at: {session.session_viewer_url}")
print(
f"\033[1;93mSteel Session created!\033[0m\n"
f"View session at \033[1;37m{session.session_viewer_url}\033[0m\n"
)
cdp_url = f"{session.websocket_url}&apiKey={STEEL_API_KEY}"
start_time = time.time()
print(f"๐ฏ Executing task: {TASK}")
print("=" * 60)
try:
with notte.Session(cdp_url=cdp_url) as notte_session:
agent = notte.Agent(
session=notte_session,
max_steps=5,
reasoning_model="gemini/gemini-2.0-flash"
)
response = agent.run(task=TASK)
duration = f"{(time.time() - start_time):.1f}"
print("\n" + "=" * 60)
print("๐ TASK EXECUTION COMPLETED")
print("=" * 60)
print(f"โฑ๏ธ Duration: {duration} seconds")
print(f"๐ฏ Task: {TASK}")
if response:
print(f"๐ Result:\n{response.answer}")
print("=" * 60)
except Exception as e:
print(f"โ Task execution failed: {e}")
finally:
if session:
print("Releasing Steel session...")
client.sessions.release(session.id)
print(f"Session completed. View replay at {session.session_viewer_url}")
print("Done!")
except Exception as e:
print(f"โ Failed to start Steel browser: {e}")
print("Please check your STEEL_API_KEY and internet connection.")
if __name__ == "__main__":
asyncio.run(main())
Next Steps
-
Session Lifecycles: https://docs.steel.dev/overview/sessions-api/session-lifecycle
-
Steel Sessions API: https://docs.steel.dev/overview/sessions-api/overview
-
Steel Python SDK: https://github.com/steel-dev/steel-python
-
Cookbook example: https://github.com/steel-dev/steel-cookbook/tree/main/examples/steel-notte-starter
-
Notte Documentation: https://docs.notte.cc/intro/what-is-notte