AgentSkillsCN

literature-survey-agent

综合性文献调研子代理,可开展全流程学术综述工作。其工作流程分为三步:(1) 利用 arXiv、网络搜索及网页抓取进行文献检索;(2) 将获取的内容整理成结构化的文献综述,包括论文摘要、对比表格、研究空白与参考文献;(3) 通过 LaTeX/Markdown 转 PDF 的方式生成最终文档。该子代理自成体系——自带 [DOWNLOAD_PDF] 标记,可独立生成 PDF 输出文件。在文档生成环节,无需依赖报告子代理即可完成任务。

SKILL.md
--- frontmatter
name: literature-survey-agent
description: >
  Comprehensive literature survey subagent that conducts end-to-end academic reviews. Performs a three-step
  workflow: (1) Research using arXiv, web search, and webpage extraction, (2) Content compilation into a
  structured literature review with paper summaries, comparison tables, research gaps, and references,
  (3) Document generation via LaTeX/Markdown-to-PDF conversion. Self-contained — generates its own PDF
  output with [DOWNLOAD_PDF] marker. Does NOT require the report-subagent for document creation.
license: MIT
compatibility: Requires arXiv API, Tavily API, and LaTeX/pandoc for PDF generation
metadata:
  author: MAIRA Team
  version: "1.0"
  allowed-tools: arxiv_search, internet_search, extract_webpage, convert_latex_to_pdf

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:

python
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:

python
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

ToolPurposePhase
arxiv_searchSearch arXiv for recent papersStep 1 (Research)
internet_searchFind articles, reviews, summariesStep 1 (Research)
extract_webpageExtract detailed content from webpagesStep 1 (Research)
convert_latex_to_pdfConvert compiled review to PDF/DOCX/MDStep 3 (Document Generation)

Three-Step Workflow

Step 1: Research Phase

Use all research tools to gather information:

arXiv Searches:

  1. Identify the CORE topic from the research request
  2. Make AT MOST 3 arxiv_search calls, each with 2–5 keywords
  3. Extract metadata for the top 3–5 most relevant results

Web Searches:

  • Use internet_search to find recent articles, reviews, and summaries
  • Use extract_webpage to 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):

markdown
| 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")
python
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

RuleDetail
NO subtitle or author attributionNo "Generated by...", "Literature Review Agent", etc.
Title onlyDerived from the research topic + date
NO images or figuresText-only document
Table formatSimple Markdown pipe tables only

Output After Tool Call

After calling convert_latex_to_pdf, respond with:

  1. Brief confirmation: "✅ Literature review generated! PDF is ready for download."
  2. CRITICAL: Include the EXACT [DOWNLOAD_PDF] marker returned by the tool

The marker looks like:

code
[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-subagent after this agent
  • The main agent simply passes through the [DOWNLOAD_PDF] marker in the final response

Main Agent's Role:

  1. Set up write_todos plan
  2. Call literature-survey-agent with a clear prompt
  3. Immediately after agent returns → mark todos completed (NO filesystem tools)
  4. Write 2–3 paragraph summary + include [DOWNLOAD_PDF] marker exactly as returned