EasyPaper Skill
Generate structured academic papers from metadata using the EasyPaper multi-agent system via Python SDK.
Repository
Source: https://github.com/PinkGranite/EasyPaper
Primary Reference Directory: plugins/easypaper/
This directory contains comprehensive guidance for OpenClaw agents:
- - Commands: Workflow execution contracts in INLINECODE1
- Skills: Domain-specific skills in INLINECODE2
- Plugin Documentation: Setup and usage in INLINECODE3
Installation
Python Package
Important: Install EasyPaper in an isolated environment (recommended for dependency management).
Using venv:
CODEBLOCK0
Using conda:
CODEBLOCK1
Direct install (not recommended):
CODEBLOCK2
LaTeX Toolchain
EasyPaper requires LaTeX toolchain (pdflatex + bibtex) for PDF compilation. Install based on your system:
macOS:
CODEBLOCK3
Linux (Ubuntu/Debian):
CODEBLOCK4
Linux (Fedora/RHEL):
CODEBLOCK5
Windows:
- - Download and install MiKTeX (full installer recommended)
- Or use TeX Live
- Ensure
pdflatex and bibtex are in your PATH
Poppler (for PDF-to-image conversion)
macOS:
CODEBLOCK6
Linux (Ubuntu/Debian):
CODEBLOCK7
Linux (Fedora/RHEL):
CODEBLOCK8
Windows:
Quick Start
Recommended workflow: Prepare a metadata.json (see examples/meta.json), parse it as PaperGenerationRequest, then run with to_metadata() + to_generate_options().
Typesetter behavior (SDK + Server): PDF compilation prefers in-process Typesetter when available (SDK self-contained). If no local peer is available, EasyPaper falls back to the HTTP Typesetter endpoint (AGENTSYS_SELF_URL).
Load from file and generate
CODEBLOCK9
Inline metadata
CODEBLOCK10
Key Reference Files
When working with EasyPaper, refer to these files in the repository:
Commands (Workflow Execution)
Skills (Domain Guidance)
Configuration and Examples
PaperMetaData Fields
Required:
- -
title, idea_hypothesis, method, data, experiments, INLINECODE33
Optional:
- -
style_guide (venue name), target_pages, template_path, figures, tables, code_repository, INLINECODE40
See examples/meta.json and economist_example/metadata.json for full examples. Treat examples/meta.json as a full PaperGenerationRequest sample: use request = PaperGenerationRequest.model_validate_json_file(...), then request.to_metadata() and request.to_generate_options() for SDK generation.
Final PDF Selection
When review loop is enabled, multiple iteration PDFs can exist. Always report the final artifact using this priority:
- 1.
result.pdf_path (authoritative final output) - Under
result.output_path: INLINECODE50 - Under
result.output_path: latest iteration_* directory PDF - INLINECODE53 (last fallback)
If no PDF is found, report that final PDF is unavailable and include recent compile errors.
Streaming Generation
CODEBLOCK11
When to Use This Skill
Use this skill when:
- - User wants to generate academic papers programmatically
- User needs to understand EasyPaper SDK usage
- User asks about paper generation workflows
- User needs venue-specific formatting guidance
For detailed workflows and execution contracts, refer to files in plugins/easypaper/ directory.
EasyPaper 技能
通过 Python SDK 使用 EasyPaper 多智能体系统,从元数据生成结构化学术论文。
仓库
来源: https://github.com/PinkGranite/EasyPaper
主要参考目录: plugins/easypaper/
该目录包含 OpenClaw 智能体的全面指南:
- - 命令: plugins/easypaper/commands/ 中的工作流执行合约
- 技能: plugins/easypaper/skills/ 中的领域特定技能
- 插件文档: plugins/easypaper/.claude-plugin/README.md 中的设置与使用说明
安装
Python 包
重要提示: 在隔离环境中安装 EasyPaper(推荐用于依赖管理)。
使用 venv:
bash
python -m venv easypaper-env
source easypaper-env/bin/activate # 在 Windows 上: easypaper-env\Scripts\activate
pip install easypaper
使用 conda:
bash
conda create -n easypaper python=3.11
conda activate easypaper
pip install easypaper
直接安装(不推荐):
bash
pip install easypaper
LaTeX 工具链
EasyPaper 需要 LaTeX 工具链(pdflatex + bibtex)用于 PDF 编译。根据您的系统安装:
macOS:
bash
使用 Homebrew(推荐)
brew install --cask mactex
或最小化安装
brew install basictex
sudo tlmgr update --self
sudo tlmgr install collection-basic collection-latex collection-bibtexextra
Linux(Ubuntu/Debian):
bash
sudo apt-get update
sudo apt-get install texlive-latex-base texlive-bibtex-extra texlive-latex-extra
Linux(Fedora/RHEL):
bash
sudo dnf install texlive-scheme-basic texlive-bibtex texlive-latex
Windows:
Poppler(用于 PDF 转图片)
macOS:
bash
brew install poppler
Linux(Ubuntu/Debian):
bash
sudo apt-get install poppler-utils
Linux(Fedora/RHEL):
bash
sudo dnf install poppler-utils
Windows:
快速开始
推荐工作流: 准备一个 metadata.json(参见 examples/meta.json),将其解析为 PaperGenerationRequest,然后使用 tometadata() + togenerateoptions() 运行。
排版器行为(SDK + 服务器): PDF 编译优先使用进程内排版器(SDK 自包含)。如果没有本地对等节点可用,EasyPaper 会回退到 HTTP 排版器端点(AGENTSYSSELFURL)。
从文件加载并生成
python
import asyncio
from pathlib import Path
from easypaper import EasyPaper, PaperGenerationRequest
async def main():
ep = EasyPaper(config_path=str(Path(configs/dev.yaml).resolve()))
request = PaperGenerationRequest.modelvalidatejson_file(metadata.json)
metadata = request.to_metadata()
options = request.togenerateoptions()
result = await ep.generate(metadata, options)
print(f状态: {result.status}, 字数: {result.totalwordcount})
asyncio.run(main())
内联元数据
python
import asyncio
from easypaper import EasyPaper, PaperMetaData
async def main():
ep = EasyPaper(config_path=configs/dev.yaml)
metadata = PaperMetaData(
title=我的论文标题,
idea_hypothesis=...,
method=...,
data=...,
experiments=...,
references=[@article{...}],
)
result = await ep.generate(metadata)
print(f状态: {result.status}, 字数: {result.totalwordcount})
asyncio.run(main())
关键参考文件
使用 EasyPaper 时,请参考仓库中的以下文件:
命令(工作流执行)
技能(领域指南)
配置和示例
PaperMetaData 字段
必填:
- - title、idea_hypothesis、method、data、experiments、references
可选:
- - styleguide(会议名称)、targetpages、templatepath、figures、tables、coderepository、exportprompttraces
完整示例请参见 examples/meta.json 和 economistexample/metadata.json。将 examples/meta.json 视为完整的 PaperGenerationRequest 样本:使用 request = PaperGenerationRequest.modelvalidatejsonfile(...),然后使用 request.tometadata() 和 request.togenerateoptions() 进行 SDK 生成。
最终 PDF 选择
当启用审查循环时,可能存在多个迭代 PDF。请按以下优先级报告最终产物:
- 1. result.pdfpath(权威最终输出)
- 在 result.outputpath 下:iterationfinal//.pdf
- 在 result.output_path