Build a browser agent with Agno
Integrate Steel with the Agno agent framework.
Scaffolds a starter project locally. Requires the Steel CLI.
Agno's primitive is Agent(model=..., tools=[...]). Tools are typed Python methods grouped into a Toolkit subclass; docstrings and type hints become the JSON schema the model sees.
This recipe wraps a Steel browser in a SteelTools toolkit, hands it to an Agent, and lets the model drive the session by picking which method to call and filling in arguments on its own.
tools = SteelTools(api_key=STEEL_API_KEY)agent = Agent(name="Web Scraper",model=OpenAIChat(id="gpt-5-nano", api_key=OPENAI_API_KEY),tools=[tools],instructions=["Extract content clearly and format nicely","Always close sessions when done",],markdown=True,)response = agent.run(TASK)
SteelTools subclasses agno.tools.Toolkit and registers four bound methods (navigate_to, screenshot, get_page_content, close_session). _ensure_session and _initialize_browser defer the Steel session and Playwright connection until the first tool call, so a task that doesn't need a browser never creates one.
Run it
cd examples/agnocp .env.example .env # set STEEL_API_KEY and OPENAI_API_KEYuv run main.py
Get keys from app.steel.dev and platform.openai.com. The default task scrapes quotes.toscrape.com across two pages.
Your output varies. Structure looks like this:
Steel + Agno Starter============================================================Results:**Page 1:**1. "The world as we have created it is a process of our thinking..." - Albert Einstein2. "It is our choices, Harry, that show what we truly are..." - J.K. Rowling3. "There are only two ways to live your life..." - Albert Einstein**Page 2:**4. "This life is what you make it..." - Marilyn Monroe5. "It takes courage to grow up and become who you really are." - E.E. CummingsDone!
The finally block in main() calls tools.close_session(), which releases the session even when the agent crashes mid-run.
Make it yours
- Change the task. Set
TASKin.envor edit the default inmain.py. - Add tools. Append any method to the
toolslist inSteelTools.__init__:click_selector(selector),fill_form(field, value),wait_for_text(text). Typed signature plus docstring, Agno handles the rest. - Turn on stealth. Pass flags to
self.client.sessions.create()inside_ensure_session:use_proxy=True,solve_captcha=True,session_timeout=600000. - Swap the model.
OpenAIChat(id="gpt-5-nano", ...)is cheap and fast. Agno also shipsagno.models.anthropic.Claudeand others; the toolkit stays the same.
Related
Related recipes
Deep research with Claude Agent SDK subagents
Lead orchestrator dispatches parallel researcher subagents, each driving its own Steel browser, and synthesizes findings into a cited Markdown report.
Build a browser agent with the Claude Agent SDK
Use Steel with the Claude Agent SDK (TypeScript) to build a tool-using browser agent on Anthropic's first-party agent loop.
Build a typed browser agent with Pydantic AI
Use Steel with Pydantic AI to build typed, provider-agnostic browser agents with dependency injection.