Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
2,925 in github.com/bojieli/ai-agent-book
⨍
Functions
2,925
◇
Types & classes
570
↳
Endpoints
80
↓ 1 callers
Function
main
Quick start demonstration
chapter2/system-hint/quickstart.py:12
↓ 1 callers
Function
main
Main function with command-line argument support
chapter2/system-hint/main.py:344
↓ 1 callers
Function
main
Main entry point.
chapter1/learning-from-experience/quick_demo.py:134
↓ 1 callers
Function
main
Run all tests.
chapter1/learning-from-experience/test_basic.py:137
↓ 1 callers
Function
main
Main entry point for the experiment.
chapter1/learning-from-experience/experiment.py:423
↓ 1 callers
Function
main
Main menu for the demo.
chapter1/learning-from-experience/demo.py:172
↓ 1 callers
Function
main
()
chapter1/context/demo_conversation.py:13
↓ 1 callers
Function
main
Main test runner
chapter1/context/test_agent.py:192
↓ 1 callers
Function
main
Run all tests
chapter1/context/test_kimi.py:188
↓ 1 callers
Function
main
Quick start demonstration
chapter1/context/quickstart.py:12
↓ 1 callers
Function
main
()
chapter1/context/quick_test_kimi.py:13
↓ 1 callers
Function
main
独立运行示例,演示基本用法
chapter1/web-search-agent/agent.py:222
↓ 1 callers
Function
main
主函数
chapter1/web-search-agent/quickstart.py:142
↓ 1 callers
Function
main
主函数 Args: api_key: 可选的 API key
chapter1/web-search-agent/main.py:102
↓ 1 callers
Function
main
运行所有示例
chapter1/web-search-agent/examples.py:260
↓ 1 callers
Function
main
Main demonstration
chapter1/search-codegen/example_request.py:175
↓ 1 callers
Function
main
Run all demos
chapter1/search-codegen/quickstart.py:108
↓ 1 callers
Function
main
Main entry point
chapter1/search-codegen/main.py:272
↓ 1 callers
Function
main
Run the example client.
chapter4/collaboration-tools/client_example.py:148
↓ 1 callers
Function
main
Run all tests.
chapter4/execution-tools/test_file_tools.py:86
↓ 1 callers
Function
main
Run all tests.
chapter4/execution-tools/test_external_tools.py:86
↓ 1 callers
Function
main
Run all language tests.
chapter4/execution-tools/test_multilang.py:29
↓ 1 callers
Function
main
Run the MCP server.
chapter4/execution-tools/server.py:268
↓ 1 callers
Function
main
()
chapter4/execution-tools/hello.py:4
↓ 1 callers
Function
main
Run all tests.
chapter4/execution-tools/test_execution_tools.py:76
↓ 1 callers
Function
main
Run all examples.
chapter4/execution-tools/examples.py:135
↓ 1 callers
Function
main
Main entry point
chapter4/agent-with-event-trigger/client.py:320
↓ 1 callers
Function
main
Main entry point
chapter4/agent-with-event-trigger/server_fastapi.py:375
↓ 1 callers
Function
main
Run a simple demo of the event-triggered agent
chapter4/agent-with-event-trigger/test_demo.py:10
↓ 1 callers
Function
main
Main example function
chapter4/agent-with-event-trigger/example_with_mcp.py:15
↓ 1 callers
Function
main
Main entry point
chapter4/agent-with-event-trigger/server.py:375
↓ 1 callers
Function
main
Generate all remaining test cases
chapter3/user-memory-evaluation/generate_test_cases.py:290
↓ 1 callers
Function
main
Main entry point.
chapter3/user-memory-evaluation/main.py:276
↓ 1 callers
Function
main
Run all UI improvement demonstrations
chapter3/agentic-rag-for-user-memory/demo_ui_improvements.py:120
↓ 1 callers
Function
main
Run the demonstration
chapter3/agentic-rag-for-user-memory/demo_agent_logging.py:126
↓ 1 callers
Function
main
Run all tests
chapter3/agentic-rag-for-user-memory/test_llm_evaluation.py:169
↓ 1 callers
Function
main
Main entry point
chapter3/agentic-rag-for-user-memory/quickstart.py:127
↓ 1 callers
Function
main
Main entry point
chapter3/agentic-rag-for-user-memory/main.py:585
↓ 1 callers
Function
main
Run all logging tests
chapter3/agentic-rag-for-user-memory/test_logging.py:234
↓ 1 callers
Function
main
()
chapter3/structured-index/main.py:83
↓ 1 callers
Function
main
Main function with command-line argument support
chapter3/user-memory/main.py:827
↓ 1 callers
Function
main
Run all tests.
chapter3/retrieval-pipeline/test_pipeline.py:175
↓ 1 callers
Function
main
Run the server.
chapter3/retrieval-pipeline/main.py:256
↓ 1 callers
Function
main
Run the demonstration.
chapter3/retrieval-pipeline/demo.py:44
↓ 1 callers
Function
main
Main function
chapter3/contextual-retrieval/index_local_laws_contextual.py:539
↓ 1 callers
Function
main
Main function for standalone chunking and indexing
chapter3/contextual-retrieval/chunking.py:377
↓ 1 callers
Function
main
Quick demonstration of contextual retrieval
chapter3/contextual-retrieval/quickstart.py:19
↓ 1 callers
Function
main
Main function
chapter3/contextual-retrieval/main.py:185
↓ 1 callers
Function
main
Run the interactive demo
chapter3/contextual-retrieval/demo.py:403
↓ 1 callers
Function
main
Main evaluation function
chapter3/contextual-retrieval/evaluation/evaluate.py:363
↓ 1 callers
Function
main
Run a quick demo of the service.
chapter3/dense-embedding/quick_demo.py:15
↓ 1 callers
Function
main
Main entry point.
chapter3/dense-embedding/main.py:374
↓ 1 callers
Function
main
()
chapter3/sparse-embedding/quickstart.py:18
↓ 1 callers
Function
main
Run all tests
chapter3/sparse-embedding/test_engine.py:295
↓ 1 callers
Function
main
Run the complete demo
chapter3/sparse-embedding/demo.py:250
↓ 1 callers
Function
main
Main function for standalone chunking and indexing
chapter3/agentic-rag/chunking.py:377
↓ 1 callers
Function
main
Main function
chapter3/agentic-rag/index_local_laws.py:458
↓ 1 callers
Function
main
Main quickstart function
chapter3/agentic-rag/quickstart.py:161
↓ 1 callers
Function
main
Run all tests
chapter3/agentic-rag/test_structured_backends.py:173
↓ 1 callers
Function
main
Main function
chapter3/agentic-rag/main.py:185
↓ 1 callers
Function
main
Main evaluation function
chapter3/agentic-rag/evaluation/evaluate.py:363
↓ 1 callers
Function
main
Run all quickstart tests
chapter3/multimodal-agent/quickstart.py:208
↓ 1 callers
Function
main
Main entry point
chapter3/multimodal-agent/main.py:225
↓ 1 callers
Function
main
Run all demos
chapter3/multimodal-agent/demo.py:217
↓ 1 callers
Function
main
Run all UI improvement demonstrations
chapter3/contextual-retrieval-for-user-memory/demo_ui_improvements.py:120
↓ 1 callers
Function
main
Run the demonstration
chapter3/contextual-retrieval-for-user-memory/demo_agent_logging.py:126
↓ 1 callers
Function
main
Run all tests
chapter3/contextual-retrieval-for-user-memory/test_llm_evaluation.py:169
↓ 1 callers
Function
main
Main entry point
chapter3/contextual-retrieval-for-user-memory/quickstart.py:127
↓ 1 callers
Function
main
Main entry point
chapter3/contextual-retrieval-for-user-memory/main.py:731
↓ 1 callers
Function
main
Run all logging tests
chapter3/contextual-retrieval-for-user-memory/test_logging.py:234
↓ 1 callers
Function
make_gpt5_openrouter_request
Make a GPT-5 request using the exact format from the Go implementation This matches the GPT5OpenRouterRequest structure from the Go code
chapter1/search-codegen/example_request.py:11
↓ 1 callers
Method
manage_memory_cards
Manage advanced memory cards
chapter3/contextual-retrieval-for-user-memory/main.py:304
↓ 1 callers
Function
markdownToText
(markdown)
chapter9/live-audio/backend/utils/textProcessor.js:10
↓ 1 callers
Function
message_to_action
( message: Dict[str, Any], )
chapter2/prompt-engineering/tau_bench/agents/few_shot_agent.py:93
↓ 1 callers
Function
model_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 callers
Method
monitor_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:48
↓ 1 callers
Function
numberToWords
(num)
chapter9/live-audio/backend/utils/textProcessor.js:39
↓ 1 callers
Function
optimize_dataframe
Optimize DataFrame memory usage by downcasting numeric types. Args: df: Input DataFrame Returns: Optimized
chapter6/elo-leaderboard/parallel_processing.py:264
↓ 1 callers
Method
parameterize
Create a parameterized copy of this workflow with specific values. Args: parameters: Dictionary mapping paramete
chapter8/browser-use-rpa/learning_agent/workflow.py:163
↓ 1 callers
Function
parse
(s: str)
chapter2/prompt-engineering/tau_bench/model_utils/model/utils.py:77
↓ 1 callers
Function
parse_args
()
chapter2/prompt-engineering/run.py:10
↓ 1 callers
Function
parse_args
()
chapter2/prompt-engineering/run_ablation.py:30
↓ 1 callers
Function
parse_arguments
Parse command line arguments.
chapter8/gaia-experience/run_with_experience.py:41
↓ 1 callers
Function
parse_attrs
(attr_str)
book/strip_titles.py:32
↓ 1 callers
Function
parse_final_answer
Parse the final answer from the model response. For Thinking models, extract from <think>...</think> tags or after them.
chapter8/prompt-distillation/create_data.py:86
↓ 1 callers
Function
parse_image
Parse and understand image content. Args: image_path: Path to image file or URL use_llm: Whether to use LLM for image un
chapter4/perception-tools/src/multimodal_tools.py:219
↓ 1 callers
Function
parse_language_label
Extract the language label from model response.
chapter8/prompt-distillation/evaluate.py:45
↓ 1 callers
Function
parse_page_range
Parse page range string into list of page numbers. Args: page_range: String like "1-5" or "1,3,5" or "1-3,7,9-11" total_
chapter4/perception-tools/src/document_processing_tools.py:311
↓ 1 callers
Method
parse_pdf
Download and parse a PDF from URL or local file Args: url: URL or file path of the PDF to parse
chapter1/context/agent.py:57
↓ 1 callers
Method
parse_response
(self, response: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:136
↓ 1 callers
Method
parse_tool_calls
Parse tool calls from agent response using Qwen3 format
chapter2/attention_visualization/main.py:64
↓ 1 callers
Function
parse_video
Parse and extract information from video files. Args: video_path: Path to video file or URL extract_frames: Whether to e
chapter4/perception-tools/src/multimodal_tools.py:293
↓ 1 callers
Function
perform_searches
Perform various search queries to demonstrate the engine
chapter3/sparse-embedding/demo.py:136
↓ 1 callers
Method
phase1_learning
Phase 1: Learn how to send an email.
chapter8/browser-use-rpa/demo_email.py:56
↓ 1 callers
Method
phase2_replay
Phase 2: Replay learned workflow with different parameters.
chapter8/browser-use-rpa/demo_email.py:117
↓ 1 callers
Function
play_manual
Let the user play the game manually.
chapter1/learning-from-experience/demo.py:18
↓ 1 callers
Function
plot_leaderboard
Plot static leaderboard bar chart. Args: leaderboard_data: List of (model, rating, matches, wins) tuples top_n: Number o
chapter6/elo-leaderboard/visualization.py:13
↓ 1 callers
Function
plot_rating_distribution
Plot distribution of ratings across all models. Args: leaderboard_data: List of (model, rating, matches, wins) tuples sa
chapter6/elo-leaderboard/visualization.py:141
↓ 1 callers
Function
plot_win_rate_matrix
Plot heatmap of win rate matrix. Args: win_rate_df: DataFrame with win rates (rows beat columns) top_n: Number of models
chapter6/elo-leaderboard/visualization.py:54
↓ 1 callers
Function
predict_win_rate
Predict win rates between all model pairs using Elo ratings. Args: elo_ratings: Dictionary of model names to Elo ratings
chapter6/elo-leaderboard/bradley_terry.py:117
← previous
next →
1,301–1,400 of 2,925, ranked by callers