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.
EasyPaper can be used in two modes:
- SDK mode —
pip install -e .and call from Python directly (no server needed) - Server mode —
pip install -e ".[server]"and run as a FastAPI service
Features
- Multi-agent pipeline: planning, writing, review, typesetting, and optional VLM review
- Python SDK for in-process paper generation (
from easypaper import EasyPaper) - Optional FastAPI service with health and agent discovery endpoints
- Streaming progress via
generate_stream()(SDK) or SSE (server) - CLI scripts for metadata-driven generation and paper assembly demos
- 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)
Quickstart (SDK mode)
- Install core dependencies:
pip install -e .
- Copy the example config and fill in your API keys:
cp examples/config.example.yaml configs/dev.yaml
# Edit configs/dev.yaml — replace YOUR_API_KEY with real keys
- Set the config path (or create a
.envfile):
export AGENT_CONFIG_PATH=./configs/dev.yaml
- Use from Python:
import asyncio
from easypaper import EasyPaper, PaperMetaData
async def main():
ep = EasyPaper(config_path="configs/dev.yaml")
result = await ep.generate(PaperMetaData(
title="My Paper",
idea_hypothesis="...",
method="...",
data="...",
experiments="...",
))
print(f"Status: {result.status}, Words: {result.total_word_count}")
asyncio.run(main())
- Or use streaming for progress updates:
async for event in ep.generate_stream(metadata):
print(f"{event.get('phase', '')}: {event.get('message', '')}")
See examples/sdk_demo.py for a complete working example.
Server Mode
To run as a FastAPI service (for external integrations):
- Install with server extras:
pip install -e ".[server]"
- Start the server:
uvicorn src.main:app --reload --port 8000
- Verify health:
curl http://localhost:8000/healthz
Generate a Paper via API
curl -X POST http://localhost:8000/metadata/generate \
-H "Content-Type: application/json" \
-d @economist_example/metadata.json
Generate via CLI
python scripts/generate_paper.py --input economist_example/metadata.json
Optional Dependencies
pip install -e ".[dev]" # pytest, ipython, etc.
pip install -e ".[vlm]" # Claude VLM review support
pip install -e ".[server]" # FastAPI + uvicorn
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)
Service Endpoints (Server Mode)
GET /healthz— health checkGET /config— current app configGET /list_agents— list registered agents and endpoints- Agent-specific routes are registered under
/agent/*and/metadata/*
Repository Layout
.
├── easypaper/ # Thin SDK package (public API)
│ ├── __init__.py # Re-exports: EasyPaper, PaperMetaData, EventType, ...
│ └── client.py # EasyPaper class: generate(), generate_stream()
├── src/ # Core implementation (agents, config, skills)
│ ├── main.py # FastAPI app (server mode entrypoint)
│ ├── agents/ # Agent implementations (metadata, writer, reviewer, ...)
│ ├── config/ # YAML config loading and schema
│ └── skills/ # Skill loader, registry, and router
├── configs/ # YAML configs for agents and models
├── skills/ # Built-in YAML skill definitions (venues, writing, reviewing)
├── scripts/ # CLI utilities and demos
├── examples/ # SDK usage examples
├── plugins/ # Claude Code plugin assets
├── tests/ # Test suite
└── pyproject.toml # Package metadata (name: easypaper)
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.2.2.tar.gz.
File metadata
- Download URL: easypaper-0.2.2.tar.gz
- Upload date:
- Size: 536.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8b2a753a31282ee7924b8d485184c292b05ead97f9ccb5d8dafd68f22e7cfb2
|
|
| MD5 |
ea786e1900fdd0f7753a0f206aadf674
|
|
| BLAKE2b-256 |
286ba7e76a8f953c15c6c586d60388ea85fc10cee46655ae71ff1bb9040fac0e
|
File details
Details for the file easypaper-0.2.2-py3-none-any.whl.
File metadata
- Download URL: easypaper-0.2.2-py3-none-any.whl
- Upload date:
- Size: 519.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c50e5f6cf357417365fff54dc8531aba611a92a366f6b23e6ff3f1f0daf02f0
|
|
| MD5 |
4ae9302bd09bec861aa565690310abaa
|
|
| BLAKE2b-256 |
3008942d5a1dcdf5c9b7b4ae33f0cc24d704d440a3a50c8ab1e84eacdfbec6ba
|