MCPcopy Create free account

hub / github.com/browser-use/agent-sdk / types & classes

Types & classes64 in github.com/browser-use/agent-sdk

↓ 21 callersClassUserMessage
bu_agent_sdk/llm/messages.py:213
↓ 16 callersClassToolMessage
Message containing tool execution result. This is used to send tool results back to the model after it has made a tool call. - OpenAI: Serialized a
bu_agent_sdk/llm/messages.py:337
↓ 15 callersClassAssistantMessage
bu_agent_sdk/llm/messages.py:274
↓ 11 callersClassDepends
Dependency injection marker, similar to FastAPI's Depends. The dependency callable will be invoked when the tool is called, and its return value
bu_agent_sdk/tools/depends.py:29
↓ 11 callersClassFunction
bu_agent_sdk/llm/messages.py:158
↓ 10 callersClassToolCall
bu_agent_sdk/llm/messages.py:178
↓ 8 callersClassModelProviderError
Exception raised when a model provider returns an error.
bu_agent_sdk/llm/exceptions.py:5
↓ 6 callersClassSystemMessage
bu_agent_sdk/llm/messages.py:246
↓ 6 callersClassToolDefinition
Definition of a tool that can be called by the model. This is a provider-agnostic representation that gets serialized appropriately for each
bu_agent_sdk/llm/base.py:16
↓ 3 callersClassChatGoogle
A wrapper around Google's Gemini chat model using the genai client. This class provides tool calling support for Google Gemini models.
bu_agent_sdk/llm/google/chat.py:44
↓ 3 callersClassChatInvokeCompletion
Response from a chat model invocation. For tool calling workflows: - If the model wants to call tools, `tool_calls` will be populated an
bu_agent_sdk/llm/views.py:30
↓ 3 callersClassChatInvokeUsage
Usage information for a chat model invocation.
bu_agent_sdk/llm/views.py:6
↓ 3 callersClassChatOpenAI
A wrapper around AsyncOpenAI that implements the BaseChatModel protocol. This class provides tool calling support for OpenAI models. Ex
bu_agent_sdk/llm/openai/chat.py:25
↓ 3 callersClassCompactionResult
Result of a compaction operation. Attributes: compacted: Whether compaction was performed. original_tokens: Token count b
bu_agent_sdk/agent/compaction/models.py:70
↓ 3 callersClassFinalResponseEvent
Emitted when the agent produces its final response.
bu_agent_sdk/agent/events.py:103
↓ 3 callersClassTextEvent
Emitted when the assistant produces text content.
bu_agent_sdk/agent/events.py:28
↓ 2 callersClassAgent
Simple agentic loop that manages tool calling and message history. The agent will: 1. Send the task to the LLM with available tools
bu_agent_sdk/agent/service.py:99
↓ 2 callersClassModelPricing
Pricing information for a model
bu_agent_sdk/tokens/views.py:53
↓ 2 callersClassModelRateLimitError
Exception raised when a model provider returns a rate limit error.
bu_agent_sdk/llm/exceptions.py:20
↓ 2 callersClassToolResultEvent
Emitted when a tool returns a result.
bu_agent_sdk/agent/events.py:77
↓ 2 callersClassUsageSummary
Summary of token usage and costs
bu_agent_sdk/tokens/views.py:97
↓ 1 callersClassCachedPricingData
Cached pricing data with timestamp
bu_agent_sdk/tokens/views.py:68
↓ 1 callersClassCompactionConfig
Configuration for the compaction service. The compaction service monitors token usage and automatically summarizes conversation history when
bu_agent_sdk/agent/compaction/models.py:49
↓ 1 callersClassCompactionService
Service for managing conversation context through compaction. The service monitors token usage after each LLM response and triggers compactio
bu_agent_sdk/agent/compaction/service.py:38
↓ 1 callersClassDatabase
Simulated database with some user data.
bu_agent_sdk/examples/dependency_injection.py:23
↓ 1 callersClassHiddenUserMessageEvent
Emitted when the agent injects a hidden user message (ex: incomplete todos prompt). Hidden messages are saved to history and sent to the LLM but not
bu_agent_sdk/agent/events.py:181
↓ 1 callersClassImageURL
bu_agent_sdk/llm/messages.py:126
↓ 1 callersClassModelUsageStats
Usage statistics for a single model
bu_agent_sdk/tokens/views.py:75
↓ 1 callersClassModelUsageTokens
Usage tokens for a single model
bu_agent_sdk/tokens/views.py:87
↓ 1 callersClassSecurityError
Raised when a path escapes the sandbox.
bu_agent_sdk/examples/claude_code.py:31
↓ 1 callersClassStepCompleteEvent
Emitted when a step completes.
bu_agent_sdk/agent/events.py:163
↓ 1 callersClassStepStartEvent
Emitted when the agent starts a logical step (tool execution group).
bu_agent_sdk/agent/events.py:146
↓ 1 callersClassTestSerializerToolCalls
Test serializer handles tool calls correctly.
bu_agent_sdk/llm/google/tests/test_agent_mode.py:58
↓ 1 callersClassThinkingEvent
Emitted when the model produces thinking/reasoning content.
bu_agent_sdk/agent/events.py:40
↓ 1 callersClassTokenCost
Service for tracking token usage and calculating costs
bu_agent_sdk/tokens/service.py:40
↓ 1 callersClassTokenCostCalculated
Token cost
bu_agent_sdk/tokens/views.py:19
↓ 1 callersClassTokenUsage
Token usage tracking for compaction decisions. Attributes: input_tokens: Number of input tokens. output_tokens: Number of
bu_agent_sdk/agent/compaction/models.py:87
↓ 1 callersClassTokenUsageEntry
Single token usage entry
bu_agent_sdk/tokens/views.py:11
↓ 1 callersClassTool
Wrapper class for a tool function with its metadata and definition. This class is created by the @tool decorator and provides: - Automat
bu_agent_sdk/tools/decorator.py:155
↓ 1 callersClassToolCallEvent
Emitted when the assistant calls a tool.
bu_agent_sdk/agent/events.py:52
ClassAnthropicMessageSerializer
Serializer for converting between custom message types and Anthropic message param types.
bu_agent_sdk/llm/anthropic/serializer.py:35
ClassBaseChatModel
Protocol defining the interface for chat models. All LLM implementations (OpenAI, Anthropic, Google, etc.) must implement this protocol.
bu_agent_sdk/llm/base.py:55
ClassChatAnthropic
A wrapper around Anthropic's chat model.
bu_agent_sdk/llm/anthropic/chat.py:38
ClassChatOpenAILike
A class for to interact with any provider using the OpenAI API schema. Args: model (str): The name of the OpenAI model to use.
bu_agent_sdk/llm/openai/like.py:7
ClassContentPartDocumentParam
Document content block for PDFs.
bu_agent_sdk/llm/messages.py:112
ClassContentPartImageParam
bu_agent_sdk/llm/messages.py:147
ClassContentPartRedactedThinkingParam
Redacted thinking content block. Used when thinking content has been redacted by the model (Anthropic). Must be preserved in conversation history.
bu_agent_sdk/llm/messages.py:74
ClassContentPartRefusalParam
bu_agent_sdk/llm/messages.py:40
ClassContentPartTextParam
bu_agent_sdk/llm/messages.py:29
ClassContentPartThinkingParam
Thinking content block for extended thinking / reasoning models. Used by: - Anthropic Claude models with extended thinking enabled - Can be includ
bu_agent_sdk/llm/messages.py:51
ClassDeveloperMessage
Developer-provided instructions for reasoning models. With OpenAI o1 models and newer, `developer` messages replace the previous `system` messages.
bu_agent_sdk/llm/messages.py:407
ClassDocumentSource
Source for a document attachment (base64 encoded).
bu_agent_sdk/llm/messages.py:97
ClassGoogleMessageSerializer
Serializer for converting messages to Google Gemini format.
bu_agent_sdk/llm/google/serializer.py:16
ClassMessageCompleteEvent
Emitted when a message is complete.
bu_agent_sdk/agent/events.py:131
ClassMessageStartEvent
Emitted when a new message starts (user or assistant).
bu_agent_sdk/agent/events.py:117
ClassModelError
bu_agent_sdk/llm/exceptions.py:1
ClassOpenAIMessageSerializer
Serializer for converting between custom message types and OpenAI message param types.
bu_agent_sdk/llm/openai/serializer.py:33
ClassSandboxContext
Sandboxed filesystem context. All file operations are restricted to root_dir.
bu_agent_sdk/examples/claude_code.py:38
ClassSchemaOptimizer
bu_agent_sdk/llm/schema.py:16
ClassTaskComplete
Exception raised when a task is completed via the done tool. This provides explicit task completion signaling instead of relying on the absen
bu_agent_sdk/agent/service.py:40
ClassTestGeminiAgentModeIntegration
Integration tests that actually call Gemini API.
bu_agent_sdk/llm/google/tests/test_agent_mode.py:297
Class_MessageBase
Base class for all message types
bu_agent_sdk/llm/messages.py:203
Classmark
bu_agent_sdk/llm/google/tests/test_agent_mode.py:37
Classpytest
bu_agent_sdk/llm/google/tests/test_agent_mode.py:32