MCPcopy Create free account

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

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

↓ 4 callersMethodget_statistics
Get chunking statistics
chapter3/contextual-retrieval/contextual_chunking.py:509
↓ 4 callersMethodget_statistics
Get comprehensive statistics
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:658
↓ 4 callersMethodget_target_id_from_tab_id
Get the full-length TargetID from the truncated 4-char tab_id.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1657
↓ 4 callersFunctionget_time_slices
Split data into time slices for historical analysis. Args: df: Input DataFrame with 'tstamp' column interval: Pandas fre
chapter7/elo-leaderboard/data_loader.py:183
↓ 4 callersMethodget_tool
(self, name: str)
chapter9/self-evolving-tools/tool_manager.py:144
↓ 4 callersMethodget_tree_statistics
Get statistics about the RAPTOR tree.
chapter3/structured-index/raptor_indexer.py:310
↓ 4 callersMethodget_usage_summary
Get summary of token usage and costs (costs calculated on-the-fly)
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:360
↓ 4 callersFunctiongit_commit_range
Return the latest and creation commits for one tracked source file.
scripts/site_source_paths.py:65
↓ 4 callersFunctiongrep_search
Search for a pattern in files using grep-like functionality. Args: pattern: Regular expression pattern to search for dir
chapter4/perception-tools/src/filesystem_tools.py:382
↓ 4 callersFunctiongrouped
(rows: Sequence[dict[str, Any]], keys: Sequence[str])
chapter7/model-benchmark/analysis.py:64
↓ 4 callersFunctionhas_completion_claim
(text: str)
chapter8/premature-completion-dpo/evaluate.py:44
↓ 4 callersFunctionhelpers
(labels, markerId)
web-astro/scripts/collaboration-manager-figures.mjs:62
↓ 4 callersFunctionhelpers
(labels)
web-astro/scripts/collaboration-context-figures.mjs:50
↓ 4 callersFunctionhideSelection
()
web-astro/src/scripts/highlights.ts:64
↓ 4 callersFunctionhuman_decision_accepted
Return whether MCP accepted the live decision for the same request.
chapter4/collaboration-tools/run_experiment_4_5.py:121
↓ 4 callersMethodis_file_input
Check if element is a file input. Args: element: The DOM element to check Returns: True if element is a file input, False otherwise
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1691
↓ 4 callersFunctionis_url
Check if the given string is a URL. Args: path_or_url: String to check Returns: True if the string is a URL
chapter4/perception-tools/src/base.py:36
↓ 4 callersFunctioniso_millis
(value: datetime)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:55
↓ 4 callersMethodissue_confirmation
Generate a single-use non-deterministic confirmation token bound to tool name and parameters.
chapter9/harness-safety-gate/safety_policy_gate.py:159
↓ 4 callersFunctionjson_response_to_obj_or_partial_obj
( response: dict[str, Any], typ: type[T] | dict[str, Any] )
chapter2/prompt-engineering/tau_bench/model_utils/model/utils.py:54
↓ 4 callersFunctionlabel
(k, id, x, y, width, height, style = BODY)
web-astro/scripts/evaluation-overview-figures.mjs:72
↓ 4 callersFunctionlabel
( index, x, y, width, height, { size = 17, weight = 400, align = 'ce
web-astro/scripts/collaboration-manager-figures.mjs:63
↓ 4 callersFunctionlabel
( index, x, y, width, height, { size = 17, weight = 400, align = 'ce
web-astro/scripts/collaboration-context-figures.mjs:51
↓ 4 callersMethodlist_test_cases
List all available test cases.
chapter3/user-memory-evaluation/main.py:60
↓ 4 callersFunctionload
(name)
chapter8/speech-sft-experiment/test_experiment.py:10
↓ 4 callersMethodload
Load a saved Q-table and parameters.
chapter1/learning-from-experience/rl_agent.py:306
↓ 4 callersFunctionload_config
(path: Path)
chapter7/user-memory-system-evaluation/experiment.py:1848
↓ 4 callersFunctionload_hidden_tasks
(path: Path = HIDDEN_TESTS_PATH)
chapter8/premature-completion-dpo/train_grpo_optional.py:33
↓ 4 callersFunctionload_json
(path: str | Path)
chapter7/public-health-reporting-eval/evaluator.py:14
↓ 4 callersFunctionload_json
(path: Path)
chapter7/openvla-robotwin2-eval/experiment.py:41
↓ 4 callersMethodload_memory
Load memory from storage
chapter3/user-memory/memory_manager.py:85
↓ 4 callersMethodload_parser_from_file
把一个 parsers/*.py 模块动态导入,取出其中的 parse 函数。
chapter5/adaptive-log-parser/engine.py:89
↓ 4 callersFunctionload_protocol
(path: Path = DEFAULT_PROTOCOL)
chapter5/agent-creator/creator.py:162
↓ 4 callersFunctionload_skill
Load one local Skill body; no network and no code execution are involved.
chapter10/multi-role-transfer/skill_orchestrator.py:66
↓ 4 callersMethodload_test_cases
Load test cases from the evaluation framework
chapter3/agentic-rag-for-user-memory/main.py:100
↓ 4 callersFunctionload_verified_messages
Load only complete user/assistant rows with a non-empty final answer.
chapter8/cot-distillation/train_student.py:34
↓ 4 callersFunctionmap_model_to_openrouter
把直连模型名映射为 OpenRouter 上的 id(非可映射 id 统一兜底到当前廉价旗舰)。
chapter5/video-edit/agents.py:28
↓ 4 callersFunctionmediaProbe
(filePath)
chapter6/live-audio/backend/run_real_validation.js:59
↓ 4 callersMethodmodel_actions
Get all actions from history
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:562
↓ 4 callersFunctionnormalize_action_arena
Return an exact accessible arena, using a bounded deterministic fallback. Matching is case-insensitive after removing response wrappers. Invalid
chapter10/generative-agents/action_arena_compat.py:34
↓ 4 callersFunctionobservation_quantities
Collect every number the tool observations put in front of the model. Reads the messages *as sent*, not the tool results as executed. The di
chapter1/context/grounding.py:104
↓ 4 callersMethodobserve
把一条信息写入本 Agent 的私有上下文。
chapter10/voice-werewolf/werewolf/agent.py:118
↓ 4 callersMethodparse_force_from_prompt
( self, prompt: str, typ: BaseModel | dict[str, Any], temperature: float | None = None )
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:249
↓ 4 callersMethodplay_episode
Play one episode of the game.
chapter1/learning-from-experience/llm_agent.py:407
↓ 4 callersFunctionpricing_coverage
(records: Sequence[RunRecord])
chapter7/user-memory-system-evaluation/experiment.py:1511
↓ 4 callersFunctionprint_result
Print formatted result
chapter2/system-hint/main.py:30
↓ 4 callersMethodprocess_conversation_history
Process conversation history with both contextual chunking and memory cards. Args: chunks: Basic conversation ch
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:127
↓ 4 callersMethodprocess_message
Process a message with memory-aware reasoning Args: message: User message to process task_id: Option
chapter3/memobase/agent.py:377
↓ 4 callersFunctionpublication_is_authorized
Return whether an accepted live decision explicitly approved publication.
chapter4/collaboration-tools/run_experiment_4_5.py:135
↓ 4 callersMethodpublish_validated
Move a replay-validated candidate into the retrievable store.
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:100
↓ 4 callersMethodput
(self, item, *args, **kwargs)
tests/test_ch5_pedo_atomic_delete.py:166
↓ 4 callersMethodrag
( self, question: str, index: VectorMemoryIndex, reranker: Reranker, h
chapter7/user-memory-system-evaluation/experiment.py:647
↓ 4 callersMethodraw_read
(self, object_id: str)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:183
↓ 4 callersFunctionread_excel_data
Read data from Excel file. Args: file_path: Path to Excel file sheet_name: Specific sheet name (None for all sheets)
chapter4/collaboration-tools/src/excel_tools.py:30
↓ 4 callersFunctionread_file
Read a file and return its contents. Args: file_path: Path to the file encoding: File encoding (default: utf-8)
chapter4/perception-tools/src/filesystem_tools.py:315
↓ 4 callersMethodread_file
Read contents of a file Args: file_path: Path to the file relative to root directory offset: Line nu
chapter2/kv-cache/agent.py:101
↓ 4 callersMethodread_file
(file_name: str, available_file_paths: list[str], file_system: FileSystem)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:915
↓ 4 callersFunctionread_headings
Read real headings, excluding heading-like lines in fenced examples.
scripts/homepage_index.py:30
↓ 4 callersMethodread_text_file
Read a text file with size limits. Args: file_path: Path to the file encoding: File encoding
chapter4/execution-tools/filesystem_enhanced.py:43
↓ 4 callersFunctionread_webpage
Read and extract content from a webpage. Args: url: URL of the webpage extract_text: Whether to extract main text conten
chapter4/perception-tools/src/multimodal_tools.py:24
↓ 4 callersMethodrebuild_index
HNSW doesn't require explicit rebuild.
chapter3/dense-embedding/indexing.py:386
↓ 4 callersFunctionrecord
(**overrides)
chapter7/user-memory-system-evaluation/test_experiment.py:231
↓ 4 callersMethodrecord
(self, name: str, *, provider: str, endpoint: str, model: str | None, request: dict, response:
chapter5/cad-vs-diffusion/receipts.py:33
↓ 4 callersMethodrecord_tool
(self, name: str, arguments: dict[str, Any], result: dict[str, Any])
chapter7/model-action-threshold/experiment.py:267
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-en/svg_lib.py:288
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-tr/svg_lib.py:288
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-ar/svg_lib.py:314
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-ru/svg_lib.py:288
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-es/svg_lib.py:288
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-mn/svg_lib.py:288
↓ 4 callersMethodrect
(self, x, y, w, h, fill='light', stroke='border', rx=CORNER_R, dash=False)
book-id/svg_lib.py:288
↓ 4 callersMethodrecurring_timer
(self, *, occurrences=1, max_occurrences=3, interval_seconds=3600)
chapter4/collaboration-tools/test_timer_tools.py:47
↓ 4 callersFunctionregister
(store, username, email, password)
chapter7/model-action-threshold/tasks/crosscutting_identity/repo/accounts/registration.py:4
↓ 4 callersFunctionrender_schemas
(schemas: list[dict[str, Any]])
chapter4/active-tool-discovery/run_exact_experiment.py:143
↓ 4 callersMethodreplay_workflow
Replay a workflow with the given parameters. Args: workflow: The workflow to replay parameters: Para
chapter9/browser-use-rpa/learning_agent/replay.py:77
↓ 4 callersFunctionrequest
(instant = false)
web-astro/src/scripts/reader-navigation.ts:78
↓ 4 callersFunctionrequireCredential
(name)
chapter6/live-audio/backend/run_real_validation.js:20
↓ 4 callersFunctionreseal_artifact
(run_dir: Path, name: str)
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:24
↓ 4 callersMethodreset
(self, task_index: Optional[int] = None)
chapter2/prompt-engineering/tau_bench/envs/base.py:80
↓ 4 callersMethodreset
Reset the agent state
chapter3/memobase/agent.py:550
↓ 4 callersMethodreset_conversation
Reset conversation history
chapter2/local_llm_serving/main.py:185
↓ 4 callersFunctionresolve_backend
(provider: str, model: str | None)
chapter5/dynamic-form/campaign.py:57
↓ 4 callersFunctionresolve_endpoint
Resolve an open-model endpoint without coupling it to one API vendor. ``OPEN_MODEL_*`` is the portable interface. ``OPENROUTER_API_KEY`` is a
chapter6/computer-use-open-model/config.py:43
↓ 4 callersFunctionresolve_llm
Resolve (api_key, base_url, model), applying the OpenRouter fallback. Raises RuntimeError listing the accepted keys when neither credential is se
chapter4/collaboration-tools/src/llm_fallback.py:51
↓ 4 callersFunctionresolve_timeout
Return a positive timeout using explicit > environment > default.
chapter7/model-action-threshold/tasks/localized_timeout/repo/app/config.py:6
↓ 4 callersFunctionresponse
(content="", calls=())
chapter9/trajectory-verifier/test_claim_action_order.py:8
↓ 4 callersFunctionrun
执行命令并返回 stdout,失败则抛出异常并打印 stderr。
chapter5/paper-to-video/demo.py:156
↓ 4 callersFunctionrun_and_catch_api_error
( callable: Callable[..., Any], response: Any, datapoint: dict[str, Any] )
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:265
↓ 4 callersFunctionrun_batch
( store: CampaignStore, provider: Provider, prompt_factory: PromptFactory, *, campaign_id:
chapter7/model-benchmark/campaign.py:798
↓ 4 callersFunctionrun_case
(case: dict[str, Any], client: EvidenceChatClient, *, max_steps: int = 6)
chapter9/trajectory-verifier/customer_service_env.py:214
↓ 4 callersFunctionrun_evaluation
Entrypoint function to run multilingual reasoning evaluation.
chapter8/MultilingualReasoning/evaluate_multilingual.py:582
↓ 4 callersFunctionrun_in_sandbox
Evaluate source in a disposable, resource-limited Docker container.
chapter9/self-modifying-agent/candidate_sandbox.py:121
↓ 4 callersFunctionrun_offline_demo
离线演示 ReAct 循环——无需 API Key 或联网。 本函数**不调用真实搜索**,而是回放一段“示例轨迹”,用来直观展示本章讲的 “想→做→看→想→做→看”循环:模型先思考,再调用 web_search 行动,观察结果后 继续思考,最终综合出答案。轨迹内容仅为教学
chapter1/web-search-agent/agent.py:571
↓ 4 callersFunctionrun_one
( client: OpenAI, protocol: dict, protocol_hash: str, run_dir: Path, suite: str, case:
chapter2/system-hint/run_experiment_2_8.py:468
↓ 4 callersFunctionrun_runtime
在后台跑事件循环。
chapter6/async-agent/demo.py:127
↓ 4 callersMethodrun_sync
Synchronous wrapper around the async run method for easier usage without asyncio.
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:2174
↓ 4 callersMethodsave
Save the Q-table and parameters.
chapter1/learning-from-experience/rl_agent.py:288
↓ 4 callersMethodsave_candidate
Persist a candidate for audit without making it retrievable.
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:92
↓ 4 callersMethodsave_extracted_content
Save extracted content to a numbered file
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:371
↓ 4 callersMethodsave_memory
Save JSON memory cards to storage
chapter3/user-memory/memory_manager.py:387
← previousnext →901–1,000 of 13,003, ranked by callers