GitHub Park

PPT Agent: A code-driven presentation generation framework

PPT Agent is a code-driven framework for generating presentations. It separates content planning from visual layout: first, it structures the data, then calls on asset libraries as needed, ultimately producing high-fidelity HTML files and PPTX files that remain editable—avoiding issues where large language models produce messy layouts or fabricate content due to overly long prompts.

Key Features

  • Separation of Structure and Design: First generates and validates a JSON file that describes the structure of each page, then renders it into HTML.
  • On-Demand Loading: The system includes over 60 modular assets. Through a multi-level tree structure, it injects only the components required for the current page, reducing token usage and preventing instruction interference.
  • Validation During Writing (QA): Internal scripts perform real-time checks on JSON formatting during writing, automatically mounting preconfigured resources and assembling prompts. Manual involvement is limited to reviewing and providing feedback.
  • Two Output Options: When rendering results, it can generate PNG image streams for broad compatibility, or SVG files that retain vector graphics and editable text.
  • State Persistence: For long-running tasks, the system saves progress to a progress.json file at each step, allowing the process to be interrupted and resumed later.

Workflow

The generation process is divided into six steps:

  1. Requirement Confirmation: Iteratively clarify the audience and use case.
  2. Parallel Search: Gather information from multiple sources and cross-validate.
  3. Outline Structuring: Define the narrative structure and argumentation approach.
  4. Per-Page Structuring (JSON): Determine the layout and information placement for each page.
  5. View Assembly (HTML): Load CSS variables and render the final interface.
  6. Package Output (PPTX): Assemble the content into a standard Office document via scripts.

Quick Start

This is a zero-configuration AI skill; there’s no need to set up a local environment or install anything in advance. Runtime dependencies are automatically resolved by the agent during execution.

How to Run

The project currently exists as a Skill. Simply state your requirements in the chat interface, and the agent will run through the entire process. For example:

“Generate a 15-page pitch deck on the topic of AI large language model compute consumption trends.”

The generated files will be placed in the ppt-output/ folder in the root directory, including a preview.html file for browser-based navigation and a presentation.pptx file.

Directory Structure

ppt-agent-skill/
├── SKILL.md                 # Orchestration instructions for the agent
├── scripts/                 # Automation scripts (handling prompts, SVG injection, format mounting)
└── references/              # Pluggable static asset library
    ├── blocks/              # Pre-designed card components
    ├── layouts/             # Grid layout templates (e.g., Bento)
    ├── charts/              # Pure SVG statistical charts
    └── styles/              # Eight design color schemes
Visit sunbigfly/ppt-agent-skills to access the source code and obtain more information.