/ 3 min read / Nikola Balic

Eight ways to build a browser agent

New framework starters in the Steel cookbook, all solving the same browser task.

We landed eight new starters in the Steel cookbook. Same task, same four tools, same typed output. Different agent loops.

If you've spent an afternoon picking between LangGraph and Pydantic AI and Mastra, you know the marketing pages don't help much. You want two files open side by side, the same task running through each, and a clear read on where each framework gets out of your way and where it doesn't.

That's the cookbook now.

Why one task

The task is github.com/trending/python. It runs in seconds, requires no credentials, and actually needs a browser. The page renders without JavaScript, but the structured-output step makes you exercise tools, schemas, and the agent loop end-to-end. Small enough to not waste your afternoon, real enough to expose real problems.

The scaffolding is identical, so whatever differs is the framework.

The same four tools across every starter means the prompts, schemas, and failure modes are shared too. If a model forgets to open a session on one starter, it forgets on the others.

The recipe

Four tools, same names everywhere:

JavaScript
open_session  -> create a Steel session, connect Playwright over CDP
navigate      -> goto(url), wait for domcontentloaded
snapshot      -> readable text + visible links, capped
extract       -> rows scraped from a CSS selector, returned as JSON

The output is a Zod or Pydantic schema: summary plus an array of {name, url, stars, description}. The model loop runs until the schema validates or the step budget runs out (15 in most starters).

What landed

Python

TypeScript

Pick one and run

Shell
git clone https://github.com/steel-dev/steel-cookbook
cd steel-cookbook/examples/<your-pick>
cp .env.example .env       # STEEL_API_KEY + your model provider key

Python starters use uv (uv sync && uv run main.py). TypeScript starters use npm (npm install && npm start). Each one prints a Live View URL when it opens a session. Paste that into another tab and watch the agent click around.

Try it

We restructured the whole catalog while we were in there. Basics, AI Agents, and Advanced Features, with separate views for TypeScript and Python. There's also AGENTS.md at the repo root: a nav file for AI agents, so your coding assistant can find the right example without you explaining the layout.

These eight are just the framework starters. The catalog also has computer use models, Stagehand, Browser-use, and advanced features like auth context reuse and persistent profiles.

Related posts