MCPcopy Create free account

hub / github.com/bojieli/ai-agent-book / functions

Functions13,003 in github.com/bojieli/ai-agent-book

↓ 1,751 callersMethodappend
(self, content: str, path: Path)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:63
↓ 1,237 callersMethodget
(self, url: str, **kwargs: Any)
chapter4/perception-tools/test_xquik_tools.py:52
↓ 369 callersFunctionopen
(record: Annotation)
web-astro/src/scripts/note-editor.ts:155
↓ 362 callersFunctionset
(tag, values)
web-astro/scripts/context-flow-figures.mjs:4
↓ 355 callersMethodresolve
Resolve the effective (provider, api_key, base_url, model). Applies the OpenRouter universal fallback: if the requested direct provid
chapter5/coding-agent/config.py:100
↓ 286 callersFunctionround
(index, y)
web-astro/scripts/trajectory-figure.mjs:33
↓ 250 callersMethodexecute
Execute the tool with given parameters Args: params: Tool input parameters Returns:
chapter5/coding-agent/tools/base.py:41
↓ 243 callersMethodget
Read a single object. Permission check only (no validators/reactions).
chapter5/permission-embedded-data-objects/pedo/core/store.py:136
↓ 226 callersMethodget
(self)
chapter10/parallel-web-research/message_bus.py:81
↓ 197 callersMethodencode
(self, texts: List[str], batch_size: int = 16)
chapter3/dense-embedding/cli.py:103
↓ 180 callersMethodupdate
Update an object. Full pipeline.
chapter5/permission-embedded-data-objects/pedo/core/store.py:251
↓ 175 callersMethodrun
Execute the task with maximum number of steps
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1399
↓ 157 callersMethodget
(self, object_id, accessor)
tests/test_ch5_pedo_live_security_eval.py:317
↓ 144 callersMethodsearch
(self, **kwargs)
chapter3/mem0/test_agent_v3.py:10
↓ 137 callersMethodrun
按顺序处理若干条用户消息(支持多轮,用于记忆注入场景)。
chapter2/prompt-injection/agent.py:312
↓ 135 callersMethodopen
(self)
chapter10/autonomous-phone-registration/browser.py:32
↓ 131 callersMethodget
(self, key, default=None)
chapter7/model-action-threshold/tasks/cache_contract/repo/cachelib/cache.py:5
↓ 126 callersMethodread
(self, _block)
chapter10/voice-werewolf/test_live_human.py:262
↓ 117 callersMethodstat
(self, attr: str, kind: str)
chapter7/model-benchmark/benchmark.py:262
↓ 113 callersMethodsave
(self, name)
scripts/book_figures/introduction.py:31
↓ 106 callersMethodwrite
(self, data)
chapter10/voice-werewolf/demo.py:41
↓ 104 callersMethodpath
(self, points, arrow=False)
scripts/book_figures/introduction.py:27
↓ 94 callersMethoddecode
(self, token_ids, skip_special_tokens=False)
chapter2/attention_visualization/test_streaming.py:60
↓ 94 callersMethodload
Load configuration from JSON file
chapter3/agentic-rag-for-user-memory/config.py:292
↓ 88 callersMethodmodel_dump
(self, **_kwargs)
chapter6/phone-agent/test_agent.py:9
↓ 87 callersMethodanalyze_trajectory
Analyze a full trajectory into an :class:`EfficiencyReport`.
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:276
↓ 81 callersFunctionresolve_backend
Resolve a provider name into a usable backend. Resolution order: 1. ``gpt-5*`` ids route through OpenRouter when a key is available, because
agentbook/providers/resolution.py:128
↓ 81 callersMethodtext
(self, x, y, value, size=22, bold=False)
scripts/book_figures/introduction.py:23
↓ 75 callersMethodcopy
Create a deep copy of the current rating system.
chapter7/elo-leaderboard/elo_rating.py:162
↓ 73 callersMethodjson
(self)
chapter4/perception-tools/test_pubchem_async.py:17
↓ 73 callersMethodstart
Start the browser session.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:457
↓ 72 callersMethodcommit
(self)
tests/test_ch5_pedo_atomic_delete.py:77
↓ 71 callersMethodget_or_create_cdp_session
Get or create a CDP session for a target. Args: target_id: Target ID to get session for. If None, uses current agent focus. focus: If True,
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:962
↓ 64 callersMethodlog
(self, source: str, text: str)
chapter6/async-agent/runtime.py:138
↓ 64 callersFunctionpanel
(f, x, y, w, title, lines, h=None)
scripts/book_figures/chapter5.py:5
↓ 62 callersMethodcursor
(self, cursor_factory=None)
tests/test_ch5_pedo_atomic_delete.py:74
↓ 61 callersMethodbox
(self, x, y, w, h, fill='#f2f2f2')
scripts/book_figures/introduction.py:20
↓ 61 callersMethodresolve
( cls, backend: Optional[str] = None, model: Optional[str] = None )
chapter1/search-codegen/config.py:52
↓ 60 callersMethodclose
(self)
chapter7/model-benchmark/campaign.py:292
↓ 58 callersMethodget
(self, object_id: str, accessor: AccessContext)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:177
↓ 55 callersMethodaudit_lines
Audit an in-memory list of parsed JSONL examples.
chapter8/cot-distillation/sft_data_auditor.py:139
↓ 55 callersMethodjson
(self)
chapter3/contextual-retrieval-for-user-memory/test_top_k.py:26
↓ 55 callersMethodkill
Kill the browser session and reset all state.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:464
↓ 54 callersMethodfind
Find files matching a pattern (similar to Unix find command) Args: pattern: File name pattern (supports wildcard
chapter2/kv-cache/agent.py:181
↓ 48 callersMethodresolve
解析实际使用的 (api_key, base_url, model, 是否经 OpenRouter)。 仅「OpenAI 原生」条目(base_url 为空)参与回退;带专属 base_url 的条目 (如 Kimi/豆包)保持不变。回退规则:
chapter7/model-benchmark/benchmark.py:72
↓ 47 callersMethod__new__
(cls)
chapter10/generative-agents/run_campaign.py:46
↓ 47 callersFunctiondown
(f, x, start, end)
scripts/book_figures/chapter5.py:15
↓ 47 callersMethodget_browser_state_summary
( self, cache_clickable_elements_hashes: bool = True, include_screenshot: bool = True, cached: bool =
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1046
↓ 46 callersMethodact
Execute an action
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:1244
↓ 45 callersMethodconnect
Connect to the MCP server.
chapter4/collaboration-tools/client_example.py:22
↓ 43 callersMethodfetchone
(self)
tests/test_ch5_pedo_atomic_delete.py:47
↓ 42 callersFunction_turn
( step: str = "turn-1", *, tool: str | None = "query_order", prompt_tokens: int = 100, cac
tests/test_ch6_cost_efficiency_analyzer.py:34
↓ 42 callersFunction_turn
( step: str = "turn-1", *, tool: str | None = "query_order", prompt_tokens: int = 100, cac
tests/test_ch7_cost_efficiency_analyzer.py:34
↓ 42 callersMethodmodel_dump
Custom serialization handling circular references and filtering sensitive data
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:326
↓ 42 callersMethodparse
( self, text: str, typ: type[T] | dict[str, Any], examples: list[ParseDatapoin
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:292
↓ 41 callersMethodcreate
Create a new object. Full pipeline.
chapter5/permission-embedded-data-objects/pedo/core/store.py:206
↓ 40 callersMethodevaluate
Execute JavaScript in the target. Args: page_function: JavaScript code that MUST start with (...args) => format *args: Arguments to pass to t
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:101
↓ 39 callersMethodget_current_page_url
Get the URL of the current page using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1594
↓ 38 callersMethodok
(self)
chapter5/agent-creator/validator.py:48
↓ 38 callersMethodvalidate_tool_call
Inspect and validate a tool call against security rules and confirmation policies.
chapter9/harness-safety-gate/safety_policy_gate.py:322
↓ 37 callersMethodformat
(self, record)
chapter9/browser-use-rpa/browser-use/browser_use/logging_config.py:95
↓ 36 callersMethodrun
启动所有触发器,运行 duration 秒后停止。
chapter6/agent-with-event-trigger/event_loop_demo.py:188
↓ 35 callersFunction_get_timeout
Safely parse environment variable timeout values with robust error handling. Args: env_var: Environment variable name (e.g. 'TIMEOUT_NavigateToU
chapter9/browser-use-rpa/browser-use/browser_use/browser/events.py:16
↓ 35 callersFunctiontest
(name, fn)
tests/js/auto-translate.test.js:123
↓ 34 callersMethodcheck_trajectory
Run all consistency checks and return a structured report.
chapter9/trajectory-verifier/consistency_checker.py:153
↓ 34 callersMethodwrite
(self, content: str, path: Path)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:59
↓ 33 callersMethodcancel
(self, task_id: str)
chapter6/async-agent/tasks.py:230
↓ 33 callersMethodraise_for_status
(self)
chapter1/web-search-agent/tests/test_agent.py:25
↓ 31 callersMethodraise_for_status
(self)
chapter3/contextual-retrieval-for-user-memory/test_top_k.py:29
↓ 30 callersMethodadd
(self, resp)
chapter5/video-edit/agents.py:117
↓ 30 callersMethodcreate
(self, *, purpose: str, **request: Any)
chapter4/multimodal-agent/campaign.py:71
↓ 30 callersMethodread
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:67
↓ 30 callersMethodrun
Run agent with streaming output Args: user_message: User's input message max_iterations: Maximum num
chapter5/coding-agent/agent.py:122
↓ 29 callersMethodcreate
(inner_self, *, purpose: str, **request: Any)
chapter3/user-memory/run_evaluation.py:281
↓ 29 callersMethodstop
Stop the agent
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1978
↓ 29 callersMethodwait
(seconds: int = 3)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:260
↓ 27 callersFunctionfigureKit
(labels, { rtl = false } = {})
web-astro/scripts/chapter3-figure-kit.mjs:68
↓ 27 callersMethodrender
(self)
book-en/svg_lib.py:522
↓ 27 callersMethodsave
Save configuration to JSON file
chapter3/agentic-rag-for-user-memory/config.py:251
↓ 27 callersMethodstart
(self, command: str)
chapter6/async-agent/tasks.py:106
↓ 26 callersMethodclear
(self)
chapter1/search-codegen/agent.py:395
↓ 26 callersMethodclear_all
Clear all data (for testing).
chapter5/permission-embedded-data-objects/pedo/core/store.py:727
↓ 26 callersMethodget_selector_map
Get the current selector map from cached state or DOM watchdog. Returns: Dictionary mapping element indices to EnhancedDOMTreeNode objects
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1710
↓ 25 callersMethodanalyze_code
Analyze a single code snippet and return a risk assessment.
chapter5/coding-agent/sandbox_evaluator.py:178
↓ 24 callersFunctioncompute_mle_elo
Compute Elo ratings using Bradley-Terry model with Maximum Likelihood Estimation. This is the official method used by Chatbot Arena for
chapter7/elo-leaderboard/bradley_terry.py:12
↓ 24 callersMethoddispatch_and_wait
Dispatch notification and wait for HITL decision or timeout fallback execution.
chapter4/collaboration-tools/src/notification_dispatcher.py:437
↓ 24 callersMethodexecute_action
Execute a registered action with simplified parameter handling
chapter9/browser-use-rpa/browser-use/browser_use/tools/registry/service.py:311
↓ 24 callersMethodput
(self, key, value)
chapter7/model-action-threshold/tasks/cache_contract/repo/cachelib/cache.py:8
↓ 24 callersMethodraise_for_status
(self)
chapter4/perception-tools/test_arxiv_request_bounds.py:77
↓ 24 callersMethodretrieve
Retrieve and rank hybrid results using Reciprocal Rank Fusion (RRF). Args: query: The search query string. top_k: Num
chapter3/structured-index/hybrid_retriever.py:433
↓ 23 callersMethodarrow
(self, x1, y1, x2, y2, label=None, dash=False, color='border')
book-en/svg_lib.py:424
↓ 23 callersMethodfetchall
(self)
tests/test_ch5_pedo_atomic_delete.py:51
↓ 22 callersMethodadd
(self, doc_id: str, text: str)
chapter3/agentic-rag-for-user-memory/indexer.py:56
↓ 22 callersMethodadd_raptor_node
Add a RAPTOR tree summary node to the index.
chapter3/structured-index/hybrid_retriever.py:99
↓ 22 callersMethoddelete
Delete a complete cascade atomically, then publish its reactions.
chapter5/permission-embedded-data-objects/pedo/core/store.py:301
↓ 22 callersMethodfrom_env
Create configuration from environment variables
chapter3/contextual-retrieval-for-user-memory/config.py:221
↓ 22 callersMethodsend
(self, payload: dict[str, Any])
chapter9/browser-use-rpa/local_mail_sandbox.py:41
↓ 21 callersFunction_example
(user: str, assistant: str)
tests/test_ch8_sft_data_auditor.py:32
↓ 21 callersFunction_example
(user: str, assistant: str)
tests/test_ch7_sft_data_auditor.py:32
↓ 21 callersMethodcreate
(self, **kwargs)
chapter10/voice-werewolf/test_live_human.py:205
next →1–100 of 13,003, ranked by callers