MCPcopy Create free account

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

Functions2,925 in github.com/bojieli/ai-agent-book

↓ 1 callersMethoddemo_real_example
Demonstrate with a real-world example
chapter3/contextual-retrieval/demo.py:295
↓ 1 callersFunctiondemo_search
演示搜索功能
chapter1/web-search-agent/quickstart.py:70
↓ 1 callersFunctiondemo_single_test_selection
Demonstrate the improved single test case selection
chapter3/agentic-rag-for-user-memory/demo_ui_improvements.py:16
↓ 1 callersFunctiondemo_single_test_selection
Demonstrate the improved single test case selection
chapter3/contextual-retrieval-for-user-memory/demo_ui_improvements.py:16
↓ 1 callersMethoddemo_solution
Demonstrate the contextual retrieval solution
chapter3/contextual-retrieval/demo.py:138
↓ 1 callersFunctiondemo_system_hints
Demonstrate system hint features like timestamps, tool counting, and TODO tracking
chapter5/coding-agent/example_with_system_hints.py:10
↓ 1 callersFunctiondemo_tool_loop_prevention
Demonstrate tool call loop prevention
chapter2/system-hint/main.py:249
↓ 1 callersFunctiondemo_unified_streaming
Demo with unified ToolCallingAgent that auto-selects backend
chapter2/local_llm_serving/demo_streaming.py:115
↓ 1 callersFunctiondemo_view_test_cases_table
Demonstrate the improved test cases table with index numbers
chapter3/agentic-rag-for-user-memory/demo_ui_improvements.py:57
↓ 1 callersFunctiondemo_view_test_cases_table
Demonstrate the improved test cases table with index numbers
chapter3/contextual-retrieval-for-user-memory/demo_ui_improvements.py:57
↓ 1 callersFunctiondemo_vllm_streaming
Demo streaming with vLLM backend
chapter2/local_llm_serving/demo_streaming.py:18
↓ 1 callersFunctiondemo_weather_learning
Demonstrate weather checking with learning.
chapter8/browser-use-rpa/demo_weather.py:24
↓ 1 callersFunctiondemo_web_search
Demonstrate web search capability
chapter1/search-codegen/quickstart.py:12
↓ 1 callersFunctiondemonstrate_agent_logging
Demonstrate how the agent logs tool calls and results
chapter3/agentic-rag-for-user-memory/demo_agent_logging.py:65
↓ 1 callersFunctiondemonstrate_agent_logging
Demonstrate how the agent logs tool calls and results
chapter3/contextual-retrieval-for-user-memory/demo_agent_logging.py:65
↓ 1 callersFunctiondemonstrate_attention_tracking
Demonstrate the attention tracking functionality
chapter2/attention_visualization/agent.py:531
↓ 1 callersFunctiondemonstrate_conversation_processing
Demonstrate the conversation-based memory processing
chapter3/user-memory/demo_conversation_processing.py:19
↓ 1 callersFunctiondemonstrate_evaluation_output
Show what the evaluation output looks like
chapter3/agentic-rag-for-user-memory/test_llm_evaluation.py:89
↓ 1 callersFunctiondemonstrate_evaluation_output
Show what the evaluation output looks like
chapter3/contextual-retrieval-for-user-memory/test_llm_evaluation.py:89
↓ 1 callersFunctiondemonstrate_interval_processing
Demonstrate processing with different conversation intervals
chapter3/user-memory/demo_conversation_processing.py:185
↓ 1 callersFunctiondemonstrate_react_agent
Demonstrate the ReAct agent with various queries
chapter2/attention_visualization/main.py:625
↓ 1 callersFunctiondemonstrate_streaming_response
Demonstrate how streaming would work (matching Go handleStreamingResponse)
chapter1/search-codegen/example_request.py:116
↓ 1 callersFunctiondemonstrate_tool_calling
Demonstrate the tool calling functionality
chapter2/local_llm_serving/agent.py:449
↓ 1 callersMethoddetectLanguage
(text)
chapter9/live-audio/backend/server.js:679
↓ 1 callersMethoddetect_pii
Detect Level 3 PII in conversation text using local LLM Args: conversation_text: Text to analyze
chapter2/log-sanitization/agent.py:60
↓ 1 callersMethoddisplay_test_case_detail
Display detailed information about a test case.
chapter3/user-memory-evaluation/framework.py:347
↓ 1 callersFunctiondownload_arena_data
Download Chatbot Arena voting data via HTTPS. Args: output_path: Path to save downloaded file force_download: If True, r
chapter6/elo-leaderboard/data_loader.py:11
↓ 1 callersFunctiondownload_file
Download a file from a URL. Args: url: URL to download from output_path: Local path to save the file overwrite:
chapter4/perception-tools/src/search_tools.py:161
↓ 1 callersFunctiondownload_model_from_modelscope
Download Qwen3-0.6B model from ModelScope This is optional - vLLM can download from HuggingFace automatically
chapter2/local_llm_serving/server.py:171
↓ 1 callersFunctiondownload_paper
Download ArXiv paper PDF. Args: paper_id: ArXiv paper ID download_dir: Directory to save PDF Returns:
chapter4/perception-tools/src/arxiv_enhanced.py:86
↓ 1 callersFunctiondownload_youtube_video
Download YouTube video using yt-dlp. Args: url: YouTube video URL output_dir: Directory to save video max_resolu
chapter4/perception-tools/src/multimodal_tools.py:371
↓ 1 callersFunctiondrawChunk
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:151
↓ 1 callersFunctiondrawLabelsAndLegend
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:193
↓ 1 callersMethodencode_batch
Encode multiple texts into embeddings. Args: texts: List of input texts to encode return_sparse: Whe
chapter3/dense-embedding/embedding_service.py:127
↓ 1 callersMethodensureTempDirectory
* Ensure temp directory exists
chapter9/live-audio/backend/utils/speechToText.js:46
↓ 1 callersMethodevaluate
Evaluate the trained agent without learning. Args: num_episodes: Number of episodes to evaluate verb
chapter1/learning-from-experience/rl_agent.py:216
↓ 1 callersMethodevaluate_all
Evaluate all loaded test cases
chapter3/agentic-rag-for-user-memory/main.py:403
↓ 1 callersMethodevaluate_category
Evaluate all test cases in a category
chapter3/agentic-rag-for-user-memory/main.py:354
↓ 1 callersFunctionevaluate_from_parquet
从 parquet 文件评测
chapter7/Intuitor/evaluate_from_cache.py:153
↓ 1 callersFunctionevaluate_model
Evaluate the distilled model on test sentences.
chapter8/prompt-distillation/evaluate.py:68
↓ 1 callersMethodevaluate_response
Evaluate a single response
chapter3/contextual-retrieval/evaluation/evaluate.py:36
↓ 1 callersMethodevaluate_response
Evaluate a single response
chapter3/agentic-rag/evaluation/evaluate.py:36
↓ 1 callersMethodevaluate_single_test
Evaluate a single test case
chapter3/agentic-rag-for-user-memory/main.py:255
↓ 1 callersMethodevaluate_specific_test_case
Evaluate a specific test case selected by the user
chapter3/contextual-retrieval-for-user-memory/main.py:454
↓ 1 callersMethodevaluate_test_cases
Run evaluation on all test cases in a category
chapter3/contextual-retrieval-for-user-memory/main.py:618
↓ 1 callersMethodevaluate_test_suite
Evaluate multiple test cases. Args: test_cases: List of test cases to evaluate agent_responses: Dict
chapter3/user-memory-evaluation/evaluator.py:246
↓ 1 callersFunctionexample_code_interpreter
Example: Code interpreter with analysis.
chapter4/execution-tools/examples.py:41
↓ 1 callersFunctionexample_custom_task
Example: Custom task from user input.
chapter8/browser-use-rpa/quickstart.py:67
↓ 1 callersFunctionexample_file_operations
Example: File operations with verification.
chapter4/execution-tools/examples.py:10
↓ 1 callersFunctionexample_search
Example: Search on Google.
chapter8/browser-use-rpa/quickstart.py:17
↓ 1 callersFunctionexample_virtual_terminal
Example: Virtual terminal.
chapter4/execution-tools/examples.py:77
↓ 1 callersFunctionexample_weather
Example: Check weather.
chapter8/browser-use-rpa/quickstart.py:35
↓ 1 callersMethodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:17
↓ 1 callersMethodexecute
Execute the chain and return all results Returns: List of all chain results
chapter1/search-codegen/agent.py:365
↓ 1 callersMethodexecute_react_loop
Execute the ReAct loop for a given query Args: query: User query to answer temperature: Sampling tem
chapter2/attention_visualization/main.py:305
↓ 1 callersFunctionexecute_single_task
Execute a single task with the agent
chapter2/system-hint/main.py:93
↓ 1 callersMethodexecute_tool
Execute a tool by name with given arguments
chapter2/attention_visualization/tools.py:146
↓ 1 callersFunctionexpected_score_fast
Fast expected score calculation using Numba JIT. Args: rating_a: Rating of model A rating_b: Rating of model B
chapter6/elo-leaderboard/optimized_elo.py:12
↓ 1 callersMethodexport_test_cases
Export test cases to different formats.
chapter3/user-memory-evaluation/main.py:200
↓ 1 callersMethodexport_to_json
Export test cases to JSON format.
chapter3/user-memory-evaluation/framework.py:384
↓ 1 callersMethodexport_to_markdown
Export test cases to Markdown format.
chapter3/user-memory-evaluation/framework.py:402
↓ 1 callersFunctionextract_and_normalize_answer
从模型输出中提取并标准化答案
chapter7/Intuitor/evaluate_from_cache.py:92
↓ 1 callersFunctionextract_answer_from_boxed
从 \\boxed{} 格式中提取答案(同时支持 \\(\\boxed{}\\) 形式)
chapter7/Intuitor/evaluate_from_cache.py:14
↓ 1 callersFunctionextract_audio_metadata
Extract audio file metadata using ffprobe. Args: file_path: Path to audio file Returns: TextContent with au
chapter4/perception-tools/src/media_processing_tools.py:128
↓ 1 callersMethodextract_entities_relationships
Extract entities and relationships from text using LLM.
chapter3/structured-index/graphrag_indexer.py:106
↓ 1 callersFunctionextract_text_ocr
Extract text from image using OCR. Args: image_path: Path to image file language: OCR language (eng, chi_sim, etc.)
chapter4/perception-tools/src/media_processing_tools.py:206
↓ 1 callersFunctionextract_video_keyframes
Extract keyframes from video. Args: video_path: Path to video file num_frames: Number of keyframes to extract
chapter4/perception-tools/src/media_processing_tools.py:364
↓ 1 callersMethodfact_check
事实核查 - 验证陈述的真实性 Args: statement: 需要验证的陈述 Returns: 验证结果
chapter1/web-search-agent/examples.py:88
↓ 1 callersFunctionfig1_1
Three learning paradigms — caption 图 1-1.
book/gen_ch1_figs.py:69
↓ 1 callersFunctionfig1_2
Context ablation experiment design — caption 图 1-2.
book/gen_ch1_figs.py:122
↓ 1 callersFunctionfig1_3
Agent trajectory — caption 图 1-3.
book/gen_ch1_figs.py:177
↓ 1 callersFunctionfig1_4
Kimi K2 / GPT-5 native agent architecture — caption 图 1-4
book/gen_ch1_figs.py:9
↓ 1 callersFunctionfig1_5
Autonomous Agent loop — caption 图 1-5.
book/gen_ch1_figs.py:459
↓ 1 callersFunctionfig1_wf_chaining
Prompt chaining — workflow pattern (ch1 编排模式节).
book/gen_ch1_figs.py:264
↓ 1 callersFunctionfig1_wf_evaluator
Evaluator-optimizer — workflow pattern (ch1 编排模式节).
book/gen_ch1_figs.py:418
↓ 1 callersFunctionfig1_wf_orchestrator
Orchestrator-workers — workflow pattern (ch1 编排模式节).
book/gen_ch1_figs.py:383
↓ 1 callersFunctionfig1_wf_parallel
Parallelization — workflow pattern (ch1 编排模式节).
book/gen_ch1_figs.py:349
↓ 1 callersFunctionfig1_wf_routing
Routing — workflow pattern (ch1 编排模式节).
book/gen_ch1_figs.py:314
↓ 1 callersFunctionfig2_1
Context window with actual content snippets in each layer.
book/gen_ch2_figs.py:34
↓ 1 callersFunctionfig2_2
Qwen3-0.6B on local hardware + tool registry + ReAct loop.
book/gen_ch2_figs.py:93
↓ 1 callersFunctionfig2_3
Chat template token structure with actual token content and larger fonts.
book/gen_ch2_figs.py:172
↓ 1 callersFunctionfig2_4
KV Cache with concrete token sequences showing prefix reuse.
book/gen_ch2_figs.py:233
↓ 1 callersFunctionfig2_5
Show WHERE hints are inserted with actual hint text.
book/gen_ch2_figs.py:305
↓ 1 callersFunctionfig2_6
Data visualization comparing 6 strategies with actual experiment numbers.
book/gen_ch2_figs.py:389
↓ 1 callersFunctionfig2_7
6 compression strategies as pipeline variants.
book/gen_ch2_figs.py:473
↓ 1 callersFunctionfig2_8
Agent Skills with concrete PPTX example showing 3 layers.
book/gen_ch2_figs.py:529
↓ 1 callersFunctionfig2_9_memory_comparison
4 memory modes showing how the same info is stored differently.
book/gen_ch2_figs.py:783
↓ 1 callersFunctionfilter
( func: Callable[[T], bool], iterable: Iterable[T], max_concurrency: int | None = None, )
chapter2/prompt-engineering/tau_bench/model_utils/func_tools/filter.py:10
↓ 1 callersMethodfind_matching_workflows
Find all workflows that might match the given task. Args: task_description: Natural language description of the
chapter8/browser-use-rpa/learning_agent/knowledge_base.py:128
↓ 1 callersFunctionfmt
(v)
book/strip_titles.py:70
↓ 1 callersFunctionforce_json_prompt
( text: str, suffix_strategy: PromptSuffixStrategy = PromptSuffixStrategy.JSON, )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:56
↓ 1 callersFunctionforce_json_prompt
(text: str, with_prefix: bool = False)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:45
↓ 1 callersFunctionformatLatencyLog
(message: string)
chapter9/live-audio/frontend/pages/index.tsx:480
↓ 1 callersMethodformat_conversation
Format conversation dictionary into text
chapter2/log-sanitization/agent.py:250
↓ 1 callersFunctionformat_memory_operations
Format memory operations for display Args: operations: List of memory operations verbose: Whether to show detailed outpu
chapter3/user-memory/memory_operation_formatter.py:10
↓ 1 callersFunctionformat_operation_summary
Format operation summary statistics Args: summary: Dictionary with counts of operations Returns: Formatted
chapter3/user-memory/memory_operation_formatter.py:63
↓ 1 callersFunctionformat_time
Convert ISO timestamp to readable format
chapter2/system-hint/view_trajectory.py:12
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/user-memory/memory_manager.py:33
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/user-memory/conversation_history.py:31
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:54
← previousnext →1,001–1,100 of 2,925, ranked by callers