MCPcopy Create free account

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

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

↓ 1 callersMethodrun_ablation_study
Run ablation study across specified context modes and one or more cases. Args: context_modes: List of context modes to t
chapter1/context/main.py:220
↓ 1 callersFunctionrun_active_discovery
(client, model, task_prompt: str, index, top_k=4, tools: List[Dict] = None, max_steps
chapter4/active-tool-discovery/agent.py:237
↓ 1 callersFunctionrun_agent
跑一个 case,返回 {final_text, transcript}。env 被就地修改(状态即真值)。 model 为空时回退到模块级默认 MODEL(小模型)。三方对照实验里,可用它把 "控制组"跑在一个更大的模型上,验证"小模型+代码化规则"能否追平"大模型裸跑"。
chapter5/small-model-codified-rules/agent.py:190
↓ 1 callersFunctionrun_agent
(paper_path: Path, model: str, out_path: Path, max_turns: int = 8)
chapter2/agent-skills-ppt/demo.py:269
↓ 1 callersFunctionrun_agent
运行一次客服会话。返回: { "transferred": bool, # 是否调用了 transfer_to_human "transfer_reason": str|None, "final_text": str
chapter9/prompt-auto-optimization/airline_env.py:158
↓ 1 callersFunctionrun_agent
()
chapter9/browser-use-rpa/browser-use/examples/ui/streamlit_demo.py:80
↓ 1 callersMethodrun_agent
(self, task: str)
chapter9/browser-use-rpa/browser-use/examples/integrations/discord/discord_api.py:107
↓ 1 callersMethodrun_agent
(self, task: str)
chapter9/browser-use-rpa/browser-use/examples/integrations/slack/slack_api.py:83
↓ 1 callersFunctionrun_agent_task
One genuine multi-turn loop; only initial schema exposure differs by group.
chapter4/active-tool-discovery/run_exact_experiment.py:629
↓ 1 callersFunctionrun_all
()
chapter5/permission-embedded-data-objects/pedo/eval/case_studies.py:629
↓ 1 callersFunctionrun_all
()
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_final_comprehensive.py:595
↓ 1 callersFunctionrun_all_benchmarks
Run the complete benchmark suite.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_overhead.py:334
↓ 1 callersFunctionrun_all_comparisons
Run all five comparison benchmarks.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_comparisons.py:693
↓ 1 callersFunctionrun_all_experiments
Run all ablation experiments and compare results
chapter2/prompt-engineering/test_ablation.py:92
↓ 1 callersMethodrun_all_strategies
Run the given compression strategies (default: all six)
chapter2/context-compression/run_all_strategies.py:257
↓ 1 callersMethodrun_all_strategies
Run experiments for the given compression strategies (default: all six)
chapter2/context-compression/experiment.py:192
↓ 1 callersFunctionrun_all_tests
Run all basic tests.
chapter4/active-tool-selection/tests/test_basic.py:171
↓ 1 callersFunctionrun_all_tests
Run all tests.
chapter4/collaboration-tools/test_basic.py:127
↓ 1 callersFunctionrun_all_tests
Run all memory tests
chapter3/memobase/test_memory.py:234
↓ 1 callersMethodrun_all_tests
Run all validation tests.
chapter9/browser-use-rpa/test_validation.py:48
↓ 1 callersFunctionrun_application_benchmark
Run the full application benchmark.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_application.py:422
↓ 1 callersFunctionrun_arm
( arm: dict, tasks, verbose: bool, provider: str, existing: dict[str, dict] | None = None,
chapter5/small-model-codified-rules/demo.py:100
↓ 1 callersFunctionrun_arm
(page: Page, base_url: str, arm: str, fixture_duration: float)
chapter6/phone-agent/run_acceptance.py:122
↓ 1 callersFunctionrun_arm
( upstream: Path, output: Path, arm: str, target_steps: int, chunk_steps: int, max_chu
chapter10/generative-agents/run_campaign.py:468
↓ 1 callersFunctionrun_auth_command
Run the authentication command with dummy task in UI.
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:1592
↓ 1 callersFunctionrun_backend
(backend: str, reasoning: str)
chapter1/search-codegen/run_experiment_1_3.py:213
↓ 1 callersMethodrun_batch_evaluation
Run batch evaluation on multiple test cases.
chapter3/user-memory-evaluation/main.py:138
↓ 1 callersFunctionrun_batch_mode
Run the agent in batch mode.
chapter3/mem0/main.py:173
↓ 1 callersFunctionrun_batch_mode
Run batch queries from file
chapter3/contextual-retrieval/main.py:116
↓ 1 callersFunctionrun_batch_mode
Run batch queries from file
chapter3/agentic-rag/main.py:118
↓ 1 callersFunctionrun_benchmark
依次对每个提供商跑基准测试(提供商之间串行,单提供商内部并发)。
chapter7/model-benchmark/benchmark.py:333
↓ 1 callersFunctionrun_benchmark
Run the full DataGuardBench evaluation.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:491
↓ 1 callersMethodrun_benchmark
Run systematic benchmark across all compression strategies. Args: contexts: Single context string, dict, or list of conte
chapter2/context-compression/benchmark_compression.py:267
↓ 1 callersFunctionrun_benchmark_mode
Run LOCOMO benchmark evaluation
chapter3/memobase/main.py:102
↓ 1 callersFunctionrun_browser_task
( task: str, api_key: str, model: str = 'gpt-4.1', headless: bool = True, )
chapter9/browser-use-rpa/browser-use/examples/ui/gradio_demo.py:58
↓ 1 callersFunctionrun_build
运行 vite build,返回是否编译通过。
chapter5/conversational-ui/demo.py:90
↓ 1 callersFunctionrun_cache_case
(client, tokenizer, protocol)
chapter2/local_llm_serving/run_experiment.py:285
↓ 1 callersFunctionrun_case
(directory, arm, args)
chapter6/astra-async-steering/experiment.py:217
↓ 1 callersFunctionrun_case
(directory, arm, args)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v1/source/experiment.py:202
↓ 1 callersFunctionrun_case
(directory, arm, args)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/experiment.py:217
↓ 1 callersFunctionrun_case
(directory, arm, args)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v2/source/experiment.py:202
↓ 1 callersFunctionrun_case
(retriever: OfflineRetriever, case: Dict[str, Any], top_k: int)
chapter3/agentic-rag/compare_offline.py:41
↓ 1 callersFunctionrun_cell
( client: Any, model: str, task: dict[str, Any], trial: int, policy: str, max_turns: i
chapter7/model-action-threshold/experiment.py:378
↓ 1 callersFunctionrun_claude
(args, run_dir: Path, workspace: Path, official_skill: Path, protocol: dict)
chapter2/agent-skills-ppt/run_official_experiment.py:134
↓ 1 callersFunctionrun_comparison
Run comparison across all modes Args: api_key: API key for Kimi task: Custom task (optional) root_dir: Root director
chapter2/kv-cache/main.py:375
↓ 1 callersFunctionrun_comparison
运行三种范式对比,可选跨模型对比。
chapter4/multimodal-agent/demo.py:288
↓ 1 callersFunctionrun_comparison
Score several memory systems on the test suite and print a comparison table. This is the offline path when ``--metric keyword-recall`` is used: i
chapter3/user-memory-evaluation/main.py:293
↓ 1 callersFunctionrun_comparison_demo
Run side-by-side comparison of active vs passive approaches.
chapter4/active-tool-selection/demo_comparison.py:26
↓ 1 callersFunctionrun_comparison_demo
Run comparison between agentic and non-agentic modes
chapter3/agentic-rag/quickstart.py:144
↓ 1 callersFunctionrun_comparison_mode
Run both modes and compare results
chapter3/contextual-retrieval/main.py:159
↓ 1 callersFunctionrun_comparison_mode
Run both modes and compare results
chapter3/agentic-rag/main.py:161
↓ 1 callersFunctionrun_complex_task
Run a complex multi-step task
chapter5/coding-agent/example_complex_task.py:10
↓ 1 callersFunctionrun_control_group
(book: ReceiptBook)
chapter5/cad-vs-diffusion/run_experiment.py:145
↓ 1 callersFunctionrun_cost_trace
( store: CampaignStore, providers: Sequence[Provider], factory: PromptFactory, config: dict[st
chapter7/model-benchmark/campaign.py:987
↓ 1 callersFunctionrun_demo
Run the interactive demo Args: enable_streaming: Whether to enable streaming output (default: True) strategy: Preselected compres
chapter2/context-compression/main.py:65
↓ 1 callersFunctionrun_demo
Run a demonstration of all collaboration tools.
chapter4/collaboration-tools/quickstart.py:16
↓ 1 callersFunctionrun_demo
(args)
chapter3/agentic-rag-for-user-memory/offline_demo.py:135
↓ 1 callersFunctionrun_demo
Run a comprehensive demo of the vector search service.
chapter3/dense-embedding/test_client.py:59
↓ 1 callersFunctionrun_demo
Run interactive demo
chapter3/agentic-rag/quickstart.py:121
↓ 1 callersFunctionrun_demo
端到端演示:从对话构建画像,再召回画像 / 事件 / 上下文。
chapter3/memobase/profile_demo.py:176
↓ 1 callersFunctionrun_demo_evaluation
Run a demonstration evaluation with sample agent responses.
chapter3/user-memory-evaluation/main.py:254
↓ 1 callersFunctionrun_demo_mode
Run demonstration scenarios
chapter3/memobase/main.py:139
↓ 1 callersFunctionrun_download
()
chapter9/browser-use-rpa/browser-use/examples/features/download_file.py:24
↓ 1 callersFunctionrun_dry_run
离线预演(不调用任何 API):画出四 Agent 协作图、Manager 计划、编辑部指定术语, 并用 tiktoken 估算各 Agent 将读到的上下文规模,直观印证“Manager 上下文与书长度基本无关”。
chapter10/book-translation/demo.py:166
↓ 1 callersFunctionrun_dry_run
离线路径:不联网,展示示例对话、缓冲批处理流程与期望画像结构。
chapter3/memobase/profile_demo.py:195
↓ 1 callersFunctionrun_educational_tests
Run educational test cases.
chapter3/retrieval-pipeline/test_client.py:161
↓ 1 callersFunctionrun_episode
(mode: str, seed: int, model: WorldModel | None, device: torch.device, failure_probability: float)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:197
↓ 1 callersFunctionrun_eval
在标注集上做稠密检索评测,打印每条查询指标 + 宏平均。
chapter3/dense-embedding/cli.py:218
↓ 1 callersFunctionrun_eval
在标注集上做检索评测,打印每条查询指标 + 宏平均。
chapter3/sparse-embedding/cli.py:176
↓ 1 callersFunctionrun_evaluation
Run all evaluation tests
chapter8/continued-pretraining/evaluate_model.py:49
↓ 1 callersMethodrun_evaluation
Run full evaluation
chapter3/contextual-retrieval/evaluation/evaluate.py:128
↓ 1 callersMethodrun_evaluation
Run full evaluation
chapter3/agentic-rag/evaluation/evaluate.py:136
↓ 1 callersFunctionrun_evaluation_mode
Run evaluation mode using the evaluation framework
chapter3/user-memory/main.py:373
↓ 1 callersFunctionrun_experiment
( requirements: str, output_root: Path, *, live: bool = True, live_task: str | None = None
chapter5/agent-creator/creator.py:1530
↓ 1 callersFunctionrun_final_evaluation
Run the comprehensive final safety evaluation.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_final.py:345
↓ 1 callersFunctionrun_focused_harness_eval
Run the focused vs naive harness comparison.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_harness_focused.py:129
↓ 1 callersFunctionrun_fragmented_test_fixed
Test fragmented DB with non-superuser.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_final_comprehensive.py:401
↓ 1 callersFunctionrun_full
完整流程:真实调用 OpenAI 诊断并生成回归用例,再重放执行。
chapter5/log-diagnosis/demo.py:137
↓ 1 callersMethodrun_full_demo
Run complete email demo with learning and replay phases.
chapter9/browser-use-rpa/demo_email.py:58
↓ 1 callersMethodrun_full_experiment
Run full comparison experiment. Args: rl_episodes: Number of episodes for RL training llm_episodes: Number o
chapter1/learning-from-experience/experiment.py:409
↓ 1 callersFunctionrun_full_injection
(client, model, task_prompt: str, tools: List[Dict] = None, max_steps: int = 10)
chapter4/active-tool-discovery/agent.py:185
↓ 1 callersFunctionrun_full_suite
Run every experiment in ABLATION_SUITE in-process, then print one comparison table so the final experimental result is produced by a single co
chapter2/prompt-engineering/run_ablation.py:554
↓ 1 callersFunctionrun_game
(args)
chapter10/voice-werewolf/demo.py:225
↓ 1 callersFunctionrun_group
(group: list[dict])
scripts/gen_star_history.py:237
↓ 1 callersFunctionrun_group
(session: ClientSession, schemas: list[dict[str, Any]], index: LocalEmbeddingIndex, strate
chapter4/active-tool-discovery/run_exact_experiment.py:791
↓ 1 callersFunctionrun_hidden_check
在临时目录里还原工作区并运行隐藏检查脚本,返回是否通过。
chapter8/premature-completion-dpo/train_grpo_optional.py:37
↓ 1 callersFunctionrun_improved_harness_test
Run with focused 3-5 principle injection per task.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_comparisons.py:603
↓ 1 callersFunctionrun_inference_examples
运行多个推理示例 Args: model: 训练好的模型 tokenizer: 分词器
chapter8/MultilingualReasoning/gpt_oss_20b_sft.py:418
↓ 1 callersFunctionrun_integration_test
Run a simple integration test
chapter1/context/tests/test_agent.py:184
↓ 1 callersFunctionrun_interactive
交互式多轮:同一编排器跨轮复用,共享历史与当前角色持续保留。
chapter10/multi-role-transfer/demo.py:283
↓ 1 callersFunctionrun_interactive_demo
Run an interactive demonstration.
chapter3/retrieval-pipeline/test_client.py:395
↓ 1 callersFunctionrun_interactive_mode
交互式模式 - 每次提问独立(search_and_answer 会重置对话历史,无跨问题上下文) Args: agent: WebSearchAgent 实例 output: 可选,保存每次问答轨迹的 JSON 文件路径
chapter1/web-search-agent/main.py:32
↓ 1 callersFunctionrun_interactive_mode
Run interactive query mode
chapter3/contextual-retrieval/main.py:59
↓ 1 callersFunctionrun_interactive_mode
Run interactive query mode
chapter3/agentic-rag/main.py:59
↓ 1 callersFunctionrun_interactive_mode
Run agent in interactive mode
chapter3/memobase/main.py:25
↓ 1 callersMethodrun_interactive_session
Run an interactive evaluation session.
chapter3/user-memory-evaluation/main.py:24
↓ 1 callersFunctionrun_kimi
(args, run_dir: Path, workspace: Path, official_skill: Path, protocol: dict)
chapter2/agent-skills-ppt/run_official_experiment.py:171
↓ 1 callersFunctionrun_language_case
Test a specific language.
chapter4/execution-tools/test_multilang.py:8
↓ 1 callersFunctionrun_llm_battles
Run LLM-judged battles between every model pair over every prompt. Args: candidate_models: Models to compare (default: DEFAULT_CANDI
chapter7/elo-leaderboard/llm_judge.py:232
↓ 1 callersFunctionrun_llm_demo
Run a simplified LLM demo with just a few episodes.
chapter1/learning-from-experience/quick_demo.py:47
← previousnext →6,601–6,700 of 13,003, ranked by callers