Agent Workflows
Working with Agents
How to prompt AI agents to correctly use OpenPress: start from skills or raw materials, create an editable workspace, validate output, and stop before crossing product boundaries.
The core innovation of OpenPress is that it is a document framework designed for AI Agents from day one. Understanding the philosophy behind “Working with Agents” helps you more effectively guide AI to produce high-quality results.
Division of Responsibilities Between Agents and Framework
In traditional tools, human users must do everything from content ideation to typographic tweaking. In OpenPress, we established a clear contract that distinguishes the responsibilities of the framework, Agents (Skills), and the source code.
The Passivity of the Framework (Engine)
The OpenPress engine itself is extremely passive. It does not understand “aesthetics,” possesses no “storytelling” ability, and contains no domain-specific business logic. Its duty is purely mechanical: parsing the component tree, processing the typographic algorithms, validating structural correctness, and generating the final static artifacts. This passivity ensures the stability and universality of the engine.
The Proactivity of Agents (Skills)
Conversely, Agents are full of opinions and proactivity. Through different “Skills,” an Agent can play the role of a copy director, a visual designer, or a technical documentation expert. They are responsible for understanding the user’s intent, selecting appropriate layouts, generating content, and making decisions regarding typography and taste.
The Single Source of Truth: Workspace Source Code
When an Agent creates or modifies a document for you, all changes must occur at the “source code” level of the workspace. This is a non-negotiable principle in OpenPress’s design.
Why not modify the output directly? If an Agent bypasses the source code and directly modifies the compiled HTML or the typeset PDF, those modifications will be fragile and un-reproducible. When the document needs to be updated again, those direct output modifications will be lost.
By forcing Agents to edit only the source code (such as MDX content, React components, or CSS tokens), we ensure that every single modification to the document is declarative, trackable by version control, and capable of being reliably re-compiled by the engine.
The Meaning of the Validation Loop
A competent Agent should not simply stop after modifying the code. OpenPress provides a suite of validation tools (from type checking to local preview), forming a closed “validation loop.”
The existence of this loop is to give Agents the ability to “self-correct.” Before presenting the final results to the user, the Agent must use these tools to verify whether its changes comply with the framework’s structural standards and whether they cause compilation failures. This mechanism drastically reduces the review burden on the user, ensuring delivery quality.
Respecting Product Boundaries
Although Agents are powerful, OpenPress imposes strict boundaries (Hard Stops). Agents are confined to the realm of document creation; they cannot arbitrarily modify the underlying code of the framework, they cannot fabricate business metrics out of thin air, and they absolutely cannot publish content to public production environments without explicit authorization. These boundaries exist to strike a perfect balance between automation and safety.