Agent Wranglers

AIF-37Recommended

Label AI output where people see it

Mark AI-written text as AI-written wherever it is shown. Store a flag with it, so the label follows the text into emails, exports and other pages.

How to do it

Show a visible label, such as "Drafted by AI", on every AI answer, summary and suggestion. Store an ai_generated flag and the model version in the same row as the text. Clear the flag only when a person has edited and approved the text, and record who did. The label lets readers judge the text and lets you find AI text later, such as for a correction or an audit. The law asks for less than this rule. In the EU, Article 50(4) of the AI Act requires disclosure only for text published to inform the public on matters of public interest. Text a person reviewed, under someone's editorial responsibility, is exempt. That legal duty, and the duties for chats and media, are in say when people talk to an AI.

Examples

TypeScript example

await db.replies.insert({ ticketId, body: draft.text, aiGenerated: true, modelVersion: draft.model, approvedBy: null });

Python example

db.replies.insert(ticket_id=ticket_id, body=draft.text, ai_generated=True, model_version=draft.model, approved_by=None)

HTML example

<p class="ai-label">Drafted by AI. Check it before you send.</p>

How to check

A browser test opens each screen that shows AI output and finds the label. A query finds no stored AI output whose flag is empty, and every row with the flag cleared has an approver.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-features/guardrails-and-human-review/label-ai-output">Agent Wranglers AI features playbook</a>. In code you write, add a comment next to it with the same link.