top of page

Agentic AI in the Real World: How We Built a Document-Drafting Agent for Government

  • Jun 10
  • 3 min read

Our client was a government operations team fielding over 400 public inquiries every month. Sixty percent required email replies; the other forty percent needed formal official documents. Each format comes with its own rules — tone, structure, honorifics, and approval hierarchy. Every response had to meet those standards before it could go out. And every single one was written by hand, from scratch.

What they needed wasn't an AI that could look things up. They needed one that could turn answers into ready-to-send documents.

Challenge 1: Teaching the Agent to Write Like a Government Office

Format turned out to be harder than expected.

Email replies need to be clear and approachable without sounding too casual. Official documents require the right titles, structured paragraphs, and language that can survive a supervisor's review. Generic AI outputs landed somewhere in between — not quite either. Staff still had to take the AI's answer, strip it down, and rewrite it in the right format themselves.

Our approach: we asked the client to share around fifty real documents they'd previously sent out. We broke down the formatting logic, vocabulary patterns, and paragraph structures from those examples and used them as the foundation for the Agent's output. From that point on, staff could choose whether they needed an email draft or an official document — and the system would generate it in the correct format. Not plain AI language. A draft that could go straight to review.

Challenge 2: When Two Versions of a Regulation Conflict, Who Decides?

Once the knowledge base was in place, we ran into another problem.

On certain topics, the client's document library contained multiple versions of the same regulation from different time periods. Old versions weren't deleted — they stayed in the system alongside newer ones, because referencing historical versions is sometimes necessary.

The risk: when an Agent sees two contradictory documents, the worst thing it can do is quietly pick one without telling anyone.

Our solution relied on the documents themselves carrying version and effective-date information so the Agent has a basis for deciding what to cite. When conflicting content is detected, the Agent doesn't make the call — it surfaces the conflict and lets staff decide. For external replies, only high-confidence content is included. For internal use, the conflict is kept visible so staff know where human judgment is needed.

The Detail Nobody Expected — But Everyone Remembered

During the trial period, staff ran a side-by-side test: the same question, sent to a separate FAQ bot and to our document Agent. The FAQ bot triggered a personal data warning. The document Agent didn't.

This was an intentional design decision. The document Agent's users are internal staff, not members of the public — the threshold for triggering that kind of alert is different by design. The staff didn't know that going in. What they noticed was: "This Agent seems to know who it's talking to."

The client's feedback at the end of the trial: "The maturity level is impressive." In a government setting, that's about as strong an endorsement as it gets.

What This Project Taught Us

Government work isn't just information retrieval. It carries format requirements, version history, and role-specific boundaries. Understanding those layers deeply — not just technically, but operationally — is what separates an AI that can look things up from an Agent that actually gets the job done.

Translating that understanding into deployable architecture is what we're built to do. This document Agent runs on Headquarter.ai's Agentic Resource Platform, where knowledge base setup, output formatting, and access controls can all be configured and adjusted within one framework — so AI fits into how your organization actually operates, rather than the other way around.

If your organization handles a high volume of written correspondence, we'd love to talk. Contact Us.


bottom of page