MCPcopy Create free account

hub / github.com/browser-use/agent-sdk / functions

Functions249 in github.com/browser-use/agent-sdk

↓ 1 callersFunctionmain
()
bu_agent_sdk/examples/claude_code.py:306
↓ 1 callersFunctionmain
()
bu_agent_sdk/examples/dependency_injection.py:84
↓ 1 callersFunctionrun_integration_tests
Run integration tests (requires GOOGLE_API_KEY).
bu_agent_sdk/llm/google/tests/test_agent_mode.py:522
↓ 1 callersFunctionrun_unit_tests
Run unit tests without pytest.
bu_agent_sdk/llm/google/tests/test_agent_mode.py:490
↓ 1 callersMethodserialize
(message: UserMessage)
bu_agent_sdk/llm/anthropic/serializer.py:260
↓ 1 callersMethodserialize
(message: UserMessage)
bu_agent_sdk/llm/openai/serializer.py:181
↓ 1 callersMethodserialize_messages
Serialize a list of messages, extracting any system/developer message. Returns: A tuple of (messages, system_message) where syste
bu_agent_sdk/llm/anthropic/serializer.py:449
↓ 1 callersMethodserialize_messages
( messages: list[BaseMessage], )
bu_agent_sdk/llm/openai/serializer.py:289
↓ 1 callersMethodshould_compact
Check if compaction should be triggered based on current token usage. Returns: True if token usage exceeds the threshold and
bu_agent_sdk/agent/compaction/service.py:115
↓ 1 callersMethodupdate_usage
Update the tracked token usage from a response. Args: usage: The usage information from the last LLM response.
bu_agent_sdk/agent/compaction/service.py:66
↓ 1 callersFunctionxdg_cache_home
()
bu_agent_sdk/tokens/service.py:32
Method__get_pydantic_core_schema__
Allow this Protocol to be used in Pydantic models. This is useful for type-safe agent settings. Returns a schema that accepts any obj
bu_agent_sdk/llm/base.py:138
Function__getattr__
Lazy import mechanism for heavy chat model imports and model instances.
bu_agent_sdk/llm/__init__.py:123
Function__getattr__
Create model instances on demand with API keys from environment.
bu_agent_sdk/llm/models.py:239
Method__init__
(self, dependency: Callable[[], T | Awaitable[T]])
bu_agent_sdk/tools/depends.py:56
Method__init__
( self, message: str, status_code: int = 429, model: str | None = None, )
bu_agent_sdk/llm/exceptions.py:23
Method__init__
(self, include_cost: bool = False)
bu_agent_sdk/tokens/service.py:47
Method__init__
(self, message: str)
bu_agent_sdk/agent/service.py:51
Method__post_init__
(self)
bu_agent_sdk/tools/decorator.py:175
Method__post_init__
(self)
bu_agent_sdk/agent/service.py:152
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:36
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:47
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:70
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:89
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:108
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:122
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:142
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:154
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:173
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:195
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:242
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:270
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:333
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:403
Method__repr__
(self)
bu_agent_sdk/llm/messages.py:436
Method__str__
(self)
bu_agent_sdk/llm/messages.py:33
Method__str__
(self)
bu_agent_sdk/llm/messages.py:44
Method__str__
(self)
bu_agent_sdk/llm/messages.py:67
Method__str__
(self)
bu_agent_sdk/llm/messages.py:86
Method__str__
(self)
bu_agent_sdk/llm/messages.py:105
Method__str__
(self)
bu_agent_sdk/llm/messages.py:119
Method__str__
(self)
bu_agent_sdk/llm/messages.py:138
Method__str__
(self)
bu_agent_sdk/llm/messages.py:151
Method__str__
(self)
bu_agent_sdk/llm/messages.py:169
Method__str__
(self)
bu_agent_sdk/llm/messages.py:192
Method__str__
(self)
bu_agent_sdk/llm/messages.py:239
Method__str__
(self)
bu_agent_sdk/llm/messages.py:267
Method__str__
(self)
bu_agent_sdk/llm/messages.py:330
Method__str__
(self)
bu_agent_sdk/llm/messages.py:399
Method__str__
(self)
bu_agent_sdk/llm/messages.py:433
Method__str__
(self)
bu_agent_sdk/agent/events.py:34
Method__str__
(self)
bu_agent_sdk/agent/events.py:46
Method__str__
(self)
bu_agent_sdk/agent/events.py:67
Method__str__
(self)
bu_agent_sdk/agent/events.py:95
Method__str__
(self)
bu_agent_sdk/agent/events.py:109
Method__str__
(self)
bu_agent_sdk/agent/events.py:126
Method__str__
(self)
bu_agent_sdk/agent/events.py:140
Method__str__
(self)
bu_agent_sdk/agent/events.py:158
Method__str__
(self)
bu_agent_sdk/agent/events.py:175
Method__str__
(self)
bu_agent_sdk/agent/events.py:189
Method_format_tokens
Format token count with k suffix for thousands
bu_agent_sdk/tokens/service.py:371
Method_make_api_call
()
bu_agent_sdk/llm/google/chat.py:433
Methodainvoke
Invoke the model with the given messages and optional tools. Args: messages: List of chat messages tools: Op
bu_agent_sdk/llm/anthropic/chat.py:264
Methodainvoke
Invoke the model with the given messages and optional tools. Args: messages: List of chat messages tools: Op
bu_agent_sdk/llm/openai/chat.py:293
Methodapi_key
(self)
bu_agent_sdk/llm/google/tests/test_agent_mode.py:301
Functionasync_gen_wrapper
(*args, **kwargs)
bu_agent_sdk/observability.py:81
Functionasync_wrapper
(*args, **kwargs)
bu_agent_sdk/observability.py:89
Methodasyncio
(func)
bu_agent_sdk/llm/google/tests/test_agent_mode.py:43
Functionbash
Run a bash command in the sandbox working directory.
bu_agent_sdk/examples/claude_code.py:86
Methodchat_model
(self, api_key)
bu_agent_sdk/llm/google/tests/test_agent_mode.py:308
Methodclean_old_caches
Clean up old cache files, keeping only the most recent ones
bu_agent_sdk/tokens/service.py:395
Methodclean_schema
(obj: Any, parent_key: str | None = None)
bu_agent_sdk/llm/google/chat.py:607
Methodclear_history
Clear usage history
bu_agent_sdk/tokens/service.py:386
Functioncount_by_role
Count how many users have a given role.
bu_agent_sdk/examples/dependency_injection.py:75
Methodcreate_compacted_messages
Create a new message list from a summary. Args: summary: The summary text to use as the new conversation start. Retu
bu_agent_sdk/agent/compaction/service.py:233
Methodcreate_gemini_optimized_schema
Create Gemini-optimized schema, preserving explicit `required` arrays so Gemini respects mandatory fields defined by the caller.
bu_agent_sdk/llm/schema.py:243
Methodcreate_tool_definition
Create a ToolDefinition from a Pydantic model. This is a convenience method for creating tool definitions from Pydantic models.
bu_agent_sdk/llm/schema.py:257
Functiondecorator
(func: F)
bu_agent_sdk/observability.py:76
Functiondecorator
(func: Callable[P, Awaitable[T]])
bu_agent_sdk/tools/decorator.py:393
Methoddefinition
Generate the ToolDefinition for this tool.
bu_agent_sdk/tools/decorator.py:231
Functiondone
Call this when the task is finished.
bu_agent_sdk/examples/claude_code.py:289
Functionedit
Replace old_string with new_string in a file.
bu_agent_sdk/examples/claude_code.py:158
Methodensure_additional_properties_false
Ensure all objects have additionalProperties: false
bu_agent_sdk/llm/schema.py:175
Methodensure_pricing_loaded
Ensure pricing data is loaded in the background. Call this after creating the service.
bu_agent_sdk/tokens/service.py:416
Methodfixture
(func)
bu_agent_sdk/llm/google/tests/test_agent_mode.py:34
Methodflush_tool_responses
Flush any pending tool response parts as a single Content message.
bu_agent_sdk/llm/google/serializer.py:73
Methodget_cost_by_model
Get cost breakdown by model
bu_agent_sdk/tokens/service.py:381
Functionget_database
Provide the database instance.
bu_agent_sdk/examples/dependency_injection.py:36
Functionget_observability_status
Get the current status of observability features.
bu_agent_sdk/observability.py:274
Functionget_sandbox_context
Dependency injection marker. Override this in the agent.
bu_agent_sdk/examples/claude_code.py:73
Methodget_usage_tokens_for_model
Get usage tokens for a specific model
bu_agent_sdk/tokens/service.py:272
Functionget_user
Fetch a user from the database by ID.
bu_agent_sdk/examples/dependency_injection.py:58
Functionglob_search
Find files matching a glob pattern like **/*.py
bu_agent_sdk/examples/claude_code.py:190
Functiongrep
Search for pattern in files recursively.
bu_agent_sdk/examples/claude_code.py:212
Methodhas_tool_calls
Check if the response contains tool calls.
bu_agent_sdk/llm/views.py:73
Methodintegration
(cls)
bu_agent_sdk/llm/google/tests/test_agent_mode.py:39
Functionis_debug_mode
Check if we're currently in debug mode.
bu_agent_sdk/observability.py:269
Functionis_lmnr_available
Check if lmnr is available for tracing.
bu_agent_sdk/observability.py:264
Functionlist_users
List all users in the database.
bu_agent_sdk/examples/dependency_injection.py:67
Methodload_history
Load message history to continue a previous conversation. Use this to resume a conversation from previously saved state, e.g., when l
bu_agent_sdk/agent/service.py:204
← previousnext →101–200 of 249, ranked by callers