What is RepoMaster?
RepoMaster is an intelligent multi-agent system designed to understand, analyze, and work with code repositories. The system orchestrates specialized agents to handle complex programming tasks through collaborative intelligence.Multi-Agent Collaboration
Multiple specialized agents work together to solve complex tasks
Repository Intelligence
Deep understanding of code structure and dependencies
Adaptive Task Routing
Automatic selection of optimal execution strategy
Virtual Environment Management
Isolated execution environments for safe code execution
System Architecture
RepoMaster follows a hierarchical architecture with three main layers:Core Components
1. RepoMasterAgent (launcher.py:83-414)
The main orchestrator that coordinates all system operations. Located insrc/core/agent_scheduler.py.
Key Methods:
solve_task_with_repo(task: str)- Main entry point for task executionrun_repository_agent(task_description, repository, input_data)- Execute repository-based tasksrun_general_code_assistant(task_description)- Provide general programming assistanceweb_search(query)- Search for real-time informationgithub_repo_search(task)- Find relevant repositories
Web Search Mode
Web Search Mode
Uses the
AutogenDeepSearchAgent to search the internet for real-time information, current events, or external knowledge.When to use: Questions requiring latest data, documentation lookup, general knowledge queries.Repository Mode
Repository Mode
Analyzes and executes tasks within GitHub or local repositories using hierarchical exploration.When to use: Tasks involving specific codebases, repository analysis, code modification.
General Code Assistant Mode
General Code Assistant Mode
Provides programming assistance without requiring a specific repository.When to use: General programming questions, algorithm implementations, code examples.
2. TaskManager (git_task.py:159-256)
Manages task initialization and environment setup. Key Methods:initialize_tasks(args)- Initialize task environment and configurationprepare_task_description(task_info, ...)- Generate formatted task promptsget_task_prompt()- Return standard task template
- Create unique working directories for task isolation
- Parse task configuration from YAML or direct input
- Generate structured task descriptions with context
3. AgentRunner (git_task.py:258-343)
Executes code agents to complete tasks. Key Methods:run_agent(task_info, retry_times=2)- Run CodeExplorer to execute tasksprocess_single_task(task_info, args)- Process individual tasks with error handling
- Create isolated working directory
- Setup task environment (clone/copy repository, prepare input data)
- Generate comprehensive task description
- Initialize and run CodeExplorer
- Monitor execution and handle retries
4. CodeExplorer (agent_code_explore.py:24-353)
The intelligent code exploration and execution agent. Initialization:Code_Explorer- Assistant agent that plans and analyzesCoder_Executor- User proxy agent that executes code and toolsCodeExplorerTools- Repository analysis toolkit
Data Flow
Understanding the data flow helps you see how information moves through the system from user input to final output.
Configuration Management
RepoMaster uses a flexible configuration system: LLM Configuration (configs/oai_config.py):- Multiple API provider support (OpenAI, Claude, DeepSeek, etc.)
- Service-specific configurations
- Automatic fallback mechanisms
- API keys (SERPER_API_KEY, JINA_API_KEY)
- Model configurations
- Service endpoints
Virtual Environment Management
TheBaseCodeExplorer class (base_code_explorer.py:15-304) provides sophisticated virtual environment management:
Features:
- Persistent environment reuse for faster startup
- Automatic dependency installation
- Base environment copying for efficiency
- Elegant progress display
_load_venv_context(venv_dir, is_clear_venv, base_venv_path)- Load or create virtual environment_create_virtual_env(venv_path)- Create new environment with dependenciescleanup_venv()- Clean up temporary environments
Next Steps
Multi-Agent System
Learn how agents collaborate
Task Routing
Understand task scheduling
Repository Exploration
Discover code analysis capabilities
Quickstart Guide
Start using RepoMaster