AI-powered academic paper generation SDK
Project description
EasyPaper
EasyPaper is a multi-agent academic paper generation system. It turns a small set of metadata (title, idea, method, data, experiments, references) into a structured LaTeX paper and optionally compiles it into a PDF through a typesetting agent.
Features
- Python SDK —
pip install easypaper, thenimport easypaperin your own project - Streaming generation — async generator yields real-time progress events at each phase
- Multi-agent pipeline: planning, writing, review, typesetting, and optional VLM review
- Optional FastAPI server mode with health and agent discovery endpoints
- LaTeX output with citation validation, figure/table injection, and review loop
Requirements
- Python 3.11+
- LaTeX toolchain (
pdflatex+bibtex) for PDF compilation - Poppler — required by
pdf2imagefor PDF-to-image conversion- macOS:
brew install poppler - Ubuntu/Debian:
apt install poppler-utils
- macOS:
- Model API keys configured in YAML (see Config)
SDK Usage
Install from PyPI:
pip install easypaper
One-shot generation
import asyncio
from easypaper import EasyPaper, PaperMetaData
async def main():
ep = EasyPaper(config_path="config.yaml")
metadata = PaperMetaData(
title="My Paper Title",
idea_hypothesis="...",
method="...",
data="...",
experiments="...",
)
result = await ep.generate(metadata)
print(result.status, result.total_word_count)
for sec in result.sections:
print(f" {sec.section_type}: {sec.word_count} words")
asyncio.run(main())
Streaming generation
Use generate_stream() to receive real-time progress events via async generator:
import asyncio
from easypaper import EasyPaper, PaperMetaData, EventType
async def main():
ep = EasyPaper(config_path="config.yaml")
metadata = PaperMetaData(
title="My Paper Title",
idea_hypothesis="...",
method="...",
data="...",
experiments="...",
)
async for event in ep.generate_stream(metadata):
if event.event_type == EventType.PHASE_START:
print(f"▶ [{event.phase}] {event.message}")
elif event.event_type == EventType.SECTION_COMPLETE:
print(f" ✎ {event.phase} done")
elif event.event_type == EventType.COMPLETE:
result = event.data["result"]
print(f"Done! {result['total_word_count']} words")
asyncio.run(main())
GenerationEvent fields:
| Field | Type | Description |
|---|---|---|
event_type |
EventType |
PHASE_START, PHASE_COMPLETE, SECTION_COMPLETE, PROGRESS, WARNING, ERROR, COMPLETE |
phase |
str |
Logical phase name (e.g. "planning", "introduction", "body") |
message |
str |
Human-readable description |
data |
dict | None |
Structured payload (section content, final result, etc.) |
timestamp |
datetime |
When the event was created |
A complete working example is available in user_case/.
Server Mode
To run EasyPaper as a FastAPI service (requires the server extra):
pip install "easypaper[server]"
- Copy the example config and fill in your API keys:
cp configs/example.yaml configs/dev.yaml
- Start the server:
uvicorn easypaper.main:app --reload --port 8000
- Generate via API:
curl -X POST http://localhost:8000/metadata/generate \
-H "Content-Type: application/json" \
-d @economist_example/metadata.json
Config
The application loads configuration from AGENT_CONFIG_PATH (defaults to ./configs/dev.yaml).
You can also set this variable in a .env file at the project root.
See configs/example.yaml for a fully commented configuration template. Each agent entry defines
its model and optional agent-specific settings.
Key fields per agent:
model_name— LLM model identifierapi_key— API key for the model providerbase_url— API endpoint URL
Additional top-level sections:
skills— skills system toggle and active skill listtools— ReAct tool configuration (citation validation, paper search, etc.)vlm_service— shared VLM provider for visual review (supports OpenAI-compatible and Claude)
Repository Layout
easypaper/— SDK core, agent implementations, event system, shared utilitiesconfigs/— YAML configs for agents and modelsscripts/— CLI utilities and demosuser_case/— standalone usage example (independent environment)economist_example/— sample metadata input
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easypaper-0.1.1.tar.gz.
File metadata
- Download URL: easypaper-0.1.1.tar.gz
- Upload date:
- Size: 289.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d9f81ebe4a1158992c1eedc2586f5ad2354db510f0928819c5f4ed8016e9050
|
|
| MD5 |
fa35a8b83584b4921e4d7647fefd3c21
|
|
| BLAKE2b-256 |
a517dd2091d5a02b291cf6b5fcc4d2cf8b3e51a5b30fd57160f4c3699a345f62
|
File details
Details for the file easypaper-0.1.1-py3-none-any.whl.
File metadata
- Download URL: easypaper-0.1.1-py3-none-any.whl
- Upload date:
- Size: 323.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c716b8c654a4f21b1f09fd2057d41cec7d4e6598ed33abbd95269590c10d3789
|
|
| MD5 |
0178aab1436263d2e62248637e11f2d0
|
|
| BLAKE2b-256 |
302c09259b2f56f2f9852415b2ce0eea160b4149152853c5e01e50e3a2250ec0
|