> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/en/work/writing-assistants/legal-attest-letter.md).

# Draft Legal Notice Letters

Certified letter drafting Agent use case: build a legal certified-letter writing assistant with MaiAgent that produces a draft from the sender, recipient, facts, and demands. Includes a sample role in

The purpose of a certified letter (存證信函) is to preserve evidence of "what I told the other party on a given day": demanding payment of a debt, demanding performance of a contract, giving notice of termination, or demanding that infringement stop. It does not require sophisticated legal language, but it does need the **parties, facts, specific demands, deadline, and follow-up action** to be written clearly and completely. This is a good fit for an Agent to take care of: it asks follow-up questions when information is missing, and produces a well-structured draft once everything is there.

{% hint style="warning" %}
What the Agent produces is a **draft**, not legal advice. Before sending, have legal counsel or a lawyer confirm the facts, the basis of the claims, and the wording. The Agent will also not send the letter on your behalf.
{% endhint %}

## Use Cases <a href="#scenarios" id="scenarios"></a>

| Scenario                    | Examples                                                                                                                                  |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Debt and payment collection | A loan that is due but unpaid, an overdue payment for goods                                                                               |
| Lease disputes              | Demanding unpaid rent, giving notice of lease termination, demanding return of a deposit                                                  |
| Contract performance        | Demanding that the other party deliver, complete work, or fix defects as agreed; giving notice of rescission or termination of a contract |
| Consumer disputes           | Demanding a refund, replacement, or repair of a defective product                                                                         |
| Intellectual property       | Demanding that the other party stop using an unauthorized trademark, image, or text                                                       |

Users are typically legal, sales, or finance collections staff at a company, or case handlers who need to draft a version first and then hand it to a lawyer for review.

## Check for an Existing Official Agent First <a href="#official-agents-first" id="official-agents-first"></a>

In the <mark style="color:blue;">Official Built-in</mark> tab of the [Agent Marketplace](https://docs.maiagent.ai/maiagent-user-guide/en/work/built-in-agents/use.md), the <mark style="color:blue;">Legal</mark> scenario offers Agents such as <mark style="color:blue;">Contract Drafting</mark>, <mark style="color:blue;">Contract Risk Review</mark>, and <mark style="color:blue;">Contract Information Extraction</mark>, which deal with the contract itself. There is currently no official Agent dedicated to drafting certified letters, so please build one by following the steps below. The two can be combined: first use <mark style="color:blue;">Contract Information Extraction</mark> to pull the parties, amounts, and deadlines from the contract, then pass them to the certified letter Agent to draft.

## What to Prepare <a href="#prerequisites" id="prerequisites"></a>

* An account that can create Agents (the role has the <mark style="color:blue;">AI Assistants</mark> permission)
* 2–5 certified letters your company has sent in the past (optional), with personal data masked, to serve as templates for tone and structure
* Your company's fixed information (optional): full company name, registered address, responsible person, and the usual way of writing payment account details
* Confirm who is responsible for review before sending (legal counsel or an outside lawyer), and write this into the reminder text in the role instructions

## Setup Steps <a href="#setup" id="setup"></a>

### 1. Create the Agent <a href="#step-create-agent" id="step-create-agent"></a>

Go to <mark style="color:blue;">AI Assistants</mark> and click <mark style="color:blue;">Create AI Assistant</mark>. Name it, for example, "Certified Letter Drafting". For <mark style="color:blue;">LLM Model</mark>, choose a model that your organization has enabled and that has stronger reasoning and long-form writing ability; keep the response mode at the default <mark style="color:blue;">Agent Mode</mark>. For details, see [Create an Agent](https://docs.maiagent.ai/maiagent-user-guide/en/build/agent/setup.md).

### 2. Paste the Role Instructions <a href="#step-system-prompt" id="step-system-prompt"></a>

In <mark style="color:blue;">Response Mode Settings</mark>, paste the following example into <mark style="color:blue;">Role Instructions</mark>, and change the review contact in the reminder text to your company's actual practice.

```
## Role
You are a certified letter drafting assistant who helps users organize the facts and demands of a dispute into a draft certified letter,
or offers revision suggestions on an existing draft. You do not provide legal advice, and you do not judge who is right or wrong.

## Confirm before writing
If any of the following is missing, ask for all of it at once before writing. Do not assume or fill in anything yourself:
1. Sender: name or full company name, address (for a company, also the responsible person)
2. Recipient: name or full company name, address; if there are carbon-copy recipients, provide them as well
3. Relationship and basis: for example, which contract, which loan, which order (date, amount, subject matter)
4. Facts: in chronological order, what happened and where the other party failed to perform
5. Specific demands: what the other party is asked to do (pay how much, deliver what, stop which conduct)
6. Performance deadline: within how many days after receiving the letter, or a specified date
7. Follow-up if the deadline is missed: for example, pursuing remedies under the law, terminating the contract, filing a lawsuit
8. Supporting documents: contracts, IOUs, remittance records, conversation screenshots, and so on (names only are fine)

## Structure
1. Begin by stating the sender, recipient, and carbon-copy recipients
2. Subject: one sentence stating the purpose of the letter
3. Facts: list in chronological order, one matter per point, stating dates, amounts, and document names
4. Demands: clearly state what the other party is required to perform and the deadline
5. Consequences of default: the action the sender will take if the other party does not perform within the deadline
6. Closing: a short ending such as "This letter is hereby sent for your attention"

## Writing principles
- Write only the facts provided by the user. Keep the tone firm but plain, and do not use emotional, insulting, or threatening language.
- Write amounts both in Chinese capital numerals and Arabic numerals; write dates with the full year, month, and day.
- Do not cite statute article numbers the user has not provided. When a legal basis is needed, write "pursuant to the agreement between the parties and the relevant laws and regulations",
  and remind the user to have legal counsel or a lawyer add to it.
- Mark any information the user did not provide with [TO BE FILLED].

## Add this at the end of every output
"This draft does not constitute legal advice. Before sending, have legal counsel or a lawyer confirm the content;
for the paper format and delivery method of a certified letter, follow Chunghwa Post's regulations."

## What not to do
- Do not help fabricate facts or evidence, or write content that intimidates or defames others.
- Do not answer questions like "Will I win?" or "Should I sue?"; ask the user to consult a lawyer.
```

### 3. Add Templates and Company Information (Optional) <a href="#step-knowledge-base" id="step-knowledge-base"></a>

Upload the masked past certified letters and the company's fixed information to a [knowledge base](https://docs.maiagent.ai/maiagent-user-guide/en/build/knowledge-base/km.md), attach it in the Agent's <mark style="color:blue;">Knowledge Base Settings</mark>, and add a sentence to the role instructions: "Before writing, search the knowledge base for templates of similar situations and follow their tone and structure; when the sender is our company, use the full company name and address from the knowledge base."

{% hint style="info" %}
Templates in the knowledge base will be quoted in drafts. Before uploading, be sure to mask the names, addresses, ID numbers, and account numbers of the counterparties.
{% endhint %}

### 4. Enable File Upload <a href="#step-enable-upload" id="step-enable-upload"></a>

Users often need to upload contracts, IOUs, or conversation screenshots so the Agent can read the facts. Go to this Agent's "Internal" chat platform → [Function Settings](https://docs.maiagent.ai/maiagent-user-guide/en/build/conversation-settings/platform-settings/function-settings.md#basic-functions) and enable <mark style="color:blue;">Allow file uploads</mark>.

### 5. Restrict Who Can Use It <a href="#step-share" id="step-share"></a>

Certified letters involve disputed facts and personal data, so it is recommended to open the Agent only to the roles that need it, such as legal and collections: in [Role Permissions](https://docs.maiagent.ai/maiagent-user-guide/en/org/roles/role-permission.md), assign this Agent's "Internal" chat platform to those roles. Colleagues can then select it in [Internal Q\&A](https://docs.maiagent.ai/maiagent-user-guide/en/work/explain.md) and start a conversation.

## Test Cases <a href="#test-cases" id="test-cases"></a>

| # | Input                                                                                                                                                                                   | Expected result                                                                                                                                         |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1 | "The other party owes me money, write a certified letter for me"                                                                                                                        | Does not start writing; asks for the parties, loan date and amount, demands, deadline, and follow-up action all at once                                 |
| 2 | Provides complete information: lender, borrower, a loan of NT$300,000 made on January 10, ROC Year 115, repayment agreed for April 10, still unpaid, demanding a transfer within 7 days | A well-structured draft: facts listed chronologically, amounts in both Chinese numerals and digits, a clear deadline, and the draft reminder at the end |
| 3 | Gives only the company name and no address                                                                                                                                              | Marks the address as \[TO BE FILLED] and reminds the user to add it                                                                                     |
| 4 | "Make it sound tough, say they'll regret it if they don't pay"                                                                                                                          | Keeps a firm but plain tone, does not write threatening language, and explains why                                                                      |
| 5 | "Add which article of the Civil Code applies"                                                                                                                                           | Does not invent an article number; suggests that legal counsel or a lawyer add it                                                                       |
| 6 | Uploads a lease PDF and says the tenant is two months behind on rent                                                                                                                    | Reads the parties, rent, and payment date from the lease, and asks follow-up questions for missing information                                          |
| 7 | "Can I win if I sue like this?"                                                                                                                                                         | Explains that it does not provide legal advice and suggests consulting a lawyer                                                                         |

## FAQ <a href="#faq" id="faq"></a>

### Does a certified letter written by the Agent have legal effect? <a href="#faq-legal-effect" id="faq-legal-effect"></a>

The function of a certified letter is to prove that "the sender expressed this content to the recipient on a given day". Its effect comes from being sent and retained in accordance with the post office's rules, and has nothing to do with who drafted it. Whether the content is sufficient to assert a right still has to be judged by legal counsel or a lawyer, so every draft should be reviewed by a person.

### Can the draft be taken directly to the post office to send? <a href="#faq-post-office" id="faq-post-office"></a>

What the Agent produces is the body text. Certified letters at the post office have a designated paper format and number of copies, so please enter the reviewed text into the certified letter forms provided by Chunghwa Post or its online service, and proceed according to the post office's rules.

### Can it cite statutes automatically? <a href="#faq-cite-law" id="faq-cite-law"></a>

We do not recommend letting the model cite article numbers from memory. If your company has commonly used legal basis paragraphs, have legal counsel confirm them and put them in the knowledge base, and state in the role instructions: "Only cite the legal basis paragraphs in the knowledge base."

### Could the content of these disputes leak? <a href="#faq-privacy" id="faq-privacy"></a>

Conversations and uploaded files are visible only to members with permission. We recommend limiting the Agent to specific roles and masking third-party personal data in the knowledge base templates. For the platform's data protection information, see [Security and Privacy](https://docs.maiagent.ai/maiagent-user-guide/en/org/security-and-privacy.md).

### Want external customers to use it too? <a href="#faq-external" id="faq-external"></a>

You can create a separate "Website" chat platform to offer it externally, but for external use, be sure to clearly state "does not constitute legal advice" in the opening message and at the end of every draft, and evaluate whether login authentication is needed. For setup, see [Web Chat](https://docs.maiagent.ai/maiagent-user-guide/en/build/choose-channel/web-chat.md).

## Further Reading <a href="#further-reading" id="further-reading"></a>

* [Use Cases: Documents and Content Creation](https://docs.maiagent.ai/maiagent-user-guide/en/work/writing-assistants.md): design highlights of other document Agents
* [Official Document Drafting Assistant](https://docs.maiagent.ai/maiagent-user-guide/en/work/writing-assistants/official-document.md)
* [Use Official Built-in Agents](https://docs.maiagent.ai/maiagent-user-guide/en/work/built-in-agents/use.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/maiagent-user-guide/en/work/writing-assistants/legal-attest-letter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
