gemy411/multi-research-agents

πŸ”Ž Search & Data Extraction🟒 Verified Active
0 Views
0 Installs

☁️ - a KTOR server/ MCP server written in Kotlin applying multi-agents schools in a flexible research system to be used with coding or for research any general case.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "gemy411-multi-research-agents": {
      "command": "npx",
      "args": [
        "-y",
        "gemy411-multi-research-agents"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Multi-Agent Research System

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.

Overview

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:

  • Break down complex queries into manageable sub-tasks
  • Perform parallel research across multiple domains
  • Iterate and refine research based on intermediate findings
  • Synthesize results from multiple specialized agents

Architecture

System Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                          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  β”‚  β”‚
              β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Lead Research Agent

The Lead Research Agent is the orchestrator of the entire system. It:

  • Analyzes incoming complex queries and determines the best approach
  • Deploys multiple subagents using the deployAgent tool
  • Coordinates parallel research activities
  • Synthesizes results from all subagents into comprehensive answers
  • Iterates by deploying additional subagents based on intermediate findings
  • Manages conversation history and compresses it when needed (>20 messages)

Key Features:

  • Uses Gemini Pro model for advanced reasoning
  • Supports up to 50 iterations for complex tasks
  • Parallel tool execution capabilities
  • Dynamic subagent deployment and management

Research Subagents

Research Subagents are specialized agents created by the lead agent to handle specific research tasks. Each subagent:

  • Focuses on a specific aspect of the research query
  • Searches the web using natural language queries
  • Fetches detailed content from specific URLs
  • Reports findings back to the lead agent

Key Features:

  • Uses Gemini Flash model for efficient processing
  • Optimized for focused research tasks (30 iterations max)
  • Equipped with web search and content fetching tools
  • Unique identification for tracking and coordination

Agent Workflow

  1. Query Reception: Complex research query received via MCP or REST API
  2. Analysis: Lead agent analyzes the query and creates research strategy
  3. Deployment: Lead agent deploys initial set of subagents with specific tasks
  4. Parallel Research: Multiple subagents work simultaneously on different aspects
  5. Progress Evaluation: Lead agent evaluates intermediate results
  6. Iterative Deployment: Additional subagents deployed if needed
  7. Synthesis: Lead agent combines all findings into comprehensive answer
  8. Response: Final research results returned to client

Technology Stack

Koog Framework

This implementation is built using the Koog AI Framework, a Kotlin-based framework for building sophisticated AI agent systems. Koog provides:

  • Agent Management: Core agent lifecycle and execution management
  • Tool Registry: Dynamic tool registration and execution
  • Strategy Patterns: Declarative agent behavior definition
  • Prompt Management: Sophisticated prompt engineering capabilities
  • Model Integration: Support for multiple LLM providers

Key Dependencies

  • Koog Agents Core: ai.koog.agents.core.* - Main agent framework
  • Koog Prompts: ai.koog.prompt.dsl.* - Prompt engineering tools
  • Ktor: Web server and HTTP client functionality
  • Model Context Protocol: MCP integration for external tool access
  • OpenRouter: LLM model access and execution

API Interfaces

The system exposes its functionality through two interfaces:

1. Model Context Protocol (MCP)

The system implements MCP to expose the DeepResearch tool, allowing integration with MCP-compatible clients:

{
  "tool": "DeepResearch",
  "arguments": {
    "query": "Your complex research question here"
  }
}

2. REST API

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.

Usage Examples

Complex Research Query

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

Multi-Domain Investigation

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

Installation & Running

Environment Setup

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)

Building & Running

# Build the project
./gradlew build

# Run the server
./gradlew run

Server Startup

When the server starts successfully, you'll see:

Application started in 0.303 seconds.
Responding at http://0.0.0.0:8080

Configuration

Agent Configuration

  • Lead Agent: Gemini Pro model, 50 max iterations, history compression
  • Subagents: Gemini Flash model, 30 max iterations, focused tools
  • Parallel Execution: Enabled for both agent types
  • Tool Registry: Dynamic tool registration and management

Search Configuration

  • Search Provider: Sonar Search Manager (using Sonar by Perplexity model)
  • Model Selection: OpenRouter is used across the entire application to access different models, including the Sonar by Perplexity model for search functionality
  • Content Fetching: Content extraction from web pages
  • Natural Language Results: Processed search results in conversational format

Development

Project Structure (Non-Final)

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

Key Classes

  • LeadResearchAgent: Main orchestrating agent
  • ResearchSubagent: Specialized research agents
  • ResearchLeadAgentTools: Tools available to lead agent (deployAgent, completeTask)
  • ResearchSubagentTools: Tools available to subagents (webSearch, webFetch)
  • SonarSearchManager: Search and content fetching implementation

Note: The complete task tool is now useless.

Contributing

This project demonstrates multi-agent coordination and can be extended with:

  • Optimizing parallel processing
  • Manage agent memory to save context window
  • Enhanced search capabilities
  • Integration with more LLM providers
  • Functional citation management
  • Performance monitoring and analytics

For more details check the Roadmap.md


Built with the Koog AI Framework - A powerful Kotlin framework for building sophisticated AI agent systems.

Related MCP Servers

linxule/mineru-mcp

πŸ“‡ ☁️ - MCP server for MinerU document parsing API. Parse PDFs, images, DOCX, and PPTX with OCR (109 languages), batch processing (200 docs), page ranges, and local file upload. 73% token reduction with structured output.

πŸ”Ž Search & Data Extraction1 views
0xdaef0f/job-searchoor

πŸ“‡ 🏠 - An MCP server for searching job listings with filters for date, keywords, remote work options, and more.

πŸ”Ž Search & Data Extraction0 views
Aas-ee/open-webSearch

🐍 πŸ“‡ ☁️ - Web search using free multi-engine search (NO API KEYS REQUIRED) β€” Supports Bing, Baidu, DuckDuckGo, Brave, Exa, and CSDN.

πŸ”Ž Search & Data Extraction0 views
ac3xx/mcp-servers-kagi

πŸ“‡ ☁️ - Kagi search API integration

πŸ”Ž Search & Data Extraction0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/29/2026, 10:18:13 AM

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.