MCPcopy Create free account

hub / github.com/bojieli/ai-agent-book / types & classes

Types & classes570 in github.com/bojieli/ai-agent-book

↓ 79 callersClassSVG
SVG diagram builder.
book/svg_lib.py:68
↓ 55 callersClassActionResponse
Standard response format for all perception tool actions.
chapter4/perception-tools/src/base.py:16
↓ 24 callersClassContextAwareAgent
AI Agent with configurable LLM providers and context modes for ablation studies
chapter1/context/agent.py:306
↓ 21 callersClassGrepTool
Pure Python grep implementation
chapter5/coding-agent/tools/grep_tool.py:14
↓ 17 callersClassBashTool
Executes bash commands in persistent shell sessions
chapter5/coding-agent/tools/bash_tool.py:12
↓ 16 callersClassEloRatingSystem
Implementation of Elo rating system for model comparison. The Elo system updates ratings based on pairwise comparison outcomes, wher
chapter6/elo-leaderboard/elo_rating.py:9
↓ 16 callersClassLLMHelper
Helper class for LLM-based operations.
chapter4/execution-tools/llm_helper.py:9
↓ 15 callersClassTreasureHuntGame
A text-based game with hidden mechanics that agents must discover: 1. Certain colored keys open corresponding colored doors 2. Guards blo
chapter1/learning-from-experience/game_environment.py:39
↓ 14 callersClassMultimodalAgent
Main agent class supporting multiple extraction modes
chapter3/multimodal-agent/agent.py:280
↓ 13 callersClassMultimodalContent
Container for multimodal content
chapter3/multimodal-agent/agent.py:50
↓ 12 callersClassMessage
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:40
↓ 12 callersClassReadTool
Reads files from the local filesystem
chapter5/coding-agent/tools/read_tool.py:11
↓ 11 callersClassEditTool
Performs exact string replacements in files
chapter5/coding-agent/tools/edit_tool.py:11
↓ 11 callersClassLSTool
Lists files and directories
chapter5/coding-agent/tools/ls_tool.py:12
↓ 11 callersClassNotebookEditTool
Completely replaces the contents of a specific cell in a Jupyter notebook
chapter5/coding-agent/tools/notebook_edit_tool.py:11
↓ 11 callersClassSystemHintConfig
Configuration for system hints
chapter2/system-hint/agent.py:60
↓ 11 callersClassWriteTool
Writes files to the local filesystem
chapter5/coding-agent/tools/write_tool.py:11
↓ 10 callersClassConversationChunk
A chunk of conversation with metadata
chapter3/contextual-retrieval-for-user-memory/chunker.py:33
↓ 9 callersClassConversationMessage
Single message in a conversation
chapter3/contextual-retrieval-for-user-memory/chunker.py:22
↓ 9 callersClassGlobTool
Fast file pattern matching tool
chapter5/coding-agent/tools/glob_tool.py:11
↓ 9 callersClassKVCacheAgent
ReAct Agent with different KV cache optimization modes
chapter2/kv-cache/agent.py:318
↓ 9 callersClassMemoryIndexer
Indexes and searches conversation chunks using the retrieval pipeline service
chapter3/agentic-rag-for-user-memory/indexer.py:43
↓ 9 callersClassMemoryIndexer
Indexes and searches conversation chunks using the retrieval pipeline service
chapter3/contextual-retrieval-for-user-memory/indexer.py:43
↓ 9 callersClassMultiEditTool
Makes multiple edits to a single file in one operation
chapter5/coding-agent/tools/multi_edit_tool.py:11
↓ 9 callersClassSystemHintAgent
AI Agent with enhanced system hints for better trajectory management
chapter2/system-hint/agent.py:73
↓ 8 callersClassLearningAgent
An agent that learns from experience and can replay learned workflows. This agent: 1. Attempts to match tasks to learned workflows
chapter8/browser-use-rpa/learning_agent/agent.py:31
↓ 8 callersClassModelError
chapter2/prompt-engineering/tau_bench/model_utils/model/exception.py:7
↓ 8 callersClassTodoWriteTool
Creates and manages structured task lists
chapter5/coding-agent/tools/todo_write_tool.py:9
↓ 8 callersClassToolRegistry
Registry for managing available tools
chapter2/local_llm_serving/tools.py:16
↓ 7 callersClassAction
chapter2/prompt-engineering/tau_bench/types.py:10
↓ 7 callersClassAgenticRAG
Agentic RAG system with ReAct pattern and multiple LLM provider support
chapter3/agentic-rag/agent.py:28
↓ 7 callersClassConversationChunk
A chunk of conversation with metadata
chapter3/agentic-rag-for-user-memory/chunker.py:33
↓ 7 callersClassExecutionTools
Generic execution tools with safety and result analysis.
chapter4/execution-tools/execution_tools.py:14
↓ 7 callersClassMemoryProcessorConfig
Configuration for the background memory processor
chapter3/user-memory/background_memory_processor.py:35
↓ 7 callersClassMessage
Unified message format
chapter3/multimodal-agent/agent.py:29
↓ 6 callersClassAdvancedMemoryCard
Represents an advanced memory card with complete metadata. Each card MUST include: - backstory: Context about when/why this informat
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:20
↓ 6 callersClassBackgroundMemoryProcessor
Background processor that analyzes conversations and updates memory Runs separately from the main conversation flow
chapter3/user-memory/background_memory_processor.py:45
↓ 6 callersClassCompressedContent
Represents compressed content
chapter2/context-compression/compression_strategies.py:31
↓ 6 callersClassConversationMessage
Single message in a conversation
chapter3/agentic-rag-for-user-memory/chunker.py:22
↓ 6 callersClassConversationalAgent
Pure conversational agent that focuses on dialogue Reads memory for context but doesn't update it directly
chapter3/user-memory/conversational_agent.py:32
↓ 6 callersClassExternalTools
External system integration tools.
chapter4/execution-tools/external_tools.py:30
↓ 6 callersClassFileTools
File system tools with verification and safety checks.
chapter4/execution-tools/file_tools.py:10
↓ 6 callersClassGPT5NativeAgent
GPT-5 Agent with Native Tool Support This agent uses GPT-5's native web_search and code_interpreter capabilities through the OpenRou
chapter1/search-codegen/agent.py:35
↓ 6 callersClassMemoryTools
Tools for searching and retrieving user memory information
chapter3/contextual-retrieval-for-user-memory/tools.py:33
↓ 6 callersClassTask
chapter2/prompt-engineering/tau_bench/types.py:15
↓ 5 callersClassAdvancedWebSearchAgent
高级 Web Search Agent - 扩展功能
chapter1/web-search-agent/examples.py:16
↓ 5 callersClassClassifyDatapoint
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:131
↓ 5 callersClassCodingAgent
Main coding agent with streaming support and modular tool system
chapter5/coding-agent/agent.py:18
↓ 5 callersClassConfig
Main configuration class for multimodal agent
chapter3/multimodal-agent/config.py:34
↓ 5 callersClassContextualMemoryEvaluator
Evaluates the dual memory system on test cases
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:123
↓ 5 callersClassContextualMemoryIndexer
Dual-layer memory indexer combining: 1. Contextual RAG for conversation chunks 2. Advanced JSON cards for structured facts
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:45
↓ 5 callersClassContextualUserMemoryAgent
Agent with dual memory system: structured cards + contextual RAG
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:64
↓ 5 callersClassConversationConfig
Configuration for the conversational agent
chapter3/user-memory/conversational_agent.py:23
↓ 5 callersClassKnowledgeBase
Manages storage and retrieval of learned workflows. The knowledge base provides: - Persistent storage of workflows - Intent matc
chapter8/browser-use-rpa/learning_agent/knowledge_base.py:31
↓ 5 callersClassLLMEvaluator
LLM-based evaluator for agent responses.
chapter3/user-memory-evaluation/evaluator.py:11
↓ 5 callersClassLocalFileTools
Local implementations of file system tools
chapter2/kv-cache/agent.py:61
↓ 5 callersClassMemoryTools
Tools for searching and retrieving user memory information
chapter3/agentic-rag-for-user-memory/tools.py:33
↓ 5 callersClassSparseSearchEngine
Main search engine combining all components
chapter3/sparse-embedding/bm25_engine.py:365
↓ 5 callersClassSystemHintConfig
Configuration for system hints
chapter4/agent-with-event-trigger/agent.py:66
↓ 5 callersClassSystemState
System state tracking for system hints
chapter5/coding-agent/system_state.py:13
↓ 5 callersClassToolRegistry
Registry for available tools
chapter1/context/agent.py:53
↓ 5 callersClassUserMemoryEvaluator
Evaluates the RAG agent on user memory test cases
chapter3/agentic-rag-for-user-memory/evaluator.py:119
↓ 5 callersClassWorkflow
Represents a complete workflow that can be learned and replayed
chapter8/browser-use-rpa/learning_agent/workflow.py:97
↓ 4 callersClassAgentConfig
Configuration for the System-Hint Agent
chapter2/system-hint/config.py:11
↓ 4 callersClassBashOutputTool
Retrieves output from running or completed background bash shells
chapter5/coding-agent/tools/bash_output_tool.py:11
↓ 4 callersClassContextualChunk
Enhanced chunk with contextual information
chapter3/contextual-retrieval/contextual_chunking.py:26
↓ 4 callersClassContextualChunker
Implements contextual chunking inspired by Anthropic's Contextual Retrieval. Key Educational Points: 1. Context Generation: Uses LLM
chapter3/contextual-retrieval/contextual_chunking.py:54
↓ 4 callersClassConversationChunker
Chunks conversation histories into segments for RAG indexing
chapter3/contextual-retrieval-for-user-memory/chunker.py:90
↓ 4 callersClassConversationHistory
A conversation history containing multiple messages.
chapter3/user-memory-evaluation/models.py:25
↓ 4 callersClassDocument
Document data class.
chapter3/dense-embedding/document_store.py:11
↓ 4 callersClassEventTriggeredAgent
Event-Triggered AI Agent with System Hints Responds to events while maintaining all system hint capabilities
chapter4/agent-with-event-trigger/agent.py:207
↓ 4 callersClassGraphRAGIndexer
GraphRAG knowledge graph indexer with entity extraction and community detection.
chapter3/structured-index/graphrag_indexer.py:58
↓ 4 callersClassInvertedIndex
Inverted index data structure for efficient term lookup
chapter3/sparse-embedding/bm25_engine.py:116
↓ 4 callersClassKnowledgeBaseType
Knowledge base backend types
chapter3/contextual-retrieval/config.py:22
↓ 4 callersClassKnowledgeBaseType
Knowledge base backend types
chapter3/agentic-rag/config.py:22
↓ 4 callersClassLLMAgent
LLM-based agent that uses in-context learning to play the game. Stores experiences and uses them to reason about future actions.
chapter1/learning-from-experience/llm_agent.py:25
↓ 4 callersClassOllamaNativeAgent
Agent using Ollama's native tool calling support
chapter2/local_llm_serving/ollama_native.py:16
↓ 4 callersClassPubChemMetadata
Metadata for PubChem operation results.
chapter4/perception-tools/src/pubchem_tools.py:35
↓ 4 callersClassQLearningAgent
Q-learning agent for the treasure hunt game. Uses tabular Q-learning with state-action pairs.
chapter1/learning-from-experience/rl_agent.py:14
↓ 4 callersClassRaptorIndexer
RAPTOR tree-based document indexer with recursive summarization.
chapter3/structured-index/raptor_indexer.py:37
↓ 4 callersClassResearchAgent
AI Agent for researching with context compression
chapter2/context-compression/agent.py:49
↓ 4 callersClassSearchResult
Search result from knowledge base
chapter3/contextual-retrieval/tools.py:15
↓ 4 callersClassSearchResult
Search result from knowledge base
chapter3/agentic-rag/tools.py:15
↓ 4 callersClassSolveResult
chapter2/prompt-engineering/tau_bench/types.py:38
↓ 4 callersClassToolCallingAgent
Universal tool calling agent that works on all platforms Automatically selects vLLM (if GPU available) or Ollama
chapter2/local_llm_serving/main.py:23
↓ 4 callersClassUserMemoryRAGAgent
Agent that uses RAG to answer questions about user conversation history
chapter3/agentic-rag-for-user-memory/agent.py:58
↓ 4 callersClassUserMemoryRAGAgent
Agent that uses RAG to answer questions about user conversation history
chapter3/contextual-retrieval-for-user-memory/agent.py:58
↓ 4 callersClassWebSearchAgent
Web Search Agent - 使用 Kimi API 的内置搜索工具 根据官方文档: https://platform.moonshot.ai/docs/guide/use-web-search Kimi 提供了内置的 $web_search 工具
chapter1/web-search-agent/agent.py:33
↓ 4 callersClassYFinanceMetadata
Metadata for Yahoo Finance operation results.
chapter4/perception-tools/src/yahoo_finance_tools.py:24
↓ 3 callersClassAgenticRAG
Agentic RAG system with ReAct pattern and multiple LLM provider support
chapter3/contextual-retrieval/agent.py:28
↓ 3 callersClassChunkingConfig
Document chunking configuration
chapter3/contextual-retrieval/config.py:149
↓ 3 callersClassChunkingConfig
Configuration for conversation chunking
chapter3/contextual-retrieval-for-user-memory/config.py:111
↓ 3 callersClassCommunity
Represents a community of related entities.
chapter3/structured-index/graphrag_indexer.py:49
↓ 3 callersClassContextualKnowledgeBaseTools
Enhanced knowledge base tools with contextual retrieval support. Key Educational Points: 1. Dual Indexing: Maintains both contextual
chapter3/contextual-retrieval/contextual_tools.py:49
↓ 3 callersClassConversationHistory
Manages conversation history with optional vector search
chapter3/user-memory/conversation_history.py:36
↓ 3 callersClassEvaluationResult
Result of evaluating an agent's response.
chapter3/user-memory-evaluation/models.py:74
↓ 3 callersClassExitPlanModeTool
Use this tool when you are in plan mode and ready to code
chapter5/coding-agent/tools/exit_plan_mode_tool.py:9
↓ 3 callersClassGameExperience
Represents a single game interaction experience.
chapter1/learning-from-experience/llm_agent.py:16
↓ 3 callersClassIndexConfig
Configuration for RAG indexing
chapter3/contextual-retrieval-for-user-memory/config.py:122
↓ 3 callersClassIndexMode
Indexing modes for conversation chunks
chapter3/agentic-rag-for-user-memory/config.py:23
next →1–100 of 570, ranked by callers