Inside the design decisions that made complex document work practical for agents
By Rahul Makwana, AI Engineer
Short answer: AI agents helped deliver 71 engagement-letter templates that were formally
accepted and made available to users. In the workstream I led, agents used defined editing
operations and assembled evidence for review. People retained responsibility for unresolved
wording decisions, reviewer verification and acceptance. The project measured recorded
editing activity, not hours saved.
We used AI agents to help deliver 71 engagement-letter templates for a large accounting firm. All 71
are now formally accepted and available to its users. During the later review phase, the agents also
helped extend the authoring tools they used to do the work.
The templates run in HubSync's Engagement Letter Wizard. A preparer answers questions about an
engagement, and the Engagement Letter Wizard assembles the letter with the appropriate wording
and fee arrangements. Our work translated the firm's approved source letters into that conditional
structure.
I led one agent workstream in a review application built and owned by a colleague. We gave agents
responsibility for taking a review request through to a checked template change. That required
decisions about the shape of the work, how changes could be made and what evidence a reviewer
would receive.
Key takeaways
-
AI agents edited the engagement letter templates through defined editing operations, with checks suited to each change.
-
Review of agent work combined generated answer paths, structural checks, and comparison with the firm's approved source letters.
-
Completed editing, reviewer verification, and formal acceptance remained separate milestones.
Why treat an engagement letter template as a set of possible documents?
An engagement letter can change substantially with a preparer's answers. A service choice may include a clause, expose a follow-up question and alter language elsewhere in the document. Those dependencies are part of what an authoring system has to represent.
In one template, a numbered list ended with an optional item about supplementary information. When that item was included, the preceding item needed to end with "; and". When it was excluded, the preceding item needed a period. One answer controlled two parts of the finished letter.
Figure 1. A conceptual view of a dependency in the project. The answer controls the optional content and the punctuation leading into it.
The technical challenge was preserving these relationships across the document and the wizard. In the workflow we used, the Engagement Letter Wizard derived its question structure from the document's conditional nesting when the template was imported and saved. The authoring tools had to work with that representation, including choices that intentionally produced no text.
Checking that the conditions were structurally valid answered one question. Comparing the Yes and No outputs answered another. Source comparison established whether the wording belonged in that letter at all.
One rich-text field in the project was examined across up to 400 answer combinations. Coverage varied with the field and the change being investigated.
How do you give AI agents predictable ways to edit a template?
Give agents editing tools with specific effects, such as adjusting an indent, renaming a question, or rewriting a paragraph, so each change can carry its own checks. A reviewer's request might concern a missing question, a paragraph's formatting or wording that appeared under the wrong answer. The agent needed to interpret the request against the current template and its approved references.
Each operation changed a different part of the document model, so we could give it checks suited to that effect.
An indent adjustment should preserve the words and conditions in the paragraph. A question rename needs to preserve the relationships between that question and the places that use it. A paragraph rewrite has a broader effect and requires closer inspection of the resulting content.
Figure 2. The division of responsibility in the later review workflow. Interpretation leads to a bounded change with evidence that survives the agent session.
The model could investigate a request and select a transformation, while the application provided a consistent way to apply and record it. When the tool refused an operation or the source did not settle a wording question, the request went to its designated owner.
Each letter's changes were stored as operations and replayed in order against a baseline. That history let us reconstruct how a template had changed. It also meant a correction belonged in the build inputs; editing only a generated copy would not persist through the next rebuild.
How can AI agents work on templates in parallel?
We organized delivery around one template per source letter. That gave each assignment an approved source and a separate edit history. Shared field definitions and reference patterns could still be reused across the set.
Within my workstream, one agent worked on a letter at a time. Agents could work on different letters in parallel.
That boundary followed the behavior of the edits. Rewriting a paragraph can change the structure that another operation expects. Two agents acting on the same earlier version could each prepare a reasonable change and still interfere when those changes were applied together.
We kept the edits on a letter ordered and required agents to re-read its current state before saving. A reviewer could then assess the assignment against one source letter and its relevant answer paths. Shared rules still created dependencies across letters, so changing a shared rule required attention beyond the individual assignment.
How should AI agent changes be verified?
Verification should cover the full effect of a change, not just the paragraph being edited. The review application let an agent preview a proposed operation before saving it. After the save, the agent checked the rebuilt result for new rule findings, edits that no longer applied and changes outside the assignment.
For the punctuation example, inspection needed to cover both the included and excluded cases. A change to a shared question called for checking the branches that depended on it. Looking only at the paragraph being edited would miss part of its effect.
Structural checks examined the template's field relationships and conditions. Consistency checks compared the template with the firm's rules and master field definitions. Generated scenarios exposed the text produced by different answers, and source comparisons checked that the required wording was present.
Review in the Engagement Letter Wizard exercised the saved template through the wizard and document generation that preparers use. A local harness also exercised selected platform generation functions to investigate particular interactions between conditional content and rich-text insertion. Its coverage was narrower than the full application workflow.
Version identity mattered throughout. A change in the review application still had to reach the target environment. A letter already generated from an earlier template retained that earlier content. We compared a reported result with the edit history before assuming it required another change.
The same attention to state applied when a save response was uncertain. A dropped connection could occur after the edit had been stored. The agent had to inspect the current state before attempting another write.
The handoff to a reviewer included the affected paragraph and answer path, with edit and audit IDs. Completed editing, reviewer verification and formal acceptance remained separate milestones.
Can AI agents help improve the tools they use?
Yes, with human review. Some requests needed a transformation the application did not yet offer. Agents helped draft new operations, including focused indentation changes, list-level control and a merge field in a page header. I reviewed and merged those contributions; deployment remained with the application's owner.
Once an operation became available, an agent could resume the relevant assignment through the existing preview and review process. The new capability was then available for subsequent work.
Figure 3. How template work contributed to the authoring toolset. Human-reviewed extensions became reusable operations for subsequent agent assignments.
This introduced a compatibility constraint. Because builds replayed stored edits, changing the meaning of an existing operation could alter a letter that nobody had asked to revise. We introduced new behavior through a new operation type or an opt-in option, preserving the behavior of the stored history.
The operation that copied an approved block from a reference letter made another important choice: it captured that content when the edit was saved. A future change to the reference letter therefore did not silently flow into another letter on its next rebuild. Adopting a later reference change would require an explicit update.
Who decides the wording when AI agents edit templates?
An agent's ability to express a change did not give it authority to choose the firm's wording.
We established an order for the reference material: the letter's own approved source, the master field list and the designated reference letter for shared structure, subject to explicitly approved exceptions. Reference patterns could guide implementation within their authorized scope. Unrelated wording stayed with its own source letter.
Questions that the references did not resolve went to the designated reviewer. Changes to the application's rules or tools went to its owner. The agent supplied the relevant passage and the decision needed so the work could resume once that decision was recorded.
For my later review workstream, template writes used the application's API, which recorded each action, and centrally revocable automation access. The action record identified the agent and the person on whose behalf it acted. Direct database access was outside its permitted scope, and people handled imports into the client's environment.
What did AI agents add to delivery?
An internal review dated October 6, 2026 attributed about 90% of roughly 2,850 stored template edits to agents across the project's workstreams. That measures recorded editing activity. We do not have a reliable hours-saved figure.
The agents took responsibility for investigating requests, preparing changes and assembling evidence for review. Some assignments also produced improvements to the tools available for later work.
For another project, I would look for that combination: a meaningful assignment with a clear boundary, a predictable way to change the underlying artifact and evidence that makes the result straightforward to assess. I would also measure the effort required to review those results as the volume of agent work grows.
HubSync is an all-in-one AI operating system offering end-to-end tax and accounting workflow platforms, built exclusively for leading CPA firms. At HubSync, this experience informs how we build agent workflows and the continued development of https://hubsync.com/solution/ai, the central AI orchestration engine behind HubSync's AI agents. If your firm is planning a template migration, https://hubsync.com/contact-us.
When isn't this approach the right fit?
Agent-led template work depends on approved source letters to compare against. Without them, agents have no authority for wording decisions. For a small set of simple templates, I would weigh the setup and review effort before adopting this workflow. The application also needs a reliable way to record and inspect changes; replaying operations was the approach we used.
Frequently asked questions
What is a conditional engagement letter template?
A conditional engagement letter template is a single master document that produces different letters depending on a preparer's answers about the engagement. A service choice can include a clause, expose a follow-up question, or change wording elsewhere in the letter, so the template has to represent those dependencies, not just the text.
Do AI agents decide engagement letter wording?
No. In this project, the firm's approved sources determined wording: the letter's own approved source, the master field list, and the designated reference letter. Questions the references did not resolve went to the designated reviewer.
Did AI agents save time on the template project?
An October 6, 2026 snapshot attributed about 90% of roughly 2,850 stored template edits to agents across the project's workstreams. That measures recorded editing activity. We do not have a reliable hours-saved figure.
About the Author
Rahul Makwana builds AI agent workflows at HubSync. His decade of engineering experience spans enterprise software, connected devices and AI tools for audit review. He also mentors engineers and students in practical AI development.

