Quick Start Guide
Relevant source files
The following files were used as context for generating this wiki page:
The Chain-of-Ideas (CoI) Agent is an autonomous research system designed to revolutionize scientific inquiry by generating novel research ideas and experimental designs using Large Language Model (LLM) agents. This guide provides the necessary steps to set up the environment, configure the required API services, and execute the primary idea generation workflow.
The system utilizes a multi-agent architecture where a DeepResearchAgent performs literature reviews and idea synthesis, while a ReviewAgent provides iterative feedback to refine experimental protocols.
Installation and Environment Setup
To begin using the CoI Agent, the environment must be configured with Python dependencies, a PDF parsing service, and Java for document processing.
Prerequisites
- Python Dependencies: Install the required libraries via
pip.
Sources: README.md:32-36, requirements.txt - SciPDF Parser: Used for converting PDF research papers into structured JSON data.
Sources: README.md:39-43, searcher/sementic_search.py:257-264 - Java & Grobid: Required for the
scipdf_parserto function. Grobid must be running as a background service.
Sources: README.md:46-52, README.md:73-83
Configuration
System settings and API credentials are managed via a config.yaml file. This file must be populated with Semantic Scholar and OpenAI/Azure OpenAI keys before execution.
| Key | Description | Required |
|---|---|---|
SEMENTIC_SEARCH_API_KEY | API key for Semantic Scholar Academic Graph. | Yes |
MAIN_LLM_MODEL | The high-performance model (e.g., gpt-4o) for reasoning. | Yes |
CHEAP_LLM_MODEL | A cost-efficient model (e.g., gpt-4o-mini) for summarization. | Yes |
AZURE_OPENAI_ENDPOINT | Endpoint URL if using Azure OpenAI services. | Conditional |
is_azure | Boolean flag to toggle between OpenAI and Azure OpenAI. | Yes |
Sources: README.md:55-70, main.py:11-18
Workflow Architecture
The execution flow begins with a user-defined research topic and progresses through literature search, chain-of-ideas construction, and experimental refinement.
Execution Flow Diagram
The following diagram illustrates the sequence of operations triggered when running main.py.
The system identifies "anchor papers" to build a trajectory of research progression before proposing a new direction.
Sources: agents.py:116-160, main.py:43-56
Component Interaction
The DeepResearchAgent orchestrates the core logic, interacting with the SementicSearcher to retrieve papers and the LLM class to process text.
Sources: agents.py:270-350, main.py:40-52
Core Modules
1. DeepResearchAgent
This module handles the "Chain of Ideas" logic. It performs forward searches (citations) and backward searches (references) to understand the historical evolution of a topic.
- Key Function:
generate_idea_with_chain() - Novelty Check: Uses
check_novel()to ensure the generated idea is not a duplicate of existing literature.
Sources: agents.py:92-110, agents.py:352-378
2. SementicSearcher
A wrapper for the Semantic Scholar API that manages paper retrieval and PDF downloads.
- Reranking: It uses embeddings to rerank search results based on cosine similarity to the research topic.
- PDF Parsing: Converts downloaded PDFs into a dictionary format using
scipdf.
Sources: searcher/sementic_search.py:117-156, searcher/sementic_search.py:266-285
3. ReviewAgent
Acts as a "critic" to improve the quality of the generated output.
- Experimental Review: Analyzes the feasibility and clarity of the proposed experimental steps.
- Feedback Loop: Provides specific suggestions that the
DeepResearchAgentuses to refine the protocol.
Sources: agents.py:44-65, agents.py:408-423
Quick Start Command
Once configured, the system is executed from the command line:
python main.py --topic "Your research topic here" --improve_cnt 3
Argument Reference
| Argument | Type | Default | Description |
|---|---|---|---|
--topic | string | N/A | The research area to explore. |
--anchor_paper_path | string | None | Optional PDF path to start research from a specific paper. |
--improve_cnt | int | 1 | Number of iterations for experiment refinement. |
--max_chain_length | int | 5 | Maximum number of papers in the idea trajectory. |
Sources: main.py:23-33
Summary
The Quick Start Guide facilitates the deployment of the CoI Agent by detailing the transition from environment setup to autonomous execution. By leveraging multi-agent feedback and structured literature chains, the system moves beyond simple text generation to provide grounded, scientifically relevant research proposals. All outputs, including the idea chain and experimental plan, are consolidated into result.json.