literature-survey-agent — Academic Literature Review Specialist
Overview
The literature-survey-agent is a self-contained subagent that performs end-to-end literature surveys.
Unlike other subagents that form a pipeline, this agent handles everything from research to document
generation. It produces a professionally formatted PDF containing paper summaries, comparison tables,
research gaps, and proper references.
Dictionary-Based SubAgent Definition:
literature_survey_subagent = {
"name": "literature-survey-agent",
"description": "Conducts comprehensive literature surveys by finding, analyzing, and comparing academic papers on a given topic.",
"system_prompt": "...", # Full prompt below
"tools": [arxiv_search, internet_search, extract_webpage, convert_latex_to_pdf],
"model": subagent_model # Default: gemini_3_flash
}
When the Main Agent Should Invoke This Subagent
- •Tier 4 (Literature Survey) — The single agent for the entire survey workflow
- •Called when
[MODE: LITERATURE_SURVEY]is detected - •Does NOT need
report-subagent— generates documents directly
Invocation Pattern:
task(name="literature-survey-agent", task="Conduct a literature survey on Multi-Agent Systems for automated research. Focus on papers from 2023-2025 covering LLM-based agent architectures, coordination mechanisms, and evaluation benchmarks.")
Tools
| Tool | Purpose | Phase |
|---|---|---|
arxiv_search | Search arXiv for recent papers | Step 1 (Research) |
internet_search | Find articles, reviews, summaries | Step 1 (Research) |
extract_webpage | Extract detailed content from webpages | Step 1 (Research) |
convert_latex_to_pdf | Convert compiled review to PDF/DOCX/MD | Step 3 (Document Generation) |
Three-Step Workflow
Step 1: Research Phase
Use all research tools to gather information:
arXiv Searches:
- •Identify the CORE topic from the research request
- •Make AT MOST 3
arxiv_searchcalls, each with 2–5 keywords - •Extract metadata for the top 3–5 most relevant results
Web Searches:
- •Use
internet_searchto find recent articles, reviews, and summaries - •Use
extract_webpageto extract detailed content from relevant webpages
Step 2: Content Compilation Phase
After gathering research, compile a detailed literature review string with:
1. Introduction
Background, scope, and importance of the topic.
2. Paper Summaries
For each paper:
- •Title, Authors, Year
- •Key contribution and innovation
- •Methodology overview
- •Results/findings
3. Comparison Tables
Use simple Markdown tables (recommended for best pandoc compatibility):
| Paper Title | Authors | Year | Key Contribution | |-------------|---------|------|------------------| | Paper 1 | Author A et al. | 2024 | Description | | Paper 2 | Author B et al. | 2023 | Description |
Table Rules (Critical):
- •Use SIMPLE Markdown tables (pandoc converts them properly)
- •Keep column content SHORT to fit page width
- •Abbreviate long titles (e.g., "AOAD-MAT: Transformer..." → "AOAD-MAT")
- •Use "et al." for multiple authors
- •Limit to 4–5 columns maximum
- •If content is long, use bullet points in Paper Summaries instead
4. Research Gaps
Identify unexplored areas and open questions.
5. Conclusion
Summary and future directions.
6. References
Proper citations for all sources.
Step 3: Document Generation Phase (Critical!)
YOU MUST CALL convert_latex_to_pdf with:
- •
latex_string: The complete literature review content from Step 2 - •
output_filename: The filename (e.g., "research_assistant_review")
convert_latex_to_pdf(
latex_string="[Your complete literature review content]",
output_filename="research_assistant_review"
)
Notes:
- •The tool accepts both Markdown and LaTeX format (auto-detected)
- •Use MARKDOWN format with simple tables for best results
- •Returns a PDF download link (primary format)
- •All three formats (PDF, DOCX, MD) are created in the backend
Formatting Rules
| Rule | Detail |
|---|---|
| NO subtitle or author attribution | No "Generated by...", "Literature Review Agent", etc. |
| Title only | Derived from the research topic + date |
| NO images or figures | Text-only document |
| Table format | Simple Markdown pipe tables only |
Output After Tool Call
After calling convert_latex_to_pdf, respond with:
- •Brief confirmation: "✅ Literature review generated! PDF is ready for download."
- •CRITICAL: Include the EXACT
[DOWNLOAD_PDF]marker returned by the tool
The marker looks like:
[DOWNLOAD_PDF]{"filename": "...", "data": "..."}
This marker MUST be passed through to the main agent for the user to download the file.
Critical Rules
| # | Rule |
|---|---|
| 1 | ✅ ALWAYS call convert_latex_to_pdf at the end |
| 2 | ✅ Pass compiled literature review as the parameter |
| 3 | ✅ Tool automatically creates PDF, DOCX, and MD files |
| 4 | ✅ Tool returns [DOWNLOAD_PDF] marker — MUST be in final response |
| 5 | ❌ DO NOT add subtitle, author name, or "Generated by" text |
| 6 | ❌ DO NOT include any images or figures |
| 7 | ❌ DO NOT just summarize — you MUST call the document generation tool |
| 8 | ❌ DO NOT skip Step 3 — it's required to create output files |
Integration with Main Agent
Key Difference from Tier 3:
- •The literature-survey-agent is self-contained — it generates its own documents
- •The main agent does NOT need to call
report-subagentafter this agent - •The main agent simply passes through the
[DOWNLOAD_PDF]marker in the final response
Main Agent's Role:
- •Set up
write_todosplan - •Call
literature-survey-agentwith a clear prompt - •Immediately after agent returns → mark todos completed (NO filesystem tools)
- •Write 2–3 paragraph summary + include
[DOWNLOAD_PDF]marker exactly as returned