This project implements a sophisticated multi-agent research system based on the concepts described in Anthropic's article: Building a Multi-Agent Research System. The system leverages the power of coordinated AI agents to handle deep and complex research queries that require multiple perspectives and iterative investigation. The system is built around a Lead Research Agent that orchestrates the e
Add this skill
npx mdskills install gemy411/multi-agents-researchWell-architected multi-agent research framework with clear component descriptions and comprehensive documentation
This project implements a sophisticated multi-agent research system based on the concepts described in Anthropic's article: Building a Multi-Agent Research System. The system leverages the power of coordinated AI agents to handle deep and complex research queries that require multiple perspectives and iterative investigation.
The system is built around a Lead Research Agent that orchestrates the entire research process. This lead agent has access to a powerful deployAgent tool that can dynamically create specialized Research Subagents to handle specific aspects of complex queries. The lead agent can deploy multiple subagents simultaneously and can choose to deploy additional subagents after each iteration based on the evolving needs of the research task.
This multi-agent architecture enables the system to:
┌─────────────────────────────────────────────────────────────────┐
│ Client Request │
└─────────────────────┬───────────────────┬───────────────────────┘
│ │
┌──────▼──────┐ ┌──────▼──────┐
│ MCP Tool │ │ REST API │
│"DeepResearch"│ │ /search │
└──────┬──────┘ └──────┬──────┘
│ │
└──────┬────────────┘
│
┌─────────────▼─────────────┐
│ Lead Research Agent │
│ ┌─────────────────────┐ │
│ │ deployAgent Tool │ │
│ └─────────────────────┘ │
│ ┌─────────────────────┐ │
│ │ completeTask │ │
│ └─────────────────────┘ │
└─────────────┬─────────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌─────▼─────┐ ┌─────▼─────┐ ┌─────▼─────┐
│ Subagent │ │ Subagent │ │ Subagent │
│ 1 │ │ 2 │ │ N │
│ ┌───────┐ │ │ ┌───────┐ │ │ ┌───────┐ │
│ │Search │ │ │ │Search │ │ │ │Search │ │
│ └───────┘ │ │ └───────┘ │ │ └───────┘ │
│ ┌───────┐ │ │ ┌───────┐ │ │ ┌───────┐ │
│ │ Fetch │ │ │ │ Fetch │ │ │ │ Fetch │ │
│ └───────┘ │ │ └───────┘ │ │ └───────┘ │
└───────────┘ └───────────┘ └───────────┘
│ │ │
└───────────────┼───────────────┘
│
┌───────────▼───────────┐
│ Sonar Search │
│ Manager │
│ ┌─────────────────┐ │
│ │ Web Search │ │
│ │ Content Fetch │ │
│ └─────────────────┘ │
└───────────────────────┘
The Lead Research Agent is the orchestrator of the entire system. It:
deployAgent toolKey Features:
Research Subagents are specialized agents created by the lead agent to handle specific research tasks. Each subagent:
Key Features:
This implementation is built using the Koog AI Framework, a Kotlin-based framework for building sophisticated AI agent systems. Koog provides:
ai.koog.agents.core.* - Main agent frameworkai.koog.prompt.dsl.* - Prompt engineering toolsThe system exposes its functionality through two interfaces:
The system implements MCP to expose the DeepResearch tool, allowing integration with MCP-compatible clients:
{
"tool": "DeepResearch",
"arguments": {
"query": "Your complex research question here"
}
}
A standard HTTP API is also available:
GET /search?query=Your%20complex%20research%20question%20here
Both interfaces use the same underlying Lead Research Agent and provide identical functionality.
Query: "Compare the latest developments in quantum computing approaches by major tech companies and analyze their potential impact on cryptography"
Process:
1. Lead agent analyzes the multi-faceted query
2. Deploys subagents for:
- IBM quantum computing developments
- Google quantum computing research
- Microsoft quantum initiatives
- Quantum cryptography implications
3. Subagents perform parallel research
4. Lead agent evaluates findings and deploys additional subagents for:
- Timeline comparisons
- Technical depth analysis
5. Final synthesis into comprehensive report
Query: "Investigate the economic, environmental, and social impacts of vertical farming adoption in urban areas"
Process:
1. Lead agent identifies three main research domains
2. Simultaneously deploys subagents for:
- Economic analysis and market data
- Environmental impact studies
- Social and community effects
3. Each subagent conducts focused research in their domain
4. Lead agent synthesizes cross-domain insights
5. Additional subagents deployed for comparative analysis
Configure your environment variables by copying the example environment file:
# Copy the example environment file
cp example.env .env
# Edit the .env file with your API keys and port configuration
# The .env file should contain:
OPEN_ROUTER_API_KEY="your_api_key_here"
PORT=4321 # Optional: server port (defaults to 8080)
# Build the project
./gradlew build
# Run the server
./gradlew run
When the server starts successfully, you'll see:
Application started in 0.303 seconds.
Responding at http://0.0.0.0:8080
src/..
├── agents/
│ ├── lead/ # Lead Research Agent implementation
│ ├── subagent/ # Research Subagent implementation
│ ├── search/ # Search functionality
│ ├── models/ # LLM model configurations
│ └── prompts/ # Prompt templates and factory
├── mcp/ # Model Context Protocol integration
├── Application.kt # Main application entry point
└── Routing.kt # API routing configuration
LeadResearchAgent: Main orchestrating agentResearchSubagent: Specialized research agentsResearchLeadAgentTools: Tools available to lead agent (deployAgent, completeTask)ResearchSubagentTools: Tools available to subagents (webSearch, webFetch)SonarSearchManager: Search and content fetching implementationNote: The complete task tool is now useless.
This project demonstrates multi-agent coordination and can be extended with:
For more details check the Roadmap.md
Built with the Koog AI Framework - A powerful Kotlin framework for building sophisticated AI agent systems.
Install via CLI
npx mdskills install gemy411/multi-agents-researchMulti-Agent Research System is a free, open-source AI agent skill. This project implements a sophisticated multi-agent research system based on the concepts described in Anthropic's article: Building a Multi-Agent Research System. The system leverages the power of coordinated AI agents to handle deep and complex research queries that require multiple perspectives and iterative investigation. The system is built around a Lead Research Agent that orchestrates the e
Install Multi-Agent Research System with a single command:
npx mdskills install gemy411/multi-agents-researchThis downloads the skill files into your project and your AI agent picks them up automatically.
Multi-Agent Research System works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Codex, Gemini Cli, Amp, Roo Code, Goose, Opencode, Trae, Qodo, Command Code, Factory. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.