This is an early release preview. You may encounter bugs.
Browser Use Agent SDK logo
Unclaimed

Framework interface

Browser Use Agent SDK

The simplest possible agent framework — an agent is just a for-loop of tool calls.

D 9/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Browser Use Agent SDK.

bu-agent-sdk is the Python agent framework behind BU.app from Browser Use. Its design position is that the value lies in the model, not in framework abstractions: an agent is a loop that sends messages to an LLM, executes the tool calls it returns, and repeats until an explicit exit. The library gives you that loop, a @tool decorator, and thin LLM clients, and little else.

Tools are async Python functions decorated with a description. Completion is explicit: a done tool raises TaskComplete, and require_done_tool=True prevents the agent from stopping just because a turn produced no tool calls. Each provider client is about 300 lines behind one BaseChatModel interface, so you can swap ChatAnthropic, ChatOpenAI, and ChatGoogle without touching agent code.

Context management is built in. Tools can be marked ephemeral=N so only the last N outputs (such as browser state or screenshots) stay in the conversation, and a CompactionConfig triggers automatic summarization when the context approaches a threshold ratio of the window. An included example builds a sandboxed coding assistant with file, grep, edit, and todo tools in about 100 lines.

  • For-loop agent: Agent(llm=..., tools=[...]) with query() for a final result
  • Tool decorator: @tool("description") on async functions, with typed parameters
  • Done tool pattern: explicit completion through TaskComplete and require_done_tool
  • Ephemeral messages: keep only the last N outputs of large tools
  • Context compaction: auto-summarize at a configurable threshold of the context limit
  • Dependency injection: FastAPI-style Depends with Annotated types for resources such as database or sandbox context
  • Streaming events: query_stream() yields ToolCallEvent, ToolResultEvent, and FinalResponseEvent
  • Provider clients: Anthropic, OpenAI, and Google behind one interface
  • Examples: a sandboxed Claude Code-style assistant and a dependency-injection demo

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Browser Use Agent SDK.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Browser Use Agent SDK →

Browse the catalog