MCPcopy Create free account

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

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

↓ 2 callersFunctionprint_table
打印多提供商横向对比表(成功率 + 所选指标族)。
chapter7/model-benchmark/demo.py:100
↓ 2 callersFunctionprint_table
(rows, max_rows=12)
chapter5/erp-agent/demo.py:84
↓ 2 callersFunctionprobe
(path: Path)
chapter5/paper-to-video/campaign.py:53
↓ 2 callersMethodprocessAudioChunk
* Process audio chunk and detect voice activity using Silero VAD * @param {Buffer} audioChunk - Raw audio data * @returns {Promise<Array>} VAD r
chapter6/live-audio/backend/utils/vad.js:138
↓ 2 callersFunctionprocess_elo_updates_vectorized
Process Elo updates using vectorized NumPy operations with Numba JIT. This is the core hot loop optimized with Numba for maximum perform
chapter7/elo-leaderboard/optimized_elo.py:27
↓ 2 callersMethodprocess_matches_vectorized
Process all matches using vectorized NumPy operations and Numba JIT. This is the fastest way to compute Elo ratings for larg
chapter7/elo-leaderboard/optimized_elo.py:163
↓ 2 callersFunctionprofile_key
(emotion: str, speed: str, style: str)
chapter6/controllable-tts/voice_library.py:27
↓ 2 callersFunctionpronounceSpecialCharacters
(text, isCodeBlock = false)
chapter6/live-audio/backend/utils/textProcessor.js:89
↓ 2 callersFunctionprovide_recommendations
Provide recommendations based on system
chapter2/local_llm_serving/check_compatibility.py:77
↓ 2 callersFunctionprovider_spec
Look the provider up in the shared registry. Args: provider: A provider name or alias accepted by :mod:`agentbook.providers`.
chapter1/context/run_experiment_1_1.py:79
↓ 2 callersFunctionprune_rules
把长期未被新证据确认、或被证据推翻的规则归档,返回 (存活, 归档)。
chapter9/ai-style-skill/skill_manager.py:45
↓ 2 callersFunctionpublic_preflight
(endpoint: ModelEndpoint, args: argparse.Namespace)
chapter6/computer-use-open-model/main.py:75
↓ 2 callersMethodquery
Query objects by type. Each result is permission-checked.
chapter5/permission-embedded-data-objects/pedo/core/store.py:177
↓ 2 callersFunctionquestions
(path)
tests/test_reference_answer_coverage.py:12
↓ 2 callersMethodrank
(self, query_tokens: List[str])
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:81
↓ 2 callersFunctionreact_plan
Use a real external LLM to create the ReAct call plan; never fall back.
chapter6/phone-agent/agent.py:229
↓ 2 callersFunctionread
()
chapter6/astra-async-steering/experiment.py:262
↓ 2 callersMethodread_multiple_files
Read multiple files at once. Args: file_paths: List of file paths encoding: File encoding
chapter4/execution-tools/filesystem_enhanced.py:108
↓ 2 callersFunctionread_pcm16_wav
(value: bytes)
chapter6/phone-agent/speech.py:42
↓ 2 callersMethodread_timers
(self)
chapter4/collaboration-tools/test_timer_tools.py:77
↓ 2 callersFunctionrebuild
(repo: str, start: datetime, count: int, created_at: datetime, token: str)
scripts/gen_star_history.py:361
↓ 2 callersMethodrebuild_index
Build/rebuild the ANNOY index.
chapter3/dense-embedding/indexing.py:211
↓ 2 callersFunctionrecall_at_k
(ranked_ids: List[str], gold: Sequence[str], k: int)
chapter3/retrieval-pipeline/evaluate.py:342
↓ 2 callersFunctionreciprocal_rank
(ranked_ids: List[str], gold: Sequence[str])
chapter3/retrieval-pipeline/evaluate.py:349
↓ 2 callersFunctionrecord
(experiment="7-4", status="ok", system="advanced_json_cards")
chapter7/user-memory-system-evaluation/test_run_full.py:8
↓ 2 callersFunctionrecord
(spec, *, identifier, required, status, evidence)
chapter5/agent-creator/reference_agent/tests/test_domain_policy.py:19
↓ 2 callersFunctionrecord
()
chapter6/phone-agent/run_acceptance.py:133
↓ 2 callersFunctionrect
(x, y, width, height, fill = '#ffffff')
web-astro/scripts/trajectory-figure.mjs:31
↓ 2 callersMethodrecv
(self)
chapter6/phone-agent/webrtc_app.py:122
↓ 2 callersFunctionredact
(value)
chapter6/live-audio/backend/run_real_validation.js:26
↓ 2 callersFunctionredact
(text: str, findings: List[Dict[str, Any]])
chapter3/log-sanitization/campaign.py:155
↓ 2 callersFunctionreference_token_count
(text: str)
chapter7/model-benchmark/campaign.py:74
↓ 2 callersFunctionregion_indices
Locate generated Qwen thinking/answer regions without rewriting text.
chapter2/attention_visualization/run_attention_experiment.py:39
↓ 2 callersFunctionregister_project_mgmt_types
Register all project management types with the store.
chapter5/permission-embedded-data-objects/pedo/scenarios/project_mgmt.py:123
↓ 2 callersMethodregister_to_tools
Register MCP tools as actions in the browser-use tools. Args: tools: Browser-use tools to register actions to tool_filter: Optional list of t
chapter9/browser-use-rpa/browser-use/browser_use/mcp/client.py:210
↓ 2 callersMethodregister_type
Register a custom object type definition.
chapter5/permission-embedded-data-objects/run_live_security_eval.py:263
↓ 2 callersFunctionremaining_before_deadline
Return a positive remaining duration for a shared approval deadline.
chapter4/collaboration-tools/run_experiment_4_5.py:97
↓ 2 callersFunctionremove_tool_descriptions
Remove descriptions from tools and their parameters (including nested structures) Args: tools_info: Original tools information
chapter2/prompt-engineering/ablation_utils.py:142
↓ 2 callersFunctionrender_cards
(root: Path, language: dict, chapters: list[str], *, translated: bool)
scripts/homepage_index.py:79
↓ 2 callersFunctionrender_prompt
(tokenizer, messages, tools=None)
chapter2/local_llm_serving/run_experiment.py:199
↓ 2 callersFunctionrender_skill_md
按 house 风格渲染 SKILL.md:何时加载 + 每条规则的定义/坏例/好例/作用域。
chapter9/ai-style-skill/skill_manager.py:75
↓ 2 callersFunctionrendered_links
(text: str)
scripts/clean_site_files.py:45
↓ 2 callersFunctionreplay
(run_dir)
chapter6/astra-async-steering/experiment.py:350
↓ 2 callersFunctionreplay
(workflow: Workflow, parameters: dict[str, str], *, validate_state: bool = True)
chapter9/browser-use-rpa/run_experiment_9_5.py:321
↓ 2 callersFunctionrepo_relative_source
Return the repository path backing an assembled page, or ``None``. ``None`` means the page has no counterpart in the repository, so links tha
scripts/site_source_paths.py:34
↓ 2 callersFunctionreprice_legacy_64_records
Cover old 7-4 Kimi usage without changing any saved trajectory content. The original 180-record campaign stored aggregate input/output and marked
chapter7/user-memory-system-evaluation/experiment.py:1706
↓ 2 callersFunctionrequest_admin_approval
Request approval from a human administrator. Args: request_message: Message describing what needs approval context: Optional
chapter4/collaboration-tools/src/hitl_tools.py:17
↓ 2 callersFunctionrequest_messages_contain
Return whether a literal is present in any provider-request message. Inspect the structured request rather than its JSON serialization. JSON
chapter2/prompt-injection/run_campaign.py:62
↓ 2 callersFunctionrequired_611_cells
Return matrix cells whose backends passed preflight and must complete live.
chapter7/user-memory-system-evaluation/run_full.py:95
↓ 2 callersMethodrequired_env
(cls)
chapter1/image-gen-workflow/config.py:64
↓ 2 callersFunctionrequired_readiness_components
(config: Dict[str, Any])
chapter7/user-memory-system-evaluation/experiment.py:1898
↓ 2 callersMethodrerank
Rerank documents for a query. Args: query: The search query documents: List of documents with text and metada
chapter3/retrieval-pipeline/reranker.py:124
↓ 2 callersMethodreset
Reset all ratings to initial values.
chapter7/elo-leaderboard/elo_rating.py:156
↓ 2 callersMethodreset
Reset internal state, counters, and buffers.
chapter6/streaming-speech/interruption_manager.py:378
↓ 2 callersMethodreset
* Reset VAD state
chapter6/live-audio/backend/utils/vad.js:259
↓ 2 callersMethodreset
Reset the agent's state
chapter6/agent-with-event-trigger/agent.py:1285
↓ 2 callersMethodreset
Reset agent state.
chapter4/active-tool-selection/agent.py:258
↓ 2 callersMethodresetSileroState
* Reset Silero VAD state tensors
chapter6/live-audio/backend/utils/vad.js:74
↓ 2 callersFunctionreset_board
Reset the board to the starting position. Returns: Dictionary with reset board state
chapter4/collaboration-tools/src/chess_tools.py:411
↓ 2 callersMethodreset_conversation
Reset the conversation history
chapter2/local_llm_serving/ollama_native.py:371
↓ 2 callersMethodreset_conversation
Reset the conversation history
chapter2/local_llm_serving/agent.py:335
↓ 2 callersMethodreset_conversation
Clear conversation history and current content
chapter4/multimodal-agent/agent.py:1107
↓ 2 callersFunctionresolveWhisperPython
(requested)
chapter6/live-audio/backend/run_real_validation.js:79
↓ 2 callersFunctionresolve_job
Resolve a displayed terminal command to one safe executable profile.
chapter6/async-agent/tasks.py:54
↓ 2 callersFunctionresolve_layer
(index: int, count: int)
chapter2/attention_visualization/run_attention_experiment.py:32
↓ 2 callersMethodresolved_base_url
Return the endpoint to call, honouring any environment override. Returns: The value of ``base_url_var`` if that variable is set a
agentbook/providers/models.py:64
↓ 2 callersFunctionresponse
(payload)
chapter5/agent-creator/test_creator.py:19
↓ 2 callersFunctionresponse
(content)
chapter2/prompt-engineering/test_user_empty_response.py:16
↓ 2 callersMethodrestore
(self, records: list[dict])
chapter6/async-agent/tasks.py:264
↓ 2 callersFunctionrestore_arm
(payload: dict[str, Any], agents_module: Any)
chapter10/book-translation/run_official_experiment.py:473
↓ 2 callersMethodresults
(self, _search)
chapter4/perception-tools/test_arxiv_request_bounds.py:29
↓ 2 callersFunctionretain_human_decision
Build a redacted decision record without changing the in-memory decision.
chapter4/collaboration-tools/run_experiment_4_5.py:171
↓ 2 callersFunctionretain_rendered
Copy rendered pixels into the immutable output tree used as evidence.
chapter5/paper-to-ppt/demo.py:60
↓ 2 callersFunctionretain_step_screenshots
Copy browser-use's temporary screenshots into the retained run. The returned history points to paths relative to ``run_dir``. Missing screens
chapter6/computer-use-open-model/evidence.py:26
↓ 2 callersFunctionrevealInSidebar
( sidebar: HTMLElement, item: HTMLElement, behavior: ScrollBehavior, )
web-astro/src/scripts/reader-navigation.ts:32
↓ 2 callersFunctionrevealScrollTop
({ scrollTop, maxScrollTop, viewportTop, viewportBottom, itemTop, itemBottom, padding, }: Reveal
web-astro/src/scripts/reader-navigation.ts:14
↓ 2 callersMethodreview
(self, png_paths: list[str])
chapter5/paper-to-ppt/agents.py:306
↓ 2 callersMethodrevise_bounds
根据 Reviewer 反馈微调边界(保守外扩/内收)。
chapter5/video-edit/agents.py:260
↓ 2 callersFunctionrewrite_final
(rows, key, value)
chapter6/astra-async-steering/test_judging.py:20
↓ 2 callersFunctionrewrite_final
(rows, key, value)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:20
↓ 2 callersFunctionrewrite_with_llm
真实 LLM 改写路径,返回 (改写结果, 证据回执)。
chapter9/ai-style-skill/rewrite_demo.py:31
↓ 2 callersMethodroundtrip_user
(self, speaker: str, text: str, round_no: int)
chapter10/voice-werewolf/werewolf/simulator.py:271
↓ 2 callersFunctionrun
()
chapter5/log-diagnosis/campaign.py:394
↓ 2 callersFunctionrun
()
chapter4/active-tool-discovery/test_selection_ablation.py:37
↓ 2 callersMethodrun
Main CLI loop
chapter5/coding-agent/main.py:336
↓ 2 callersMethodrun_agent
Run the agent with user input and display results
chapter5/coding-agent/main.py:206
↓ 2 callersMethodrun_all_tests
Run all live manual cases
chapter1/search-codegen/tests/manual/agent_cases.py:254
↓ 2 callersFunctionrun_benchmark
Entrypoint function to run rate ramp benchmark and return structured metrics.
chapter7/model-benchmark/rate_ramp_benchmark.py:318
↓ 2 callersMethodrun_benchmark
Run the complete LOCOMO benchmark.
chapter3/mem0/experiment.py:270
↓ 2 callersMethodrun_benchmark
Run benchmark evaluation on an agent Args: agent: The agent to evaluate (must have execute_task method)
chapter3/memobase/locomo_benchmark.py:412
↓ 2 callersFunctionrun_cleanup
(site: Path)
tests/test_build_site_assets.py:6
↓ 2 callersFunctionrun_comparison
(dataset_path: str, output_path: str = None, verbose: bool = True)
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:136
↓ 2 callersFunctionrun_context_strategy_comparison
Spawn a sub-agent under BOTH strategies on the same task and compare. Prints, for each strategy: the exact context handed off, its token count,
chapter4/collaboration-tools/src/subagent_tools.py:551
↓ 2 callersFunctionrun_demo
运行离线对比演示;返回结构化结果(便于 --output 落盘)。
chapter3/structured-index/structured_vs_flat_demo.py:236
↓ 2 callersFunctionrun_evaluation
(pipeline: Pipeline, queries, args)
chapter3/retrieval-pipeline/evaluate.py:509
↓ 2 callersFunctionrun_experiment
Run a single ablation experiment Returns: Tuple of (experiment_name, success_rate)
chapter2/prompt-engineering/test_ablation.py:21
↓ 2 callersMethodrun_linter
轻量静态检查:语法编译 + 常见坏味道,不引入额外依赖。
chapter10/staged-system-prompt/tools.py:64
↓ 2 callersFunctionrun_python
在子进程沙箱中执行 code,返回合并后的 stdout/stderr 文本。
chapter5/code-for-logic/sandbox.py:14
↓ 2 callersMethodrun_query
返回各方法的 doc 级排名 {method: [(doc_id, score)]}。
chapter3/retrieval-pipeline/evaluate.py:417
↓ 2 callersFunctionrun_questions
对每个问题:取 SQL -> 执行 -> 与 Python 参考实现比对,逐题打印。 sql_provider(q) -> str:给出该题的 SQL;可能抛异常(如在线调用 LLM 失败)。 在线模式传入 `lambda q: agent.generate_sql(q["nl
chapter5/erp-agent/demo.py:101
← previousnext →2,601–2,700 of 13,003, ranked by callers