Steel
Steel is an open source browser API that lets you control fleets of browsers in the cloud.
Pair the You.com Web Search API and Contents API with a Steel cloud browser when an agent needs both low-latency web retrieval and real browser actions. The pattern is simple: search first, extract static page content second, and open the browser only when the page requires JavaScript, login state, clicks, filters, or form input.
The Steel cookbook version is available at docs.steel.dev/cookbook/you-com-search, with source code in examples/you-com-search.
How the Agent Routes Work
The agent gets five tools across two tiers:
The Steel session opens lazily inside the browser tools. If the agent answers with search and contents alone, no browser session is created.
Create the You.com Tools
Use the Web Search API for discovery and the Contents API to fetch clean Markdown from the URLs you want the model to read. These tools are plain httpx calls, so they work with any LangChain agent.
Add Lazy Steel Browser Tools
Keep the Steel session behind _ensure_session(). The first browser action creates the session and connects Playwright over Chrome DevTools Protocol (CDP). Later browser tools reuse the same page.
Release the session in a finally block so browser minutes stop even when the agent errors.
Run the LangChain Agent
create_tool_calling_agent turns the tool signatures and docstrings into a tool-calling prompt. AgentExecutor runs the loop until the model returns a text answer or hits the iteration limit.
Set verbose=True for full LangChain traces. If you use LangSmith, set LANGSMITH_API_KEY and LANGSMITH_TRACING=true in your environment.
Run the Steel Cookbook
To run the original cookbook locally:
Get keys from Steel, You.com, and your model provider. New You.com accounts include $100 in credits with no card required.
A cheap-path run prints only You.com tool timings and ends without opening Steel. An escalated run adds open_session, navigate, snapshot, and a Steel replay URL.
Production Notes
- Replace the agent with an explicit pipeline when routing must be repeatable: search, fetch contents for the top URLs, then escalate only when the response is too short or contains text like
Please enable JavaScript. - Add browser actions such as
fill,press,wait_for_selector, andscrollwhen the task needs forms or lazy-loaded content. - Use the Research API instead of
youcom_searchwhen you want You.com to synthesize a cited answer before the browser tier. - Keep the browser tier narrow. Steel is the right tool for live interaction, while the Web Search API and Contents API are faster for discovery and static extraction.
Resources
More copy-and-customize patterns live in Examples.