MCPcopy Create free account

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

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

↓ 1 callersFunctionmake_tracer
返回一个把子 Agent 事件缩进打印的 trace(str) 回调,展现 Manager 的实时调度轨迹。
chapter10/book-translation/demo.py:156
↓ 1 callersMethodmanage_memory_cards
Manage advanced memory cards
chapter3/contextual-retrieval-for-user-memory/main.py:304
↓ 1 callersFunctionmanager_decision
Manager Agent 的一次真实 LLM 决策调用。 关键点:Manager 只把「任务 + 文件索引 + 审校报告摘要」这类很小的上下文 发给模型,用来决定「哪些章节需要发回 Translation Agent 修订」。 它从不把完整译文放进自己的上下文
chapter10/book-translation/agents.py:430
↓ 1 callersFunctionmanifest
(campaign_dir: Path)
chapter6/async-agent/run_real_experiment.py:378
↓ 1 callersFunctionmap_gold
(source_label: str)
chapter8/prompt-distillation/run_experiment_8_8.py:121
↓ 1 callersFunctionmap_model_for_openrouter
Map a plain model id onto OpenRouter's `provider/model` form. Ids already containing "/" pass through unchanged; gpt-*/o1-*/o3-*/o4-* become
chapter4/collaboration-tools/src/llm_fallback.py:26
↓ 1 callersFunctionmap_model_to_openrouter
把直连模型名映射为 OpenRouter 上的 id(非可映射 id 统一兜底到当前廉价旗舰)。
chapter5/code-for-logic/demo.py:65
↓ 1 callersMethodmap_model_to_openrouter
Map a native (anthropic/openai) model id to an OpenRouter model id. Used by the OpenRouter fallback so a user with ONLY an OPENROUTER_API_KEY
chapter5/coding-agent/config.py:71
↓ 1 callersFunctionmarkdown_blocks
Split at blank lines without ever cutting through a fenced code block.
chapter10/book-translation/run_official_experiment.py:62
↓ 1 callersFunctionmatch_prototype
(model: Dict[str, Any], extraction: Dict[str, Any])
chapter3/structured-knowledge-extraction/campaign.py:451
↓ 1 callersMethodmatches
(self, accessor: AccessContext, privilege: PrivilegeType, now: float)
chapter5/permission-embedded-data-objects/run_live_security_eval.py:75
↓ 1 callersFunctionmaterial_languages_dir
()
scripts/site_i18n.py:122
↓ 1 callersFunctionmcp_receipt
(tool_name: str, result, payload: dict[str, Any], *, arguments: dict[str, Any], latency_second
chapter4/active-tool-discovery/run_exact_experiment.py:395
↓ 1 callersFunctionmcp_sequence
()
scripts/book_figures/chapter4.py:5
↓ 1 callersFunctionmdp
()
scripts/book_figures/chapter8.py:20
↓ 1 callersFunctionmean
(values: list[float])
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:456
↓ 1 callersFunctionmean
(values: list[float])
chapter8/MiniMind-pretrain/validation/run_vlm_training_report_audit.py:597
↓ 1 callersFunctionmean
(values: list[float])
chapter8/continued-pretraining/validation/run_report_audit.py:460
↓ 1 callersFunctionmean_component_score
(rows_for_arm: list[dict])
chapter2/system-hint/run_experiment_2_8.py:696
↓ 1 callersFunctionmean_or_none
(values: list[float | int | None])
chapter7/model-action-threshold/experiment.py:504
↓ 1 callersFunctionmeasure_annoy_docker
Run the real Spotify ANNOY library in Linux when the macOS ARM extension returns only item zero (a reproducible host-wheel defect in this environm
chapter3/dense-embedding/benchmark.py:155
↓ 1 callersFunctionmeasure_index
(name: str, index: Any, ids: List[str], vectors: np.ndarray, query_vectors: np.ndarray, trut
chapter3/dense-embedding/benchmark.py:107
↓ 1 callersFunctionmeasure_once
发起一次流式请求并测量各项指标。 任何异常都被捕获为一次"失败",用于统计可用性 —— 绝不向上抛出, 以免单点故障中断整表测试。
chapter7/model-benchmark/benchmark.py:142
↓ 1 callersFunctionmeasure_stream
( provider: Provider, *, campaign_id: str, phase: str, cell_id: str, prompt: str,
chapter7/model-benchmark/campaign.py:432
↓ 1 callersFunctionmeeting_interval
(email: dict[str, Any])
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:301
↓ 1 callersFunctionmemory_architecture
()
scripts/book_figures/chapter3.py:78
↓ 1 callersFunctionmemory_prompt
(mode: str, memory: Any, history: Dict[str, Any], session_index: int)
chapter3/user-memory/run_evaluation.py:110
↓ 1 callersFunctionmemory_summary
( nodes: dict[str, list[dict[str, Any]]], seed_counts: dict[str, int] )
chapter10/generative-agents/analyze_campaign.py:68
↓ 1 callersFunctionmemory_versions
()
scripts/book_figures/chapter3.py:49
↓ 1 callersFunctionmessage
( heading, body, y, height, { mono = false, fill = '#ffffff', split = false } = {}, )
web-astro/scripts/trajectory-figure.mjs:35
↓ 1 callersFunctionmessage
(y,label,reply=False)
scripts/book_figures/chapter4.py:15
↓ 1 callersFunctionmessage_to_action
( message: Dict[str, Any], )
chapter2/prompt-engineering/tau_bench/agents/few_shot_agent.py:93
↓ 1 callersFunctionmessages
(prompt, schemas, position, padding)
chapter4/active-tool-discovery/selection_ablation.py:37
↓ 1 callersFunctionmetagpt
()
scripts/book_figures/chapter10.py:161
↓ 1 callersFunctionmetrics
(rankings: List[List[int]], queries: List[Dict[str, Any]], id_to_pos: Dict[str, int])
chapter3/contextual-retrieval/campaign.py:130
↓ 1 callersFunctionmin_max_normalize
Min-max normalize a mapping of doc_id -> score into the [0, 1] range. Args: scores: Mapping from document id to raw score. Returns:
chapter3/retrieval-pipeline/fusion.py:42
↓ 1 callersMethodmissing_important_questions
(self, known)
chapter3/structured-knowledge-extraction/advisor_agent.py:37
↓ 1 callersMethodmock_email_send
Mock Email channel dispatcher (opt-in via use_mock_channels).
chapter4/collaboration-tools/src/notification_dispatcher.py:202
↓ 1 callersMethodmock_slack_send
Mock Slack channel dispatcher (opt-in via use_mock_channels).
chapter4/collaboration-tools/src/notification_dispatcher.py:183
↓ 1 callersMethodmock_telegram_send
Mock Telegram channel dispatcher (opt-in via use_mock_channels).
chapter4/collaboration-tools/src/notification_dispatcher.py:174
↓ 1 callersMethodmock_webhook_send
Mock Webhook channel dispatcher (opt-in via use_mock_channels).
chapter4/collaboration-tools/src/notification_dispatcher.py:192
↓ 1 callersFunctionmode_call_stats
(calls: List[Dict[str, Any]])
chapter3/user-memory/run_evaluation.py:416
↓ 1 callersFunctionmodelCard
(x, heading, subtype, details, fill = '#f0f0f0')
web-astro/scripts/training-foundations-figures.mjs:300
↓ 1 callersMethodmodel_comparison
Compare all models for a given condition.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/metrics.py:174
↓ 1 callersMethodmodel_dump
(self, mode="json")
chapter5/paper-to-video/test_campaign.py:55
↓ 1 callersMethodmodel_dump
Custom serialization that properly uses AgentHistory's model_dump
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:442
↓ 1 callersFunctionmodel_explore
Run a real observe-decide-act loop, one provider call per browser step.
chapter9/browser-use-rpa/run_experiment_9_5.py:151
↓ 1 callersFunctionmodel_factory
( model_id: str, platform: str | Platform, base_url: str | None = None, api_key: str | None =
chapter2/prompt-engineering/tau_bench/model_utils/model/general_model.py:139
↓ 1 callersFunctionmodel_identity
(pipeline: Pipeline, embed_name: str, reranker_name: str)
chapter3/retrieval-pipeline/campaign.py:32
↓ 1 callersFunctionmodel_identity_exact
The returned model must be exactly the requested model.
chapter1/search-codegen/run_experiment_1_3.py:120
↓ 1 callersFunctionmodel_parser
( client: OpenAI, model: str, definition: dict[str, Any], samples: list[str], error: str,
chapter5/adaptive-log-parser/campaign.py:117
↓ 1 callersFunctionmodel_provenance
(model_id: str)
chapter6/streaming-speech/demo.py:58
↓ 1 callersMethodmodel_thoughts
Get all thoughts from history
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:553
↓ 1 callersFunctionmonitor
Continuous monitoring mode
chapter9/browser-use-rpa/browser-use/examples/apps/news-use/news_monitor.py:251
↓ 1 callersMethodmonitor_page_changes
Monitor a webpage for changes over time.
chapter9/browser-use-rpa/browser-use/examples/mcp/advanced_server.py:161
↓ 1 callersMethodmonitor_website_workflow
Monitor a website and notify on changes. Args: url: Website URL to monitor check_interval: Check interval in
chapter4/collaboration-tools/client_example.py:50
↓ 1 callersFunctionmoveMenuFocus
(current, amount)
extras/lang-switcher.js:487
↓ 1 callersFunctionmovementFor
(lesson)
slides/review.mjs:17
↓ 1 callersFunctionmulti_agent_example
Example with multiple agents collaborating.
chapter3/mem0/quickstart.py:209
↓ 1 callersMethodmulti_hop_search
多跳关系检索:沿知识图谱的关系边遍历,回答「A 通过什么与 B 相连」这类 扁平向量检索无法表达的关系性问题(对应书中「多跳关系推理」)。 与 search() 的区别:search() 只按嵌入相似度召回孤立的实体/社区, 而本方
chapter3/structured-index/graphrag_indexer.py:466
↓ 1 callersFunctionmulti_session_example
Example showing memory persistence across sessions.
chapter3/mem0/quickstart.py:148
↓ 1 callersMethodmultiline_text
Render multiple lines of text.
book-en/svg_lib.py:382
↓ 1 callersMethodmust_get_current_page
Get the current page as an actor Page.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:910
↓ 1 callersFunctionn8n_print_view
Embed the unaltered product screenshot in a grayscale SVG print view.
scripts/book_figures/chapter1.py:228
↓ 1 callersFunctionnaive_retrieval
基线:只用原始问题做一次检索。
chapter3/agentic-rag-for-user-memory/offline_demo.py:89
↓ 1 callersMethodname
Tool name
chapter5/coding-agent/tools/base.py:37
↓ 1 callersFunctionnarration_prompt
(section: str, page_index: int, total: int, feedback: str | None)
chapter5/paper-to-video/campaign.py:148
↓ 1 callersFunctionnative_async
()
scripts/book_figures/chapter6.py:74
↓ 1 callersFunctionnext_token
()
scripts/book_figures/chapter8.py:109
↓ 1 callersMethodnight
执行一个夜晚,返回今晚出局玩家名列表。
chapter10/voice-werewolf/werewolf/game.py:186
↓ 1 callersFunctionnode
(cx, cy)
web-astro/scripts/memory-foundation-layout.mjs:486
↓ 1 callersFunctionnodes
(tree, predicate)
web-astro/scripts/book-math.test.mjs:43
↓ 1 callersFunctionnormalize
(value)
web-astro/scripts/chapter8-figures.test.mjs:35
↓ 1 callersFunctionnormalize
(s)
web-astro/scripts/grid-world-figure.test.mjs:20
↓ 1 callersFunctionnormalize
(s)
web-astro/scripts/chapter7-figures.test.mjs:33
↓ 1 callersFunctionnormalize
(rows: list[tuple[Any, ...]])
chapter5/erp-agent/campaign_postgres.py:119
↓ 1 callersFunctionnormalizeLabel
(value)
web-astro/scripts/collaboration-society-figures.mjs:9
↓ 1 callersFunctionnormalizeLabel
(value)
web-astro/scripts/collaboration-manager-figures.mjs:8
↓ 1 callersFunctionnormalizeLabel
(value)
web-astro/scripts/evolution-methods-figures.mjs:9
↓ 1 callersFunctionnormalizeLabel
(value)
web-astro/scripts/collaboration-context-figures.mjs:8
↓ 1 callersFunctionnormalize_extractions
(schema: Dict[str, Any], source_rows: List[Dict[str, Any]], batch_outputs: List[Dict[str, Any]])
chapter3/structured-knowledge-extraction/campaign.py:323
↓ 1 callersFunctionnormalize_schema
(raw: Dict[str, Any])
chapter3/structured-knowledge-extraction/campaign.py:205
↓ 1 callersFunctionnormalize_value
(value: Any, factor: Dict[str, Any])
chapter3/structured-knowledge-extraction/campaign.py:303
↓ 1 callersFunctionnormalizedSource
(source)
web-astro/scripts/async-architecture-layout.test.mjs:17
↓ 1 callersFunctionnormalized_number_text
(value: str | None)
chapter1/context/run_experiment_1_1.py:292
↓ 1 callersFunctionnumber
(tag, name)
web-astro/scripts/context-flow-figures.mjs:2
↓ 1 callersMethodnumber_of_steps
Get the number of steps in the history
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:622
↓ 1 callersFunctionofficial_schema_receipts
(urls: list[str])
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:523
↓ 1 callersFunctionoffline_narration
离线占位讲解词:不调用 LLM,用副标题+要点拼出一段可读文本(供占位音轨估时)。
chapter5/paper-to-video/demo.py:254
↓ 1 callersFunctionollama_chat
(messages: list[dict[str, str]], *, timeout: float = 900.0)
chapter4/active-tool-discovery/run_exact_experiment.py:166
↓ 1 callersMethodon_BrowserStartEvent
Handle browser start request. Returns: Dict with 'cdp_url' key containing the CDP URL
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:504
↓ 1 callersFunctionon_discover
(need: str)
chapter4/active-tool-discovery/agent.py:249
↓ 1 callersFunctionone
(row: dict[str, Any])
chapter8/prompt-distillation/run_experiment_8_8.py:223
↓ 1 callersMethodone_shot_timer
(self)
chapter4/collaboration-tools/test_timer_tools.py:60
↓ 1 callersFunctiononline_elo_and_history
( frame: pd.DataFrame, )
chapter7/elo-leaderboard/validation/run_experiment.py:104
↓ 1 callersFunctionopenDropdown
(focusDirection)
extras/lang-switcher.js:470
↓ 1 callersFunctionopenHighlights
()
web-astro/src/lib/highlight-store.ts:3
↓ 1 callersFunctionopenrouter_base_url
Return the OpenRouter endpoint, honouring an environment override. Returns: The value of ``OPENROUTER_BASE_URL`` if set and non-empty, ot
agentbook/providers/openrouter.py:71
↓ 1 callersFunctionoptionLocale
(code)
extras/lang-switcher.js:499
↓ 1 callersFunctionorganize
整理下载目录:将根层文件按类型移动到分类子文件夹。 Args: downloads_dir: Path 对象,待整理的下载目录(必须已存在且为目录)。 Returns: dict: 各类别成功移动的文件数量,键为类别名,值为整数。 Rai
chapter10/staged-system-prompt/runs/staged-system-prompt-kimi-k3-20260730-v1/workspace/organize_downloads.py:107
← previousnext →6,001–6,100 of 13,003, ranked by callers