{
 "schema": "aiblocks-page/1",
 "id": "agency-specialized-document-generator",
 "type": "agent",
 "name": "Document generation planner",
 "summary": "Get a script that builds a PDF, Word, slide or Excel file from your data, with the right library for the format and a template you can reuse.",
 "headline": "Document generation planner",
 "subhead": "Tell it the document, who reads it and what data goes in. It picks the best format, chooses the code tool for it, and writes a script and layout plan that fills a template. Run the script to get the file.",
 "job": {
  "id": "work-with-files",
  "name": "Make documents, sheets and slides"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "source_text",
   "required": false,
   "label": "Source text",
   "what": "a long source in full: an article, a video or talk transcript, or notes from a book, with its title, author and link"
  },
  {
   "type": "spreadsheet",
   "required": false,
   "label": "Spreadsheet",
   "what": "a spreadsheet with its data, formulas and charts"
  }
 ],
 "outputs": [
  {
   "type": "code_change",
   "required": true,
   "label": "Code change",
   "what": "a change to the code, with what it fixes and how it was checked"
  }
 ],
 "you_give": [
  "What the document is for and who reads it",
  "The data or text that goes in, such as a CSV, a list or pasted notes",
  "The format you want, or \"you choose\" if you are unsure",
  "Brand colours, fonts and logo, if you have them (optional)",
  "The language you can run, such as Python or Node (optional)"
 ],
 "you_get": [
  "A format pick with the reason it suits your reader",
  "A layout plan with sections, tables, charts and styles",
  "A script that fills a template from your data, to run on your own machine or in a code tool",
  "Notes on how to change the template, and checks to run on the finished file"
 ],
 "use_when": [
  "You rebuild the same monthly report, invoice or deck by hand and want it generated from data.",
  "You are not sure whether the reader needs a PDF, a Word file, slides or a sheet.",
  "You need an Excel file with formulas and charts made from a list of records.",
  "You want a Word template with real styles, a table of contents and headers."
 ],
 "skip_when": [
  "You want a plain file built from a JSON spec with PaperJSX and no tool choice. Use the JSON document file generator.",
  "You have a web page that must become a perfect PDF. Use the PDF layout designer.",
  "You have a YAML or JSON file with unknown fields and need layout rules. Use the Document layout engine designer.",
  "You need to read or fill PDFs you already have. Use the PDF file editor.",
  "The file is a contract, medical or financial filing. A qualified person must review it before it goes out."
 ],
 "output_sample": {
  "input": [
   "What the document is for and who reads it",
   "Your data or text, such as a CSV or pasted notes",
   "The format, or \"you choose\"",
   "Brand colours, fonts and logo (optional)"
  ],
  "prerequisites": [
   "Python or Node on your machine, or an AI that can run code and save files",
   "Claude, ChatGPT or Gemini"
  ],
  "output": [
   {
    "name": "Format choice",
    "contains": "The format that suits your reader, with the reason."
   },
   {
    "name": "Layout plan",
    "contains": "Sections, tables, charts or sheets, each tied to a field in your data."
   },
   {
    "name": "Template and styles",
    "contains": "Fonts, sizes and colours set once as styles, not typed into each line."
   },
   {
    "name": "Script",
    "contains": "Code in Python or Node that fills the template from your data and writes the file."
   },
   {
    "name": "How to change it",
    "contains": "Where to edit text, colours and layout the next time you run it."
   },
   {
    "name": "Checks",
    "contains": "Tests for totals, fonts and heading order, each marked NOT RUN until you run it."
   },
   {
    "name": "Open questions",
    "contains": "Decisions only you can make, such as the exact logo file."
   }
  ]
 },
 "output_shape": "FORMAT CHOICE\n  Reader: <who> | Format: <PDF, DOCX, PPTX or XLSX> | Why: <reason>\n\nLAYOUT PLAN\n  <section or sheet> | <content from your data> | <style>\n\nTEMPLATE AND STYLES\n  <style name> | <font, size, colour> | <where it is used>\n\nSCRIPT\n  Language: <Python or Node> | Library: <name>\n  <code that fills the template from your data>\n\nHOW TO CHANGE IT\n  <what to edit> | <where>\n\nCHECKS\n  <check> | <how to run it> | <pass, fail or NOT RUN>\n\nOPEN QUESTIONS\n  <question> | <what changes the answer>",
 "how_to_use": [
  "Download the pack from this page and add it to your AI as a skill. If you cannot, paste SKILL.md into a new chat, then paste references/source-agent.md after it.",
  "Say what the document is, who reads it and paste your data. Name the format, or ask it to choose.",
  "Type \"Pick the format and write the script\" or \"Make a reusable template for this monthly report\".",
  "Run the script. If your AI can run code, ask it to save the file and show where. If it cannot, run the script on your own machine.",
  "Open the file. Check numbers, names and styling against the checks list before you send it."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "JSON document file generator",
   "url": "https://useaiblocks.com/skills/document-file-generator",
   "why": "JSON document file generator"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/specialized/specialized-document-generator.md",
  "licence": "MIT",
  "original_name": "Document Generator",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "Document Generator",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/specialized/specialized-document-generator.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-specialized-document-generator",
  "markdown": "https://useaiblocks.com/agents/agency-specialized-document-generator.md",
  "json": "https://useaiblocks.com/agents/agency-specialized-document-generator.json",
  "instructions": "https://useaiblocks.com/skills/agency-specialized-document-generator/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-specialized-document-generator.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-specialized-document-generator",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-specialized-document-generator",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
