A Kotlin-based AI Deep Research agent that can autonomously plan, search, and synthesize information from the web using OpenAI models and custom tools.
- Multi-step reasoning: Breaks down user queries into actionable research plans.
- Tool-based agent architecture: Integrates web search and page loading tools to retrieve real-world data.
- Extensible: Easily add new tools or modify planning strategies.
- Pre-parsing with fast models: Uses lightweight models to generate detailed research instructions before executing full research.
- Test coverage: Includes unit and integration tests for core components (agent loop, tool handling, and pre-parser).
User Query
↓
Initial planner (fast LLM) → Structured Research Plan
↓
Research Agents (main LLM) for each Research Step
↓
Tool Execution: search_web, load_page
↓
Synthesis → Final Report
- Clone the repository:
git clone git@github.com:bestak/Deep-Research-Agent.git
cd deep-research-agent- Add your OpenAI API key and Brave Search API key to
.env:
OPENAI_API_KEY=...
BRAVE_API_KEY=...
- Build the project with Gradle:
./gradlew buildUsage: query [<options>] <query>
Options:
--initial-model=<text> The initial pre-processing LLM model
--agent-model=<text> The agent LLM model
-h, --help Show this message and exit
Arguments:
<query> The query to research using Deep Research agents
For example, run the agent with a user query:
./gradlew run --args="'Find recent research comparing Kotlin coroutines with Python async/await'"Plan a 5-day trip to Kyoto, Japan, for someone interested in culture and food. Find must-see sights, museums, and cultural experiences. Identify popular local restaurants or street food areas. Provide a suggested day-by-day itinerary that balances sightseeing and meals.
See query 1 results.
What is the company Jetbrains from the Czech Republic? What are they doing? Describe this business based on the available information.
See query 2 results.