Overview
Implemented insrc/core/agent_scheduler.py:349, the solve_task_with_repo() method serves as the main entry point for RepoMaster. It coordinates three specialized agents through intelligent task analysis and automatic mode selection.
Key Features
Automatic Agent Selection
Intelligently determines the best agent for each task
Multi-Agent Orchestration
Coordinates multiple agents for complex workflows
Adaptive Strategy
Switches approaches based on results and feedback
Unified Entry Point
Single method for all RepoMaster capabilities
Usage
Basic Usage
CLI Mode
- Information Query
- Coding Task
- Repository Task
Method Signature
solve_task_with_repo()
Main entry point for RepoMaster with automatic agent selection. Source:src/core/agent_scheduler.py:349
Detailed task description that user needs to solve
str - Complete solution report including analysis methods, execution results, and recommendations
Working Modes
The Unified Interface supports three distinct modes:1. Web Search Mode
Triggered when:- Task requires real-time information
- Questions about current events or latest data
- Information beyond model’s knowledge cutoff
- General knowledge queries
web_search() method (source: src/core/agent_scheduler.py:127)
2. Repository Mode
Triggered when:- Task mentions GitHub URLs or repository paths
- User references specific libraries or frameworks
- Task requires specialized code from repositories
- Local repository paths are detected
run_repository_agent() method (source: src/core/agent_scheduler.py:178)
3. General Code Assistant Mode
Triggered when:- General programming questions
- Algorithm implementation requests
- Code debugging help
- No specific repository mentioned
run_general_code_assistant() method (source: src/core/agent_scheduler.py:273)
Scheduler System Prompt
The intelligent orchestration is guided by a sophisticated system prompt: Source:src/core/agent_scheduler.py:19
Key Responsibilities
Task Analysis and Assessment
Task Analysis and Assessment
- Web Search Assessment: First determine if task needs real-time data
- Plan Creation: For repository tasks, prioritize:
- Search for relevant repositories
- Identify suitable repository
- Execute using that repository
Tool Selection Strategy
Tool Selection Strategy
- Execute plan by selecting one appropriate tool at a time
- Repository Mode: Use
run_repository_agent(auto-detects GitHub/local) - General Code Assistant: Use
run_general_code_assistant - Web Search: Use
web_searchfor real-time information
Repository-First Approach
Repository-First Approach
- Search: Use
github_repo_searchto find relevant repositories - Execute: Select most promising repo and use
run_repository_agent - Evaluate: Critically assess if result satisfies requirements
- Retry: If unsuccessful, try next best repository
- Persist: Continue until task completed or options exhausted
Sequential Execution and Fallback
Sequential Execution and Fallback
- Base subsequent tools on:
- Outcomes of previous tools
- Current state of plan
- Capabilities of available tools
- Fallback to alternative modes if primary approach fails
- Be persistent in finding solutions
Available Tools
The scheduler registers four tools for intelligent orchestration: Source:src/core/agent_scheduler.py:334
web_search()
Perform general web search for real-time information.Query for general web search to get real-time information
run_repository_agent()
Execute tasks using GitHub or local repositories.Complete task description
GitHub URL or local path
JSON string of input files
‘github’ or ‘local’ (auto-detected)
run_general_code_assistant()
Provide general programming assistance.Programming task or question
Specific working directory
github_repo_search()
Search for relevant GitHub repositories.Task description for finding relevant code libraries
Agent Collaboration
The Unified Interface uses two agents that work together:Scheduler Agent
Name:scheduler_agent
Role: Enhanced Task Scheduler
Responsibilities:
- Analyze user input
- Create structured task plans
- Select and call appropriate tools
- Evaluate results and adjust strategy
src/core/agent_scheduler.py:110
User Proxy Agent
Name:user_proxy
Role: Execution Proxy
Responsibilities:
- Execute tools and functions
- Return results to scheduler
- Never provide user-facing answers directly
- Avoid repeating scheduler’s content
src/core/agent_scheduler.py:118
Conversation Configuration
The unified interface uses these conversation parameters: Source:src/core/agent_scheduler.py:382
Example Workflows
- Multi-Step Repository Task
- Information + Coding
- Adaptive Repository Search
Interactive CLI Features
Source:launcher.py:372
The unified mode CLI provides rich interactive features:
Commands
quit/exit/q: Exit the sessionhistory/h: View conversation historyclear/c: Clear conversation history
Conversation Memory
The unified interface maintains conversation context:Benefits of Unified Interface
Simplicity
Single entry point for all capabilities - no need to choose agents manually
Intelligence
Automatic task analysis and optimal agent selection
Adaptability
Switches strategies based on results and feedback
Persistence
Retries with alternative approaches when initial attempts fail
De-duplication Policy
Both agents follow strict de-duplication rules to avoid repetitive responses: Source:src/core/agent_scheduler.py:69 (scheduler) and src/core/agent_scheduler.py:78 (user proxy)
Before sending messages, agents compare with previous two messages. If the response would substantially repeat previously stated content, they avoid restating it or send “TERMINATE” if the task is complete.
Performance Optimization
Caching
The unified interface benefits from LLM caching:Conversation Management
Conversation history is optimized through:- Context-aware prompt optimization
- Automatic summarization after max_turns
- Message de-duplication
When to Use Unified Interface
✅ Ideal for:- Complex tasks requiring multiple steps
- Tasks where the optimal approach is unclear
- Users who want automatic agent selection
- Workflows combining search, repository analysis, and coding
- Iterative problem-solving with adaptive strategies
- You know exactly which agent you need
- You want maximum control over the workflow
- You’re using RepoMaster programmatically with specific requirements
- You want to minimize conversation turns
Next Steps
Deep Search
Direct web search access
Programming Assistant
Direct coding assistance
Repository Agent
Direct repository access