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
↓ 1 callers
Function
_script_is_safe
(code: str, source: Path, output: Path)
chapter5/video-edit/campaign.py:234
↓ 1 callers
Method
_scroll
Scroll the page.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:835
↓ 1 callers
Method
_scroll_element_container
Try to scroll an element's container using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:1330
↓ 1 callers
Method
_scroll_with_cdp_gesture
Scroll using CDP Input.dispatchMouseEvent to simulate mouse wheel. Args: pixels: Number of pixels to scroll (positive = down, negative = up)
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:1283
↓ 1 callers
Function
_search
(query: str, timeout: float)
chapter1/web-search-agent/parallel_search.py:32
↓ 1 callers
Method
_search_bm25
Perform BM25 search. Educational Note: BM25 excels at finding exact term matches and handles technical terms
chapter3/contextual-retrieval/contextual_tools.py:281
↓ 1 callers
Method
_search_content
Search and return matching lines with context
chapter5/coding-agent/tools/grep_tool.py:262
↓ 1 callers
Method
_search_count
Count matches per file
chapter5/coding-agent/tools/grep_tool.py:228
↓ 1 callers
Method
_search_dify
Search using Dify API
chapter3/contextual-retrieval/tools.py:158
↓ 1 callers
Method
_search_dify
Search using Dify API
chapter3/agentic-rag/tools.py:151
↓ 1 callers
Method
_search_embeddings
Perform semantic search using embeddings. Educational Note: Embedding search captures semantic meaning and relations
chapter3/contextual-retrieval/contextual_tools.py:333
↓ 1 callers
Method
_search_files_with_matches
Search and return files that have matches
chapter5/coding-agent/tools/grep_tool.py:194
↓ 1 callers
Method
_search_graphrag
Search using GraphRAG knowledge graph index
chapter3/contextual-retrieval/tools.py:251
↓ 1 callers
Method
_search_graphrag
Search using GraphRAG knowledge graph index
chapter3/agentic-rag/tools.py:244
↓ 1 callers
Method
_search_local
Search using local retrieval pipeline
chapter3/contextual-retrieval/tools.py:87
↓ 1 callers
Method
_search_local
Search using local retrieval pipeline
chapter3/agentic-rag/tools.py:99
↓ 1 callers
Method
_search_offline
Search the in-process BM25 index (no server, no API key required).
chapter3/agentic-rag/tools.py:92
↓ 1 callers
Method
_search_raptor
Search using RAPTOR tree-based index
chapter3/contextual-retrieval/tools.py:208
↓ 1 callers
Method
_search_raptor
Search using RAPTOR tree-based index
chapter3/agentic-rag/tools.py:201
↓ 1 callers
Method
_seed_requirements
从 requirements 之后的阶段起步时,预置一份已确认需求并注入交接消息。
chapter10/staged-system-prompt/agent.py:270
↓ 1 callers
Function
_seed_trajectory
给运行时灌入一段「已发生」的对话轨迹,模拟会话进行到一半。
chapter6/async-agent/async_demos.py:146
↓ 1 callers
Method
_seer_act
(self)
chapter10/voice-werewolf/werewolf/game.py:247
↓ 1 callers
Function
_select_cases
按分组筛选用例,并对每组最多取 limit_per_group 个(None 表示不限制)。
chapter9/prompt-auto-optimization/demo.py:68
↓ 1 callers
Function
_select_tasks
(args: argparse.Namespace, registry_map: dict[str, Any])
chapter7/android-world/run_controlled_experiment.py:1034
↓ 1 callers
Function
_send_email_sendgrid
Send email using SendGrid API.
chapter4/collaboration-tools/src/notification_tools.py:131
↓ 1 callers
Function
_send_email_smtp
Send email using SMTP.
chapter4/collaboration-tools/src/notification_tools.py:62
↓ 1 callers
Method
_send_event
Send event to cloud API
chapter9/browser-use-rpa/browser-use/browser_use/sync/service.py:75
↓ 1 callers
Method
_send_via_real_adapter
Dispatches through a real adapter from notification_tools. Adapters that are not configured return ``success: False`` with an explici
chapter4/collaboration-tools/src/notification_dispatcher.py:211
↓ 1 callers
Method
_send_webhook
Dispatches a webhook notification via HTTP POST. Requires a ``webhook_url`` in channel_config; fails explicitly if not configured.
chapter4/collaboration-tools/src/notification_dispatcher.py:273
↓ 1 callers
Method
_serialize_assistant_content
Convert assistant message content to text string for LangChain compatibility.
chapter9/browser-use-rpa/browser-use/examples/models/langchain/serializer.py:72
↓ 1 callers
Method
_serialize_assistant_content
Serialize content for assistant messages (text and refusal allowed).
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:73
↓ 1 callers
Method
_serialize_assistant_content
Serialize content for assistant messages (text and refusal allowed).
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:77
↓ 1 callers
Method
_serialize_assistant_content
Serialize content for assistant messages.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:151
↓ 1 callers
Method
_serialize_content
(content: Any)
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/serializer.py:35
↓ 1 callers
Method
_serialize_content
Serialize content to Anthropic format.
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/serializer.py:108
↓ 1 callers
Method
_serialize_content_part_image
(part: ContentPartImageParam)
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:35
↓ 1 callers
Method
_serialize_content_part_image
Convert an image content part to Anthropic's ImageBlockParam.
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/serializer.py:68
↓ 1 callers
Method
_serialize_content_part_image
(part: ContentPartImageParam)
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:36
↓ 1 callers
Method
_serialize_content_part_image
Convert an image content part to AWS Bedrock format.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:96
↓ 1 callers
Method
_serialize_content_part_refusal
(part: ContentPartRefusalParam)
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:43
↓ 1 callers
Function
_serialize_evidence
Convert a tool result or observation into a comparable string.
chapter9/trajectory-verifier/consistency_checker.py:120
↓ 1 callers
Method
_serialize_image_part
(part: ContentPartImageParam)
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/serializer.py:28
↓ 1 callers
Method
_serialize_message_for_llm
Serialize a message for the LLM
chapter9/browser-use-rpa/browser-use/examples/integrations/agentmail/email_tools.py:38
↓ 1 callers
Method
_serialize_system_content
Convert system message content to text string for LangChain compatibility.
chapter9/browser-use-rpa/browser-use/examples/models/langchain/serializer.py:57
↓ 1 callers
Method
_serialize_system_content
Serialize content for system messages (text only).
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:58
↓ 1 callers
Method
_serialize_system_content
Serialize content for system messages (text only).
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:63
↓ 1 callers
Method
_serialize_system_content
Serialize content for system messages.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:136
↓ 1 callers
Method
_serialize_text_part
(part: ContentPartTextParam)
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/serializer.py:24
↓ 1 callers
Method
_serialize_tool_call
(tool_call: ToolCall)
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:90
↓ 1 callers
Method
_serialize_tool_call
(tool_call: ToolCall)
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:95
↓ 1 callers
Method
_serialize_tool_call
Convert a tool call to AWS Bedrock format.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:169
↓ 1 callers
Method
_serialize_tool_calls
(tool_calls: list[ToolCall])
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/serializer.py:52
↓ 1 callers
Method
_serialize_tool_calls
Convert browser-use ToolCalls to Ollama ToolCalls.
chapter9/browser-use-rpa/browser-use/browser_use/llm/ollama/serializer.py:62
↓ 1 callers
Method
_serialize_tool_calls_to_content
Convert tool calls to Anthropic's ToolUseBlockParam format.
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/serializer.py:129
↓ 1 callers
Method
_serialize_user_content
Convert user message content for LangChain compatibility.
chapter9/browser-use-rpa/browser-use/examples/models/langchain/serializer.py:32
↓ 1 callers
Method
_serialize_user_content
Serialize content for user messages (text and images allowed).
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:42
↓ 1 callers
Method
_serialize_user_content
Serialize content for user messages (text and images allowed).
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:47
↓ 1 callers
Method
_serialize_user_content
Serialize content for user messages.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:119
↓ 1 callers
Function
_serve
Restore saved timers and serve requests on the SAME event loop. `asyncio.run(_load_timers())` used to run in a throwaway loop: closing it can
chapter4/collaboration-tools/src/main.py:538
↓ 1 callers
Function
_server_info
MCP SDK v2 renamed ``serverInfo`` to ``server_info``; accept either.
chapter4/active-tool-discovery/run_exact_experiment.py:134
↓ 1 callers
Method
_set_browser_use_version_and_source
Get the version from pyproject.toml and determine the source of the browser-use package
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:573
↓ 1 callers
Method
_set_file_system
(self, file_system_path: str | None = None)
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:515
↓ 1 callers
Method
_set_screenshot_service
Initialize screenshot service using agent directory
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:554
↓ 1 callers
Method
_setup_action_models
Setup dynamic action models from tools registry
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:596
↓ 1 callers
Method
_setup_db
(self)
chapter5/permission-embedded-data-objects/pedo/core/store.py:79
↓ 1 callers
Method
_setup_handlers
Setup MCP server handlers.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:210
↓ 1 callers
Function
_sha
(path: Path)
chapter5/log-diagnosis/campaign.py:61
↓ 1 callers
Function
_sha
(path: Path)
chapter9/browser-use-rpa/run_experiment_9_5.py:330
↓ 1 callers
Function
_sha256_json
(value: Any)
chapter6/phone-agent/agent.py:67
↓ 1 callers
Function
_sha256_json
(value: Any)
chapter10/generative-agents/provider_adapter.py:31
↓ 1 callers
Function
_sha256_text
(value: str)
chapter6/phone-agent/webrtc_app.py:46
↓ 1 callers
Function
_sha_file
(path: Path)
chapter9/self-modifying-agent/run_experiment_9_6.py:31
↓ 1 callers
Function
_short
(v, n=48)
chapter2/agent-skills-ppt/demo.py:392
↓ 1 callers
Function
_short
(obj, n: int = 240)
chapter9/self-evolving-tools/agent.py:366
↓ 1 callers
Function
_short_sha
(source: str)
chapter9/self-modifying-agent/evolution.py:58
↓ 1 callers
Function
_short_sha
(source: str)
chapter9/harness-safety-gate/evolution.py:70
↓ 1 callers
Method
_should_exclude_child
Determine if child should be excluded based on propagating bounds.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:629
↓ 1 callers
Method
_show_dvd_screensaver_loading_animation_cdp
Injects a DVD screensaver-style bouncing logo loading animation overlay into the target using CDP. This is used to visually indicate that the bro
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/aboutblank_watchdog.py:126
↓ 1 callers
Method
_signals
(self)
chapter10/parallel-web-research/agents.py:86
↓ 1 callers
Method
_signature
(self)
chapter4/active-tool-discovery/discovery.py:71
↓ 1 callers
Function
_single_progress_fingerprint
(chapters: dict)
chapter10/book-translation/agents.py:153
↓ 1 callers
Function
_sleep_tool
(name)
chapter2/local_llm_serving/test_parallel_tools.py:36
↓ 1 callers
Function
_slide_count
Count Slidev pages when the required frontmatter is present.
chapter5/paper-to-ppt/agents.py:206
↓ 1 callers
Function
_sniff_document_type
Detect .pdf/.docx/.pptx from magic bytes when the extension is unusable. A URL's path often carries no real extension (e.g. https://arxiv.org
chapter4/perception-tools/src/multimodal_tools.py:108
↓ 1 callers
Function
_source_path
(perturbation: str, people: int)
chapter5/code-for-logic/build_hf_puzzles.py:38
↓ 1 callers
Function
_specific_contract
Build tool-specific input, output, provenance, and example documentation.
chapter4/perception-tools/src/expanded_catalog.py:322
↓ 1 callers
Function
_specs
(names: list[tuple[str, str]], backend: str)
chapter4/perception-tools/src/expanded_catalog.py:40
↓ 1 callers
Method
_split_articles
Split a law document into article-level chunks. Falls back to blank-line paragraph grouping when the file has no ``第X条`` markers (e.g
chapter3/agentic-rag/offline_retriever.py:83
↓ 1 callers
Method
_split_into_sentences
Split text into sentences
chapter3/contextual-retrieval/contextual_chunking.py:260
↓ 1 callers
Method
_split_into_sentences
Split text into sentences (simple implementation)
chapter3/contextual-retrieval/chunking.py:118
↓ 1 callers
Method
_split_into_sentences
Split text into sentences (simple implementation)
chapter3/agentic-rag/chunking.py:118
↓ 1 callers
Function
_stable_sample
(rows: list[dict[str, str]], n: int, seed: int, split: str)
chapter8/prompt-distillation/run_experiment_8_8.py:125
↓ 1 callers
Method
_start_cleanup_task
Start the background cleanup task.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:1026
↓ 1 callers
Method
_start_monitoring
Start the monitoring task.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/storage_state_watchdog.py:87
↓ 1 callers
Method
_start_monitoring
Start the monitoring loop.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/crash_watchdog.py:203
↓ 1 callers
Function
_step_id
(step: dict[str, Any], idx: int)
chapter9/trajectory-verifier/consistency_checker.py:132
↓ 1 callers
Method
_stop_monitoring
Stop the monitoring task.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/storage_state_watchdog.py:97
↓ 1 callers
Method
_store_document
Store full document locally
chapter3/contextual-retrieval/chunking.py:351
↓ 1 callers
Method
_store_document
Store full document locally
chapter3/agentic-rag/chunking.py:351
↓ 1 callers
Method
_store_interaction
Store an interaction in memory
chapter3/memobase/agent.py:296
← previous
next →
3,901–4,000 of 13,003, ranked by callers