Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
13,003 in github.com/bojieli/ai-agent-book
⨍
Functions
13,003
◇
Types & classes
1,574
↳
Endpoints
161
Method
__post_init__
Universal OpenRouter fallback for the chat LLM: when KIMI_API_KEY is absent but OPENROUTER_API_KEY is present, route the chat model (used by
chapter3/mem0/config.py:55
Method
__post_init__
Initialize vector store configuration based on backend.
chapter3/mem0/config.py:87
Method
__post_init__
Ensure data path exists.
chapter3/mem0/config.py:140
Method
__post_init__
Ensure log directory exists.
chapter3/mem0/config.py:162
Method
__post_init__
(self)
chapter3/memobase/agent.py:54
Method
__repr__
(self)
chapter2/prompt-engineering/test_hash_item_dict_collision.py:22
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:390
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:661
Method
__repr__
@DEV ! don't display this to the LLM, it's SUPER long
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:502
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:36
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:47
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:70
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:82
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:101
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:117
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:164
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:192
Method
__repr__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:232
Method
__repr__
Representation of the AgentHistoryList object
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:396
Method
__repr__
(self)
chapter4/active-tool-selection/tool_knowledge_base.py:32
Method
__repr__
(self)
chapter4/active-tool-selection/tool_knowledge_base.py:44
Method
__setattr__
(self, name: str, value: Any)
chapter10/book-translation/consistency_auditor.py:83
Method
__setattr__
(self, name: str, value: Any)
chapter4/collaboration-tools/src/notification_dispatcher.py:101
Method
__setitem__
(self, key: str, value: int)
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:185
Method
__str__
(self)
tests/test_ch10_message_bus_non_json_payload.py:12
Method
__str__
(self)
tests/test_ch9_phone_agent_redact_secrets_non_serializable.py:21
Method
__str__
(self)
tests/test_ch6_phone_agent_redact_secrets_non_serializable.py:21
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:393
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:665
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/views.py:166
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:747
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:33
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:44
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:66
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:79
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:97
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:114
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:161
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:189
Method
__str__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:229
Method
_background_processing_loop
Background loop for automatic memory processing based on conversation count
chapter3/user-memory/background_memory_processor.py:505
Function
_boom
(**kwargs)
chapter4/perception-tools/test_analyze_video_release_on_error.py:86
Function
_boundary_response
An agent that breaches its system prompt boundary.
tests/test_ch2_prompt_injection_robustness.py:40
Function
_bounded_reader
(stream: Any, destination: bytearray, overflow: list[bool])
chapter9/self-modifying-agent/candidate_sandbox.py:99
Method
_capture_attention_hook
Hook to capture attention weights from model layers
chapter2/attention_visualization/agent.py:221
Method
_cdp_clear_cookies
Clear all cookies using CDP Network.clearBrowserCookies.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1879
Method
_cdp_clear_geolocation
Clear geolocation override using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1908
Method
_cdp_grant_permissions
Grant permissions using CDP Browser.grantPermissions.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1893
Method
_cdp_remove_init_script
Remove script added with addScriptToEvaluateOnNewDocument.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1922
Method
_cdp_set_extra_headers
Set extra HTTP headers using CDP Network.setExtraHTTPHeaders.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1884
Method
_cdp_set_geolocation
Set geolocation using CDP Emulation.setGeolocationOverride.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1902
Method
_check_for_cookie_changes_cdp
Check if a CDP network event indicates cookie changes. This would be called by Network.responseReceivedExtraInfo events if we set up CDP event li
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/storage_state_watchdog.py:107
Method
_close_log_when_done
(process: subprocess.Popen, log_handle: TextIO)
chapter5/coding-agent/tools/shell_session.py:436
Function
_cn_id_ok
中国大陆二代身份证号(18 位)校验码验证
chapter3/log-sanitization/regex_sanitizer.py:47
Method
_collect_interactive_elements
Recursively collect interactive elements that are also visible.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:532
Method
_compute_relevance_score
( self, query: str, query_terms: set[str], query_vector: Optional[np.ndarray], node: Dict[str, Any]
chapter3/structured-index/hybrid_retriever.py:357
Method
_construct_enhanced_node
Recursively construct enhanced DOM tree nodes. Args: node: The DOM node to construct html_frames: List of HTML frame nodes encountered
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:484
Method
_continue
()
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1455
Method
_create
(self, **_kwargs)
chapter7/agent-cost-analysis/tests/test_chat_null_usage.py:16
Method
_create
(self, model=None, messages=None, temperature=0, **kw)
chapter4/active-tool-discovery/offline_backend.py:153
Method
_create_param_model
Creates a Pydantic model from function signature
chapter9/browser-use-rpa/browser-use/browser_use/tools/registry/service.py:257
Method
_default
()
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1436
Function
_delete_file
(env, path)
chapter9/harness-safety-gate/stable/tool_dispatcher.py:49
Method
_dim_rate
(field_name: str)
chapter2/prompt-injection/robustness_evaluator.py:205
Method
_empty_report
()
chapter8/MultilingualReasoning/evaluate_multilingual.py:463
Method
_enable
()
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1484
Method
_evaluate_with_llm
Use LLM to evaluate if the answer meets criteria
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:549
Method
_event
(self, type_, **data)
chapter10/voice-werewolf/test_user_simulator.py:32
Method
_execute_action
Generic helper to execute any action via the tools.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_tab_management.py:97
Method
_execute_impl
Perform multiple edits on a file - Built on top of Edit tool - All edits are applied in sequence, in the order they
chapter5/coding-agent/tools/multi_edit_tool.py:18
Method
_execute_impl
Exit plan mode - Use this tool when you are in plan mode and have finished presenting your plan - This will prompt t
chapter5/coding-agent/tools/exit_plan_mode_tool.py:16
Method
_execute_impl
Read file contents - The file_path parameter must be an absolute path - By default, reads up to 2000 lines from the
chapter5/coding-agent/tools/read_tool.py:18
Method
_execute_impl
Fetch content from URL - Fetches content from a specified URL and processes it using an AI model - Takes a URL and a
chapter5/coding-agent/tools/web_fetch_tool.py:16
Method
_execute_impl
Execute bash command in persistent shell - Commands execute in a persistent shell session - Working directory change
chapter5/coding-agent/tools/bash_tool.py:18
Method
_execute_impl
Get output from background bash job - Retrieves output from a running or completed background bash shell - Takes a b
chapter5/coding-agent/tools/bash_output_tool.py:19
Method
_execute_impl
Find files matching glob pattern - Fast file pattern matching tool that works with any codebase size - Supports glob
chapter5/coding-agent/tools/glob_tool.py:18
Method
_execute_impl
Search for patterns in files using pure Python regex Supports: - Full regex syntax - Case insensitive search
chapter5/coding-agent/tools/grep_tool.py:21
Method
_execute_impl
Write content to file - This tool will overwrite the existing file if there is one at the provided path - ALWAYS pre
chapter5/coding-agent/tools/write_tool.py:18
Method
_execute_impl
Search the web - Allows Claude to search the web and use the results to inform responses - Provides up-to-date infor
chapter5/coding-agent/tools/web_search_tool.py:16
Method
_execute_impl
Edit Jupyter notebook cell - Completely replaces the contents of a specific cell - The notebook_path parameter must
chapter5/coding-agent/tools/notebook_edit_tool.py:18
Method
_execute_impl
List directory contents - The path parameter must be an absolute path - You can optionally provide an array of glob
chapter5/coding-agent/tools/ls_tool.py:19
Method
_execute_impl
Update TODO list - Use this tool to create and manage a structured task list - Track progress, organize complex task
chapter5/coding-agent/tools/todo_write_tool.py:16
Method
_execute_impl
Kill a shell session - Kills a running background bash shell by its ID - Takes a shell_id parameter identifying the
chapter5/coding-agent/tools/kill_bash_tool.py:16
Method
_execute_impl
Launch sub-agent - Launch a new agent to handle complex, multi-step tasks autonomously - Available agent types: gene
chapter5/coding-agent/tools/task_tool.py:16
Method
_execute_impl
Edit file using search and replace - You must use Read tool at least once before editing - Ensure you preserve exact
chapter5/coding-agent/tools/edit_tool.py:18
Method
_execute_tool
Execute tool with enhanced logging for educational purposes. This override adds detailed logging to show how contextual
chapter3/contextual-retrieval/contextual_agent.py:98
Method
_extract_origins
Recursively extract origins from frame tree.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1972
Function
_fake_post
(*a, **k)
chapter9/self-evolving-tools/test_web_search_num_results.py:10
Method
_generate_document_summary
DEPRECATED: Not used in Anthropic's Contextual Retrieval approach. Educational Note: Anthropic's research shows that
chapter3/contextual-retrieval/contextual_chunking.py:376
Method
_get_client_params
Prepare client parameters dictionary.
chapter9/browser-use-rpa/browser-use/browser_use/llm/ollama/chat.py:42
Method
_get_complete_history_without_screenshots
(history_data: dict[str, Any])
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:2087
Method
_get_git_status
Get git status
chapter5/coding-agent/agent_new.py:92
Method
_get_model_timeout
Determine timeout based on model name
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:213
Method
_get_remote_object_id
Get remote object ID for this element.
chapter9/browser-use-rpa/browser-use/browser_use/actor/element.py:81
Method
_get_storage_items
Helper to get storage items for an origin.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1983
Method
_get_system_prompt
Enhanced system prompt that leverages contextual information
chapter3/contextual-retrieval/contextual_agent.py:73
Method
_get_targets_for_page
Get the target info for a specific page. Args: target_id: The target ID to get info for. If None, uses current_target_id.
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:67
Function
_git_push
(env, remote="origin", branch="main", force=False)
chapter9/harness-safety-gate/stable/tool_dispatcher.py:61
Function
_gold_q1
()
tests/test_ch3_retrieval_stage_evaluator.py:43
Method
_handle_download
Handle a download event.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/downloads_watchdog.py:499
← previous
next →
8,101–8,200 of 13,003, ranked by callers