MCPcopy Create free account

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

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

↓ 21 callersFunctionextractLabels
(source, figure, allowedCounts)
web-astro/scripts/chapter3-figure-kit.mjs:3
↓ 21 callersMethodis_available
主 key 存在即可测;OpenAI 原生条目在缺主 key 时可回退 OpenRouter。
chapter7/model-benchmark/benchmark.py:92
↓ 21 callersMethodregister_type
(self, obj_type: ObjectType)
chapter5/permission-embedded-data-objects/pedo/core/store.py:113
↓ 21 callersMethodrun_ablation_campaign
Runs full downstream ablation campaign comparing baseline vs evolved agents.
chapter9/hermes-self-evolution/run_downstream_ablation.py:224
↓ 21 callersMethodsearch_and_answer
执行搜索并生成答案 Args: user_question: 用户问题 max_iterations: 最大搜索迭代次数(防止无限循环) Returns:
chapter1/web-search-agent/agent.py:364
↓ 21 callersMethodsubmit
(self)
chapter10/autonomous-phone-registration/browser.py:133
↓ 21 callersMethodtext
Automatically parse the text inside content, whether it's a string or a list of content parts.
chapter9/browser-use-rpa/browser-use/browser_use/llm/messages.py:150
↓ 20 callersMethodadd
Insert r unless it is already covered. Returns True if the union grew.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/paint_order.py:99
↓ 20 callersMethodcalculate_energy
Calculate Root Mean Square (RMS) energy level of an audio chunk. Supports numpy arrays, raw bytes/bytearray/memoryview (16-bit PCM, uint8, or
chapter6/streaming-speech/interruption_manager.py:101
↓ 20 callersMethodcreate
(self, **_kwargs)
chapter5/paper-to-video/test_campaign.py:62
↓ 20 callersMethodget_file
Get a file object by full filename
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:233
↓ 20 callersFunctionsanitize
对文本执行离线规则脱敏。 Returns: - 脱敏后的文本 - 命中列表,每项为 {category, value, placeholder, start, end}
chapter3/log-sanitization/regex_sanitizer.py:186
↓ 19 callersMethod_is_url_allowed
Check if a URL is allowed based on the allowed_domains configuration. Args: url: The URL to check Returns: True if the URL is allowed, Fal
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/security_watchdog.py:121
↓ 19 callersMethodclear
(self)
chapter9/browser-use-rpa/browser-use/tests/ci/conftest.py:235
↓ 19 callersMethodcreate
(self, **kwargs)
chapter2/local_llm_serving/test_benchmark.py:14
↓ 19 callersMethodgenerate
Generate speech from text prompts. Orpheus supports emotion/expression tags in your prompts: - <laugh>, <giggles>, <
chapter8/orpheus/inference.py:260
↓ 19 callersMethodmodel_dump
(self, **kwargs)
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:45
↓ 19 callersMethodrun
Execute rate ramp benchmark and return structured benchmark metrics.
chapter7/model-benchmark/rate_ramp_benchmark.py:213
↓ 19 callersMethodwrite
(self, data)
chapter4/multimodal-agent/main.py:23
↓ 18 callersMethodcreate
(self, obj: DataObject, accessor: AccessContext, **kw)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:155
↓ 18 callersMethodcreate
(self, **kwargs)
chapter9/browser-use-rpa/browser-use/tests/ci/test_llm_anthropic_502_error.py:23
↓ 18 callersFunctiondecode_token_labels
Decode byte-level tokens in order, assigning a character to its final byte. Each returned label still represents exactly one token position. Othe
chapter2/attention_visualization/token_labels.py:20
↓ 18 callersMethodfinal_result
Final result from history
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:481
↓ 18 callersMethodinitialize
Initialize the service by loading pricing data
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:62
↓ 18 callersFunctionnew_game
Start a new chess game. Returns: Dictionary with initial board state
chapter4/collaboration-tools/src/chess_tools.py:83
↓ 18 callersMethodrun
Run the interactive session.
chapter3/mem0/main.py:105
↓ 17 callersMethodexecute_task
Execute a task using available tools (ReAct loop). Stops when: 1. The model emits a text-only reply (no tool_calls) — conv
chapter1/context/agent.py:703
↓ 17 callersMethodmodel_dump
(self)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:13
↓ 17 callersMethodnew
(cls)
chapter5/provider-failover/streaming.py:26
↓ 17 callersMethodrun
Run the learning agent to complete the task. Args: max_steps: Maximum steps for browser-use agent
chapter9/browser-use-rpa/learning_agent/agent.py:283
↓ 16 callersMethodcapture
(self, event: BaseTelemetryEvent)
chapter9/browser-use-rpa/browser-use/browser_use/telemetry/service.py:61
↓ 16 callersMethodclick
Click at the specified coordinates.
chapter9/browser-use-rpa/browser-use/browser_use/actor/mouse.py:21
↓ 16 callersMethodget_test_case
Get a specific test case by ID. Args: test_id: The test case ID Returns: TestCa
chapter3/user-memory-evaluation/framework.py:162
↓ 16 callersMethodkill
Terminate the persistent shell and its background processes.
chapter5/coding-agent/tools/shell_session.py:440
↓ 16 callersMethodlist_tools
(self)
chapter9/self-evolving-tools/tool_manager.py:133
↓ 16 callersMethodload
Load configuration from JSON file
chapter3/contextual-retrieval-for-user-memory/config.py:281
↓ 16 callersMethodlocator
(self, _selector)
chapter10/parallel-web-research/test_coordination.py:108
↓ 16 callersFunctionmake_move
Make a move on the chess board. Args: move_str: Move in UCI (e.g., 'e2e4') or SAN (e.g., 'Nf3') format Returns:
chapter4/collaboration-tools/src/chess_tools.py:148
↓ 16 callersMethodmodel_json_schema
(cls, **kwargs)
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:163
↓ 16 callersMethodraw_read
Read without permission checks (for validators and internal use).
chapter5/permission-embedded-data-objects/pedo/core/store.py:745
↓ 16 callersFunctionvalidate_file_path
Validate and resolve file path. Args: file_path: Path to the file Returns: Resolved Path object
chapter4/perception-tools/src/base.py:50
↓ 15 callersFunctionadd_project_root
()
chapter1/context/tests/manual/_bootstrap.py:7
↓ 15 callersMethodclose
(self)
tests/test_ch5_pedo_atomic_delete.py:88
↓ 15 callersMethodfocus
Focus the element.
chapter9/browser-use-rpa/browser-use/browser_use/actor/element.py:520
↓ 15 callersMethodget_tabs
Get information about all open tabs using CDP Target.getTargetInfo for speed.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1515
↓ 15 callersFunctionstyleFigure
(source, theme, { preserveHeatmap = false } = {})
web-astro/scripts/figure-style.mjs:55
↓ 15 callersMethodtitle
(self)
chapter10/autonomous-phone-registration/browser.py:84
↓ 15 callersMethodtrain
'Train' the agent through in-context learning over multiple episodes. Note: Unlike traditional RL, there's no explicit training - jus
chapter1/learning-from-experience/llm_agent.py:511
↓ 14 callersMethod_ensure_session
Ensure we have a session ID for this target.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:51
↓ 14 callersFunctiondiagnostic_utility
Fraction of failed dimensions that include actionable evidence.
chapter9/trajectory-verifier/verifier.py:441
↓ 14 callersMethoddone
(params: StructuredOutputAction)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:1164
↓ 14 callersMethodencode
(self, texts: Iterable[str])
chapter3/structured-index/campaign.py:144
↓ 14 callersMethodevaluate_row_level_security
Evaluates Row-Level Security (RLS) enforcement for queries or single object access.
chapter5/permission-embedded-data-objects/run_live_security_eval.py:438
↓ 14 callersMethodfrom_env
Create configuration from environment variables
chapter3/agentic-rag-for-user-memory/config.py:226
↓ 14 callersFunctionlabel
( indices, x, y, width, height, { bold = false, mono = false, size = 16, muted = false
web-astro/scripts/trajectory-figure.mjs:16
↓ 14 callersFunctionparse_response
Parse the model's requested JSON while retaining raw output for audit.
chapter6/streaming-speech/qwen2_streaming.py:36
↓ 14 callersMethodrequest
(self, method: str, path: str, *, params: dict[str, Any] | None = None, json_body: dict[str, A
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:134
↓ 14 callersMethodrollback
(self)
tests/test_ch5_pedo_atomic_delete.py:84
↓ 14 callersMethodrun_audit
Run all consistency checks on the given source and target content.
chapter10/book-translation/consistency_auditor.py:103
↓ 14 callersFunctionscore_prediction
Score tool, arguments, answer, evidence and grounding (six points total).
chapter7/public-health-reporting-eval/evaluator.py:48
↓ 14 callersMethodsearch
返回与 need 最相关的 top_k 个 (工具名, 相似度)。
chapter4/active-tool-discovery/discovery.py:97
↓ 13 callersMethodevaluate_code_quality
Evaluates code quality score (0.0 to 100.0) based on AST and structural metrics.
chapter9/hermes-self-evolution/run_downstream_ablation.py:89
↓ 13 callersMethodevaluate_pipeline
Evaluate every stage across the query set and build the report. ``stage_results`` maps stage name -> flat list of result dicts for that
chapter3/retrieval-pipeline/stage_evaluator.py:255
↓ 13 callersMethodexecute_task
Execute a task with active tool discovery. The agent will: 1. Analyze the task 2. Identify capability gaps
chapter4/active-tool-selection/agent.py:52
↓ 13 callersMethodget_context_string
Get memory as a formatted string for LLM context
chapter3/user-memory/memory_manager.py:110
↓ 13 callersMethodhas
(self, cell_id: str)
chapter7/model-benchmark/campaign.py:295
↓ 13 callersFunctionjudge
Judge wire events and task output separately; an ACK alone never passes.
chapter6/astra-async-steering/experiment.py:97
↓ 13 callersFunctionlabel
( index, x, y, width, height, { size = 18, weight = 400, mono = fals
web-astro/scripts/training-foundations-figures.mjs:36
↓ 13 callersMethodnew_page
(self)
chapter10/parallel-web-research/test_coordination.py:118
↓ 13 callersMethodnuke
Delete the file system directory
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:469
↓ 13 callersMethodprocess_request
Create one Responses API turn and retain its complete trace. ``temperature`` remains in the signature for legacy callers, but is not
chapter1/search-codegen/agent.py:233
↓ 13 callersFunctionsha256_bytes
(data: bytes)
chapter4/active-tool-discovery/run_exact_experiment.py:124
↓ 13 callersMethodupdate_ratings
Update ratings after a match between two models. Args: model_a: Identifier for first model model_b:
chapter7/elo-leaderboard/elo_rating.py:54
↓ 12 callersFunction_violation_types
(report: ConsistencyReport)
tests/test_ch8_trajectory_consistency_checker.py:29
↓ 12 callersFunction_violation_types
(report: ConsistencyReport)
tests/test_ch9_trajectory_consistency_checker.py:29
↓ 12 callersFunctionapprox_cost_for_datapoint
For now, we approximate the cost of a datapoint as the cost of the input (output tokens are priced as input tokens as well).
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:511
↓ 12 callersFunctioncard
( x, y, width, height, { fill = '#f0f0f0', dash = false, rx = 8 } = {}, )
web-astro/scripts/training-foundations-figures.mjs:52
↓ 12 callersFunctioncreate_tool_knowledge_base
Create a comprehensive tool knowledge base organized by servers. This simulates the MCP ecosystem with multiple domains: - GitHub: R
chapter4/active-tool-selection/tool_knowledge_base.py:49
↓ 12 callersMethoddefault_pricing
Default per-million-token USD prices (gpt-4o-mini).
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:109
↓ 12 callersMethodexecute_task
Execute a task using ReAct pattern with standard OpenAI tool calling Args: task: The task to execute
chapter2/kv-cache/agent.py:622
↓ 12 callersFunctionget_browser_use_version
Get the browser-use package version using the same logic as Agent._set_browser_use_version_and_source
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:552
↓ 12 callersMethodhandle_event
Handle an event by sending it to the cloud
chapter9/browser-use-rpa/browser-use/browser_use/sync/service.py:32
↓ 12 callersFunctionjudge
Judge wire events and task output separately; an ACK alone never passes.
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/experiment.py:97
↓ 12 callersFunctionload_dataset
()
chapter3/structured-knowledge-extraction/extractor.py:107
↓ 12 callersFunctionregister_hiring_types
Register all hiring pipeline types with the store.
chapter5/permission-embedded-data-objects/pedo/scenarios/hiring.py:127
↓ 12 callersFunctionrender
(target: str, trace: Trace, arm: str, tools: list[dict], model: str, system: str | None = None)
chapter5/provider-failover/renderers.py:41
↓ 12 callersMethodrun
(self, task: str, max_steps: int = 20)
chapter9/self-evolving-tools/agent.py:303
↓ 12 callersMethodserialize_messages
(messages: list[BaseMessage])
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/serializer.py:158
↓ 12 callersMethodstart_playback
Mark TTS playback as active and optionally register pending audio stream chunks.
chapter6/streaming-speech/interruption_manager.py:88
↓ 12 callersMethodto_text
Convert chunk to text format for indexing
chapter3/contextual-retrieval-for-user-memory/chunker.py:62
↓ 12 callersFunctionvalidate_candidate
Run release gates with candidate execution confined to Docker.
chapter9/self-modifying-agent/evolution.py:203
↓ 11 callersFunction$
(selector)
chapter6/phone-agent/static/app.js:1
↓ 11 callersMethod_cdp_get_all_pages
Get all browser pages/tabs using CDP Target.getTargets.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1808
↓ 11 callersMethod_get_conn
(self)
chapter5/permission-embedded-data-objects/pedo/core/store.py:66
↓ 11 callersMethod_run_command
Run a shell command and return results with proper process management.
chapter4/execution-tools/multilang_executor.py:166
↓ 11 callersMethodcreate
(self, **kwargs)
chapter7/model-benchmark/test_campaign.py:22
↓ 11 callersMethodcreate
(self, obj, accessor, _reaction_depth=0)
tests/test_ch5_pedo_live_security_eval.py:327
↓ 11 callersMethoddone
(self)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:44
↓ 11 callersMethodevaluate
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:33
↓ 11 callersMethodevaluate_sample
Evaluate a single dataset sample.
chapter8/MultilingualReasoning/evaluate_multilingual.py:397
← previousnext →101–200 of 13,003, ranked by callers