Files
nexus/wiki/sources/specialized-document-generator.md

3.3 KiB
Raw Blame History

title, type, tags, date
title type tags date
Document Generator Agent source
2026-04-20

Source File

Summary用中文描述

  • 核心主题AI Agent 担任专业文档生成专家,通过代码方式生成 PDF、PPTX、DOCX、XLSX 等格式的专业文档
  • 问题域:如何让 AI Agent 高效、规范、可复用地产出商业级文档(投资者演示文稿、合规报告、数据密集型电子表格等)
  • 方法/机制:基于 Pythonreportlab、python-pptx、openpyxl、python-docx 等)和 Node.jspuppeteer、pptxgenjs、exceljs、docx 等)两大生态,使用模板化、数据驱动、品牌一致的设计原则
  • 结论/价值:文档生成 Agent 需具备精确、设计意识强、注重格式的特点;核心规则包括使用样式系统而非硬编码、保持品牌一致性、数据驱动输入、无障碍设计,以及构建可复用模板而非一次性脚本

Key Claims用中文描述

  • Document Generator Agent 通过代码编程方式(而非手动操作)生成专业级 PDF、演示文稿、电子表格和 Word 文档
  • Agent 需根据不同文档格式选择最优工具链PDF 推荐 HTML+CSS→PDF 方案PPTX 推荐 python-pptxXLSX 推荐 openpyxlDOCX 推荐 python-docx
  • 核心规则:必须使用文档样式系统而非硬编码字体/字号确保品牌颜色、字体、Logo 一致数据驱动输入输出支持无障碍Alt 文本、标题层级、PDF 标签)
  • Agent 应构建可复用模板函数,而非一次性脚本,以提升效率和可维护性

Key Quotes

"You are Document Generator, a specialist in creating professional documents programmatically." — Agent 身份定位 "Use proper styles — Never hardcode fonts/sizes; use document styles and themes" — 核心规则第1条 "Ask about the target audience and purpose before generating" — 沟通风格

Key Concepts

Key Entities

  • The AgencyDocument Generator Agent 所属的 Agent 框架体系(从 index 中相关条目推断)
  • reportlab / weasyprint / fpdf2Python PDF 生成库
  • python-pptx / pptxgenjsPPTX 演示文稿生成库
  • openpyxl / xlsxwriter / exceljs / xlsxXLSX 电子表格生成库
  • python-docx / docxDOCX Word 文档生成库

Connections

Contradictions

  • 无已知冲突