Build a Free Research Agent at Zero Cost: A Hands-On Tutorial for Automated Paper Writing

A step-by-step guide to building a zero-cost AI research Agent that writes complete papers in 20 minutes.
This tutorial shows how to build a fully functional research Agent at zero cost by combining free limited-version cloud models, a locally deployed Qwen3.5-4B for vision tasks on a 6GB GPU, and a toolchain including Python, LaTeX, MCP for literature search, and research Skills. The system uses tiered scheduling to maximize free resources while reserving paid APIs for complex tasks, and features intelligent VRAM management for on-demand model loading. In testing, it produced a complete, well-formatted paper in approximately 20 minutes.
Why Build Your Own Research Agent
With AI subscription services continuously raising prices, many students find themselves in the awkward position of wanting to use these tools but being unable to afford them. A Chinese content creator spent two days building a research Agent at absolutely zero cost—one capable of automatically searching literature, generating charts, organizing data, and writing papers—offering a viable path for graduate students with limited budgets.
The core idea is remarkably straightforward: instead of chasing top-tier models, combine free limited-version models, local small models, and a well-designed toolchain, letting each component do what it does best. This "good enough is good enough" engineering mindset is precisely one of the most practical directions for AI application deployment today.

Technical Architecture: A Clever Combination of Free Models and Local Deployment
Primary Model: Making the Most of Free Subscriptions
The backbone of the entire solution is built on free subscriptions from platforms like OpenCode, leveraging these "limited" models for primary reasoning tasks. These "limited" models refer to feature-restricted versions that platforms offer to free users, typically with reduced context window length, daily call limits, response speed, and other constraints. The creator acknowledged that these models do have obvious limitations—for example, one model's context window is only 200k. A context window is the maximum text length a large language model can process at once; 200k tokens corresponds to roughly 150,000-200,000 Chinese characters, enough to process a complete academic paper in one go, but potentially hitting the ceiling when simultaneously analyzing cross-references across multiple lengthy papers. However, for light research tasks, this is more than sufficient.
The key lies in tiered scheduling: free models handle routine auxiliary work, and only when encountering complex tasks does it switch to your paid API. This strategy of "freeloading for daily tasks, paying at critical moments" puts limited budgets exactly where they matter most, maximizing cost-effectiveness.
Local Deployment of Qwen3.5-4B: Filling the Vision Gap
Since the primary model lacks visual recognition capabilities, the creator locally deployed a 4B version of Qwen3.5 as a visual tool plugin. Qwen3.5 is an open-source multimodal large model series from Alibaba's Tongyi Qianwen team, with 4B indicating 4 billion parameters. In deep learning, parameter count directly determines the VRAM required for inference—at FP16 precision, every 1 billion parameters requires approximately 2GB of VRAM, though INT4 quantization can compress storage requirements to about 3-4GB. The choice of 4B over a larger model was purely practical: the laptop only has a 3060 with 6GB of VRAM, a configuration that can at most run a quantized 4B model.

To make the most of limited VRAM, the creator had AI write a plugin implementing intelligent VRAM management: automatically loading the model when images are sent, and automatically shutting it down to free VRAM when not in use. This on-demand loading design pattern is similar to virtual memory page replacement strategies in operating systems—model weights are only loaded into GPU VRAM when needed, then immediately unloaded after task completion, preventing the model from permanently occupying VRAM and affecting other applications. Implementation typically involves monitoring message queues to trigger model loading, using methods like torch.cuda.empty_cache() to clear VRAM, combined with process management for complete lifecycle control. This local small model handles not only image recognition but also OCR text recognition, table extraction, and a range of other auxiliary functions. Under the constraint of 6GB VRAM, this on-demand loading design is a masterclass in resource optimization.
Building a Complete Research Agent Toolchain
Core Component Integration
On top of the model layer, the creator further constructed a complete research work environment:
- Python Environment: For data processing and chart generation, combined with visualization libraries like matplotlib and seaborn, plus data analysis libraries like pandas and numpy, capable of handling the entire pipeline from data cleaning to statistical testing
- LaTeX Typesetting System: Ensuring professional and aesthetically pleasing paper formatting. LaTeX is a professional typesetting system based on TeX that has been the de facto standard for paper writing in mathematics, physics, computer science, and other disciplines since its creation in 1984. Unlike Word's WYSIWYG approach, LaTeX uses markup language to define document structure, with the compiler automatically handling layout details—it particularly excels at mathematical formula rendering and automated reference management. Many top journals (IEEE, ACM, Springer, etc.) provide official LaTeX templates, and AI-generated LaTeX source code can be directly compiled into high-quality PDFs
- Paper Search MCP: Connecting literature search capabilities so the Agent can automatically find relevant research. MCP (Model Context Protocol) is an open standard introduced by Anthropic in late 2024, designed to provide large language models with a unified external tool invocation interface. Through MCP, AI models can access academic databases like Semantic Scholar, arXiv, and Google Scholar as easily as calling an API, retrieving structured information such as titles, abstracts, and citation relationships of the latest literature, without needing to write separate adapter code for each data source
- Extensive Research Skills: Equipping the Agent with specialized research skill modules. Skills are predefined task templates or prompt engineering modules that guide models to execute tasks according to specific academic standards, such as literature review writing, statistical method selection, APA/GB-T format citations, etc.
Through the integration of these components, a "streamlined research environment" takes shape. It connects the complete chain from topic selection, hypothesis formulation, literature search, and data analysis to paper writing, forming an end-to-end research intelligent agent.
Real-World Results: A Complete Paper in 20 Minutes
Test Case and Research Logic
The creator tested with a casually devised topic—"The Relationship Between Graduate Student Stress Index and Advisor Personality"—with all data being fictitious test data.

Judging from the generated results, this research Agent demonstrated fairly complete research logic: it automatically produced the research topic, definitions, hypothesis statements, and methodology descriptions, with reasonably coherent transitions between sections. It then automatically searched literature, generated charts, organized data, and ultimately completed the paper.
Chart Generation and Data Analysis Performance
Regarding chart generation, the creator rated the results as "quite good." While there were some minor imperfections, considering this was produced entirely by a free limited-version model, the quality is already quite impressive.

It's important to emphasize that the test data was fictitious. In actual use cases, users can import their own real research data, letting the Agent complete analysis and generation based on genuine data.
Final Paper Quality
The final paper product left even the creator feeling "very impressed"—beautifully formatted with the look and feel of a proper academic paper, and the entire process took only about 20 minutes to complete. For a zero-cost free environment, this performance is undoubtedly a success.
Reflections on Value and Limitations
The significance of this project goes far beyond "saving money." It reveals an important trend: under constraints of limited computing power and budget, through thoughtful architectural design and tool orchestration, ordinary users can build practical AI research productivity tools.
From an engineering perspective, this solution offers several ideas worth adopting:
- Tiered Scheduling Strategy: Let free resources handle the main workload while paid resources process critical tasks. This approach mirrors the "hybrid cloud" architecture in cloud computing—daily loads run in lower-cost environments, with high-performance resources called upon only for peak demands or critical operations
- Local Models Fill the Gaps: Use local small models to supplement cloud models' visual and OCR capabilities. As the open-source model ecosystem flourishes (Qwen, Llama, Mistral, etc.), the barrier to local deployment continues to drop, and consumer-grade GPUs can now run quite useful small models
- Domain-Specific Customization: Transform general-purpose large models into research-specific agents through MCP and Skills mechanisms. This embodies the core philosophy of AI Agent design—the model itself is the "brain," tool invocation provides the "hands and feet," Skills represent "experiential knowledge," and only the combination of all three can accomplish complex domain tasks
Of course, one must remain rational. The capability ceiling of limited models, the precision of local small models, and the compliance issues of AI-generated content in academic contexts are all boundaries that users must carefully respect. Particularly regarding academic integrity, universities and journals are gradually establishing regulatory frameworks for AI use, and researchers need to clearly distinguish between AI assistance (such as language polishing, code debugging, literature organization) and academic misconduct (such as fabricating data, ghostwriting core arguments). AI should serve as a supplementary tool for research, not a shortcut that replaces independent thinking and academic integrity.
For graduate students with limited budgets, such a "good enough, free, and reproducible" research Agent may well be a vivid example of lowering the barrier to AI usage and making technological dividends truly accessible to all.
Related articles

Getting Started in Machine Learning Research: Essential Paper Reading List and Research Internship Application Path
A complete path from zero to research internship for ML beginners, covering essential classic papers (AlexNet, ResNet, Transformer), paper reading methods, reproduction tips, and practical advice for research internship applications.

Claude Code Hands-On Tutorial: Complete Guide from Installation to Automated Development
Complete guide to Claude Code covering environment setup, permission configuration, Go Goals autonomous loops, Skills system, MCP protocol integration, and version control for automated development.

Gemini 3.7 Flash Release and GPT-5.6 Ultra-Fast Mode: AI Open Source Enters the Ecosystem Era
Google releases Gemini 3.7 Flash for coding and Agent optimization while OpenAI launches GPT-5.6 Ultra-Fast mode with 14x speed gains. AI open source shifts from open models to open ecosystems.