Skip to content
Learn Agentic AI16 min read0 views

Building a Thesis Advisor Agent: Research Topic Exploration and Literature Review Assistance

Build an AI thesis advisor agent that helps graduate students brainstorm research topics, find relevant literature, develop methodology, and plan their thesis timeline.

The Thesis Journey Problem

Starting a thesis is one of the most daunting academic challenges. Graduate students must identify a viable research topic, survey existing literature, develop a methodology, and create a realistic timeline — all while their advisor has limited availability. An AI thesis advisor agent provides always-available support for the exploratory phases of research, helping students refine ideas, discover relevant papers, and structure their work plan.

Research Data Structures

from dataclasses import dataclass, field
from enum import Enum
from typing import Optional
from datetime import date


class ResearchPhase(Enum):
    TOPIC_EXPLORATION = "topic_exploration"
    LITERATURE_REVIEW = "literature_review"
    PROPOSAL_WRITING = "proposal_writing"
    DATA_COLLECTION = "data_collection"
    ANALYSIS = "analysis"
    WRITING = "writing"
    DEFENSE = "defense"


class MethodologyType(Enum):
    QUANTITATIVE = "quantitative"
    QUALITATIVE = "qualitative"
    MIXED_METHODS = "mixed_methods"
    COMPUTATIONAL = "computational"
    THEORETICAL = "theoretical"
    DESIGN_SCIENCE = "design_science"


@dataclass
class AcademicPaper:
    paper_id: str
    title: str
    authors: list[str]
    year: int
    journal: str
    abstract: str
    keywords: list[str] = field(default_factory=list)
    citation_count: int = 0
    doi: str = ""
    methodology: str = ""
    findings_summary: str = ""


@dataclass
class ResearchTopic:
    topic_id: str
    title: str
    description: str
    field: str
    sub_field: str
    research_questions: list[str] = field(default_factory=list)
    suggested_methodologies: list[MethodologyType] = field(
        default_factory=list
    )
    key_papers: list[str] = field(default_factory=list)
    feasibility_notes: str = ""


@dataclass
class ThesisProject:
    student_id: str
    student_name: str
    department: str
    advisor_name: str
    current_phase: ResearchPhase = ResearchPhase.TOPIC_EXPLORATION
    topic: Optional[ResearchTopic] = None
    literature_collection: list[str] = field(default_factory=list)
    methodology: Optional[MethodologyType] = None
    milestones: list[dict] = field(default_factory=list)
    defense_date: Optional[date] = None
    notes: list[str] = field(default_factory=list)

Literature Discovery Engine

The literature discovery engine finds relevant papers based on keyword overlap and citation networks.

PAPERS_DB: dict[str, AcademicPaper] = {}
TOPICS_DB: dict[str, ResearchTopic] = {}
PROJECTS_DB: dict[str, ThesisProject] = {}


def search_literature(
    keywords: list[str],
    field: str = "",
    min_year: int = 2020,
    min_citations: int = 0,
) -> list[dict]:
    results = []
    for paper in PAPERS_DB.values():
        if paper.year < min_year:
            continue
        if paper.citation_count < min_citations:
            continue

        keyword_matches = sum(
            1 for kw in keywords
            if (kw.lower() in paper.title.lower()
                or kw.lower() in paper.abstract.lower()
                or any(kw.lower() in pk.lower()
                       for pk in paper.keywords))
        )
        if keyword_matches == 0:
            continue

        relevance = keyword_matches / len(keywords)

        results.append({
            "paper_id": paper.paper_id,
            "title": paper.title,
            "authors": paper.authors,
            "year": paper.year,
            "journal": paper.journal,
            "citations": paper.citation_count,
            "relevance_score": round(relevance, 2),
            "keywords": paper.keywords,
            "abstract_snippet": paper.abstract[:200],
        })

    results.sort(key=lambda r: (
        r["relevance_score"], r["citations"]
    ), reverse=True)
    return results[:15]


def identify_research_gaps(topic_keywords: list[str]) -> dict:
    papers = search_literature(topic_keywords, min_year=2018)

    methodologies_used = set()
    recent_findings = []
    underexplored_angles = []

    for p in papers:
        paper = PAPERS_DB.get(p["paper_id"])
        if paper and paper.methodology:
            methodologies_used.add(paper.methodology)
        if paper and paper.year >= 2024:
            recent_findings.append(paper.findings_summary)

    all_methods = {m.value for m in MethodologyType}
    unused_methods = all_methods - methodologies_used

    return {
        "papers_found": len(papers),
        "methodologies_used": list(methodologies_used),
        "underexplored_methods": list(unused_methods),
        "top_papers": papers[:5],
        "suggestion": (
            "Consider using " + ", ".join(list(unused_methods)[:2])
            + " approaches which are underrepresented in this area."
            if unused_methods else
            "This area is well-covered. Look for niche sub-topics."
        ),
    }

Thesis Timeline Generator

from datetime import timedelta


def generate_thesis_timeline(
    start_date: date,
    defense_target: date,
    methodology: MethodologyType,
) -> list[dict]:
    total_days = (defense_target - start_date).days
    if total_days < 180:
        return [{"warning": "Less than 6 months is very tight."}]

    # Phase allocation percentages based on methodology
    allocations = {
        MethodologyType.QUANTITATIVE: {
            "literature_review": 0.15,
            "proposal": 0.10,
            "data_collection": 0.25,
            "analysis": 0.20,
            "writing": 0.25,
            "revision_defense": 0.05,
        },
        MethodologyType.QUALITATIVE: {
            "literature_review": 0.15,
            "proposal": 0.10,
            "data_collection": 0.30,
            "analysis": 0.20,
            "writing": 0.20,
            "revision_defense": 0.05,
        },
        MethodologyType.COMPUTATIONAL: {
            "literature_review": 0.10,
            "proposal": 0.10,
            "implementation": 0.30,
            "experiments": 0.20,
            "writing": 0.25,
            "revision_defense": 0.05,
        },
    }

    alloc = allocations.get(methodology, allocations[
        MethodologyType.QUANTITATIVE
    ])

    milestones = []
    current_date = start_date
    for phase_name, fraction in alloc.items():
        phase_days = int(total_days * fraction)
        end_date = current_date + timedelta(days=phase_days)
        milestones.append({
            "phase": phase_name.replace("_", " ").title(),
            "start": current_date.isoformat(),
            "end": end_date.isoformat(),
            "duration_weeks": round(phase_days / 7),
        })
        current_date = end_date

    return milestones

Agent Assembly

from agents import Agent, function_tool, Runner
import json


@function_tool
def explore_topics(
    field: str, keywords: list[str]
) -> str:
    """Explore research topics and identify gaps in the literature."""
    gaps = identify_research_gaps(keywords)
    return json.dumps(gaps)


@function_tool
def find_papers(
    keywords: list[str],
    min_year: int = 2020,
    min_citations: int = 0,
) -> str:
    """Search for academic papers by keywords."""
    results = search_literature(keywords, min_year=min_year,
                                 min_citations=min_citations)
    return json.dumps(results) if results else "No papers found."


@function_tool
def create_timeline(
    start_date: str, defense_date: str, methodology: str
) -> str:
    """Generate a thesis timeline based on methodology and dates."""
    try:
        start = date.fromisoformat(start_date)
        defense = date.fromisoformat(defense_date)
        method = MethodologyType(methodology)
    except (ValueError, KeyError):
        return "Invalid date format or methodology type."
    milestones = generate_thesis_timeline(start, defense, method)
    return json.dumps(milestones)


thesis_agent = Agent(
    name="Thesis Advisor Assistant",
    instructions="""You are a thesis advisor assistant for graduate
    students. Help them explore research topics, find relevant
    literature, identify research gaps, and create realistic
    timelines. Ask about their field, interests, and constraints
    before suggesting topics. Emphasize feasibility — encourage
    topics with available data and clear methodology. Never write
    the thesis for them; guide their thinking instead.""",
    tools=[explore_topics, find_papers, create_timeline],
)

FAQ

How does the agent avoid generating fabricated paper citations?

The agent only returns papers from its indexed database, never generating fictitious references. Every paper has a verifiable DOI and is sourced from real academic databases. If the database does not contain relevant papers, the agent says so and suggests the student search specific databases like Google Scholar or Semantic Scholar directly.

See AI Voice Agents Handle Real Calls

Book a free demo or calculate how much you can save with AI voice automation.

Can the agent help choose between qualitative and quantitative approaches?

Yes. The agent asks about the student's research question, available data sources, comfort with statistical methods, and timeline. It then explains tradeoffs: quantitative methods offer generalizability but require large samples; qualitative methods provide depth but are time-intensive for analysis. It suggests the approach that best fits the student's constraints.

How should the agent handle students who want to change topics mid-thesis?

The agent helps evaluate the cost of switching by comparing progress already made against the new topic's requirements. It generates a revised timeline and identifies which completed work (literature review, methodology skills) transfers to the new topic. The agent recommends discussing the change with their human advisor before proceeding.


#AIAgents #EdTech #Research #Python #GraduateEducation #AgenticAI #LearnAI #AIEngineering

Share this article
C

CallSphere Team

Expert insights on AI voice agents and customer communication automation.

Try CallSphere AI Voice Agents

See how AI voice agents work for your industry. Live demo available -- no signup required.