Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
32 KiB
Dify for school communication: three apps for Example College
Guide 3 for the AI Agents workshop
LeX Consultancy B.V. · 20 September 2026
In guide 1 you built a workflow, in guide 2 an agent with a knowledge base. Now you put those two forms to work for a real team: the people at a school who write to parents, for the website and for the parent app. You build three apps for the fictional Example College:
| App | Form | What it does |
|---|---|---|
| Parent letter assistant | Agent (chat) | Rewrites a draft letter according to the style guide and says what it changed |
| School news | Workflow (form) | Turns one core message into a piece for the website, the parent app and social media |
| Reception mode | Extension of the School guide assistant from guide 2 | Writes, for a receptionist, the reply to a parent, from the school guide and in the house style |
The common thread is a style guide: two pages with the school's agreements about reading level, form of address, words to avoid and the length per channel. You put it in the knowledge base next to the school guide. After that all three apps stick to it, without you having to repeat the rules in every prompt. Change the style guide and the apps change with it.
This guide follows the cloud version of Dify as it looked on 20 September 2026. Dify changes fast: if your screen differs, follow what you see, not what is written here.
How to read this guide
| Form | Meaning |
|---|---|
| 1. 2. 3. | What you do: click, choose, open |
| Bold | A button, menu or field as it appears on your screen |
| Table What you type | Values you put in a form field |
| Grey box Type in | Text you type or paste literally |
| Orange box | A pitfall you would otherwise discover yourself |
| Green box Your choice | A place where you can replace our example with your own material, style or prompt |
About credits and the app limit: a sandbox account may have five apps in Studio. With the apps from guides 1 and 2 you hit exactly that limit after this guide. That is why we do not build the third app from scratch but extend the School guide assistant. If you do want a separate app, delete an old one first (Studio, ... menu on the card, Delete). On a paid account (Professional: 50 apps) this does not apply and you can simply use Duplicate in part D.
The design card for this app
Before we started clicking, this card was filled in (the blank card is in the Design card appendix). Fill in the same five boxes for your own app; the loose version of this filled-in card is in 00-design-card/examples.
| 1. Who is it for | 2. What goes in |
|---|---|
| A form tutor who at 16:00 still has to send a letter about next week's school trip and has three woolly paragraphs. Wants the letter to sound like the school, not like themselves. | The draft letter or loose sentences, pasted into the chat. If the class or the requested action is missing, the agent asks for it. |
| 3. What comes out | 4. What it must stick to |
|---|---|
| The rewritten letter with a subject line, in the style of the style guide (B1, formal address, structure), and below it "What I changed": at most five points with the rule for each. Missing facts as [FILL IN]. | The style guide of Example College (style-guide-example-college.pdf) in the knowledge base; invent no dates, names or appointments; no introduction or compliment from the agent itself. |
5. How you know it works
| Test | What goes in | What must come out |
|---|---|---|
| 1 | A woolly letter about a parents' evening | A short letter with date, time, place and what the parent must do; five improvement points |
| 2 | Two loose sentences without a class | The agent first asks which class the letter is for |
| 3 (the hard one) | A letter without the date of the trip | [FILL IN] where the date should be, no invented date |
Preparation
- You have done guide 2: the knowledge base School guide Example College and the app School guide assistant are on your account.
- You have
style-guide-example-college.pdfready (it comes with this guide). - Your model is set to gpt-5-mini. The default model gpt-5 is five times as expensive.
Your choice: your own style guide. Does your school or trust have a house style guide, a communication guide or a "this is how we write" document? Use that instead of ours. Conditions: real text (not a scan), no personal data, and preferably short. Two to five pages of concrete rules work better than thirty pages of vision. If you have nothing, write down ten rules you find important yourself, for example "we address parents formally" and "no abbreviations". That is enough to start with.
Part A. The style guide in the knowledge base
The school guide is already in the knowledge base. You add the style guide as a second document, so that one knowledge base contains everything the apps need to know about the school.
Step 1. Add the file
- Click Knowledge in the left-hand menu and open School guide Example College.
- Under Documents, click Add file.
- Click Browse and choose
style-guide-example-college.pdf, or drag the file into the box.
- Click Next.
In the sandbox you can upload only one file at a time ("Maximum 1 files"). So you add several documents one after another. That is not a mistake on your part.
Step 2. Check the splitting setting
Dify does not necessarily remember the setting of the first document. So check again how the document is split.
- In the Delimiter field set the value to
\n\n(backslash-n twice, no spaces).
| Field on screen | What you type |
|---|---|
| Delimiter | \n\n |
| Maximum chunk length | 1024 (leave as is) |
| Chunk overlap | 50 (leave as is) |
- Click Preview Chunk. On the right you now see four pieces of a few paragraphs each: who we write for and the tone, the words to avoid and the letter structure, the channels, the privacy rules.
- Click Save & Process.
Step 3. Wait for the green tick
For two pages this takes a few seconds. Then click Go to document: the knowledge base now has two documents.
Step 4. Update the description
The agent reads the description of the knowledge base to decide whether to search in it. Now that it also contains writing rules, the description must say so.
- Click Settings in the left-hand menu.
- Replace the text under Description.
Two documents from Example College. School guide: lesson times, reporting illness, absence and leave, homework and tests, phones and laptops, form tutors, contact. Style guide: how the school writes for parents, website, parent app and social media (level B1, forms of address, words to avoid, letter structure, length per channel, photos). Use for school rules and for parent texts.
- Scroll down and click Save.
The description may be at most 400 characters (the text above is 383). If it is longer, Dify saves nothing and shows "Modified unsuccessfully" at the top right, or nothing at all; the old text stays. Check after Save that the new text is there.
Your choice: the description. Write the description as if you were explaining to a new colleague when to open this folder. Name the topics, not the file names. Then test with Retrieval Testing (left-hand menu) whether a question such as "may I address a parent informally?" puts the right piece at the top.
Part B. The Parent letter assistant (agent)
A teacher pastes a draft letter, the assistant turns it into a letter parents understand at first reading, and explains what it changed and why. That last part is deliberate: this way the team gets to know the style guide instead of outsourcing it.
Step 5. Create the agent
- Go to Studio and click Create → Create from Blank.
- Under Choose an App Type choose the Agent card.
| Field on screen | What you type |
|---|---|
| App Name & Icon | Parent letter assistant |
| Description | may stay empty |
- Click Create.
- Click the model name (gpt-5) at the top right and choose gpt-5-mini.
Step 6. Write the instruction
- Click in the INSTRUCTIONS box and paste the text below.
You are the parent letter assistant of Example College. Teachers, form tutors and heads of year paste a draft letter or a few loose sentences, and you turn it into a letter that parents understand at first reading.
Method:
1. Always consult the style guide in your knowledge base first. Apply the rules on reading level B1, formal address, words to avoid, the structure of a parent letter and the length.
2. If it is not clear who the letter is for (which class or year group) or what the parent has to do, ask that first; do not guess.
3. First give the rewritten letter, with a subject line, and then under the heading "What I changed" a list of at most five points, each with the rule from the style guide it belongs to.
4. Do not invent dates, names or appointments that are not in the supplied text. If something a parent needs to know is missing, put [FILL IN] in that place.
5. Be brief. No introduction, no compliment, no sign-off from you.
Your choice: the method. Point 3 determines the shape of the answer. Would you rather have two variants (short and full)? A version in another language for parents who speak it? Only the letter, without the explanation? Change only that point and test again. Point 4 (invent nothing, [FILL IN]) we recommend keeping; that is the rule that keeps you out of trouble.
Step 7. Attach the knowledge base
- Under Knowledge, click + Add.
- Tick School guide Example College and click Add.
Step 8. Test with a woolly letter
- In Debug & Preview at the bottom (Talk to Bot), paste the text below and press Enter.
For the parents of class 8B:
Dear parent(s)/carer(s),
By means of this letter we would like to inform you with regard to the parents' evening which, within the framework of the subject choice process, will take place on Thursday 8 October at 19.30 in the main hall. During this evening an explanation of the choice trajectory will be provided by the careers adviser. You are requested to confirm your attendance asap via the parent portal. Kind regards, the management
Note three things in the answer:
- Above the answer is Used Knowledge: the agent really read the style guide.
- "By means of this letter", "with regard to", "asap" and "within the framework of" are gone; the letter says in the first sentence what it is about.
- Where the draft says nothing (a deadline, a name to call), it says [FILL IN]. The assistant does not invent it.
Do you get an answer without Used Knowledge, or does the assistant ignore the style guide? Then check step 4: a description that only mentions school rules makes the agent skip the search for a writing question.
Step 9. Publish
An agent app is already published when it is created, but empty. Without this step the webapp does not get your instruction and knowledge base.
- Click Publish at the top right and then Publish Update.
- In the same menu click Open web app to see the link you share with the team. The app from this guide is live at https://udify.app/chat/oB2H2mLaoKR6d4IC.
Part C. School news (workflow)
One message almost never lands in one place. The website wants 200 words with a headline, the parent app 80 words on a phone screen, social media 60 words with a hashtag. Instead of writing three times, you fill in one form. The workflow writes the three versions, each according to the rules for that channel from the style guide.
This is what the whole thing will look like:
Step 10. Create the workflow
- Studio → Create → Create from Blank → the Workflow card.
| Field on screen | What you type |
|---|---|
| App Name & Icon | School news |
- Click Create. You see the canvas with only a User Input block.
Step 11. Three input fields
Click the User Input block, then on the right under INPUT FIELD click +. You create three fields. In the Add Input Field window, always choose the Field Type first and then fill in the rest.
Field 1: the core message
| Field on screen | What you type |
|---|---|
| Field Type | Paragraph |
| Variable Name | core_message |
| Label Name | What has happened or is going to happen? (who, what, where, when) |
| Required | on |
Field 2: the audience
| Field on screen | What you type |
|---|---|
| Field Type | Short Text |
| Variable Name | year_group |
| Label Name | For which class or year group? (or: whole school) |
| Required | on |
Field 3: the tone
| Field on screen | What you type |
|---|---|
| Field Type | Select |
| Variable Name | tone |
| Label Name | Which tone fits this message? |
| Options | informative, celebratory, urgent (each via + Add option) |
| Required | on |
Choose the Field Type before you start typing. If you change the type afterwards, the window sometimes closes and you lose your input.
Your choice: the fields. Which three questions does your communications officer always ask a colleague who "just wants something on the site"? Those are your fields. Other choices we see at schools: a field channel (website only, app only) so not everything is always produced; a field sender (head, form tutor, department); a field deadline that comes back literally in the message.
Step 12. Knowledge Retrieval: fetch the style guide
- Click the + to the right of User Input and choose Knowledge Retrieval.
- Under QUERY TEXT click the field and choose User Input / core_message.
- Under KNOWLEDGE click +, tick School guide Example College and click Add.
The query here is the core message, not "style guide". That works because the knowledge base is small: the style guide almost always comes along. With a large knowledge base you would rather put a fixed query in the LLM prompt, or give the style guide its own knowledge base.
Step 13. Three LLM steps: Website, Parent app, Social
You create an LLM block three times, one after another. Each block gets the same model and the same context, but its own prompt. The first line of each prompt makes the model start its answer with WEBSITE, PARENT APP or SOCIAL; that keeps the three texts apart in the output.
Block 1: Website
- Click + after Knowledge Retrieval and choose LLM.
- Set MODEL to gpt-5-mini. Ignore the message about the temperature parameter.
- Under CONTEXT click Set variable and choose Knowledge Retrieval / result.
- Click in the SYSTEM box and type the prompt below. Where it says
{...}, type a forward slash / and choose the item from the menu that appears: Context at the bottom of the menu, the three fields under User Input.
Start your answer with the line WEBSITE followed by an empty line.
You write for Example College, a secondary school. Write a news item for the website of at most 200 words. The headline is an active sentence of at most eight words, without an exclamation mark. The first paragraph answers who, what, where and when. End with a next step or a way to get in touch. Stick strictly to the style guide below: reading level B1, formal address for parents, words to avoid, names and photos of students. Adapt to the chosen tone. Invent no facts. If something is missing, write [FILL IN].
Style guide: {Context}
Year group: {year_group}
Tone: {tone}
Core message: {core_message}
- Click the name LLM at the top of the panel and rename the block to
Website.
The context (the search result) only works if you actually put it in the prompt via / → Context. Filling the CONTEXT field alone is not enough; Dify warns about that in orange.
Block 2: Parent app
- Click + after Website, choose LLM, model gpt-5-mini, context Knowledge Retrieval / result.
- Prompt:
Start your answer with the line PARENT APP followed by an empty line.
You write for Example College, a secondary school. Write a message for the parent app of at most 80 words: parents read this on their phone. One message, one date, one action; no introduction and no headline. Address parents formally. Stick strictly to the style guide below. Adapt to the chosen tone. Invent no facts. If something is missing, write [FILL IN].
Style guide: {Context}
Year group: {year_group}
Tone: {tone}
Core message: {core_message}
- Rename the block to
Parent app.
Block 3: Social
- In the Parent app panel scroll down and under NEXT STEP click Select next step → LLM. (This is the same as the + on the canvas; handy when the panel hides the plus sign.)
- Model gpt-5-mini, context Knowledge Retrieval / result, prompt:
Start your answer with the line SOCIAL followed by an empty line.
You write for Example College, a secondary school. Write a post for the school's social media (Instagram and LinkedIn) of at most 60 words. Warm and concrete, no hype. End with at most three hashtags, always including #ExampleCollege. No names of students and no reference to recognisable photos of students. Stick to the style guide below. Adapt to the chosen tone. Invent no facts. If something is missing, write [FILL IN].
Style guide: {Context}
Year group: {year_group}
Tone: {tone}
Core message: {core_message}
- Rename the block to
Social.
Your choice: the channels and their rules. The three prompts differ only in the first paragraph: that is the place for your channel rules. Does your school have a newsletter instead of Instagram? Replace block 3 with "Newsletter, at most 120 words, with a five-word headline". Want a fourth channel (for example the staff bulletin, informal address)? Add a fourth block and a fourth output variable in step 14. The word limits are also in the style guide; make prompt and style guide say the same thing, otherwise the prompt wins.
Step 14. Output: three output variables
- After Social: Select next step → Output.
- Under OUTPUT VARIABLE click + three times and fill in:
| Variable name | Set variable |
|---|---|
website |
Website / text |
parent_app |
Parent app / text |
social |
Social / text |
Step 15. Test Run
- Click Test Run at the top right and fill in the form.
| Field on screen | What you type |
|---|---|
| What has happened... | On Thursday 8 October at 19.30 there is a parents' evening for Year 8 in the main hall. Form tutors will talk about subject choices and the test week timetable. Parents can sign up until 5 October through the parent portal. Coffee and tea from 19.15. |
| For which class or year group? | Year 8 |
| Which tone fits this message? | informative |
- Click Start Run. The blocks turn green one by one; on the right the result appears under RESULT.
Check: the website item has a headline and ends with a contact, the parent app message is one paragraph without a headline, the social post ends with #ExampleCollege. The contact number comes from the school guide, not from thin air.
Step 16. Publish and share
- Click Publish → Publish.
- Click Access point in the left-hand menu. Under Webapp is the link; Open shows it the way a colleague sees it.
The app from this guide is live at https://udify.app/workflow/E2CHtVPKe3PLg7GF.
Part D. Reception mode: one app, two users
The team's third wish was a reference desk for reception: a parent emails or calls, the receptionist wants a correct reply in the house style, fast. You could copy the School guide assistant for that (Studio, ... menu on the card, Duplicate) and give the copy a different instruction.
But a sandbox account holds five apps at most, and with the apps from guides 1 to 3 you are close to that:
So we do it differently, and actually better: the School guide assistant already has the style guide in its knowledge base (that happened in part A, without touching the app). You only have to tell it when to act as reception.
Step 17. Extend the instruction
- In Studio open the app School guide assistant.
- Click at the end of the instruction and paste this paragraph below it:
Reception mode: if a staff member starts with "Reception:" and then pastes a question from a parent, you write the reply that the staff member can send to that parent. Then follow the style guide in your knowledge base: address the parent formally, reading level B1, no abbreviations, no words from the list of words to avoid, at most six sentences, and end with a way to get in touch. If you do not know the answer from the school guide, write a short message saying you will check and put [FILL IN] where the staff member must add the real answer.
Step 18. Test as reception
- Paste into Debug & Preview:
Reception: Hello, my daughter is in 7C and will be ill tomorrow. Do I have to report her absent and how do I do that? Will she get tomorrow's test at another time? Regards, Sanne's mother
The reply takes the sick report and the catch-up slot from two chapters of the school guide, addresses the parent formally, and ends with reception. Ask the same question again without "Reception:" in front: then you get the shorter answer for student or parent from guide 2. One app, two users.
Step 19. Publish Update
- Publish → Publish Update. Without this step the webapp does not know the Reception mode.
Your choice: the switch word. "Reception:" is an agreement, not a technique. Choose a word your team finds logical ("Front desk:", "Reply for parent:") and agree that everyone uses it that way. Would you rather not have a switch word? Then make a separate app via Duplicate after all, once there is room, and give it only the reception instruction.
Checking that it worked
- In Knowledge, School guide Example College has two documents, both Available
- The Parent letter assistant shows Used Knowledge above its answer and puts [FILL IN] where information is missing
- School news delivers three texts with the labels WEBSITE, PARENT APP and SOCIAL, each within the word limit
- The School guide assistant answers differently with and without "Reception:" in front
- All three webapp links work in a private window (so without being logged in to Dify)
When things go wrong
| What you see | What is going on |
|---|---|
| "Maximum 1 files" when uploading | Sandbox limit. One file at a time, then Add file again |
| Preview Chunk shows dozens of one-line pieces | Delimiter is \n. Set it to \n\n (step 2) |
| The Parent letter assistant ignores the style guide | The description of the knowledge base does not mention writing rules (step 4), or the knowledge base is not attached (step 7) |
| The three texts in School news run into each other | The first line of a prompt ("Start your answer with the line ...") is missing |
| Orange message "To enable the context feature, please fill in the context variable in PROMPT" | You set CONTEXT but did not put / → Context in the prompt |
| A text uses informal address, or is too long | Prompt and style guide contradict each other. Align them; the prompt wins |
| "Upgrade to create more apps" | Five apps is the maximum. Delete an old app or extend an existing one (part D) |
| The webapp does something different from Debug & Preview | Publish Update forgotten (agent) or Publish forgotten (workflow) |
| A block disappears after a keystroke on the canvas | Delete or Backspace removes the selected block. Click the Undo arrow at the bottom left |
| Credits drop fast | An LLM block is still on gpt-5. Set each block to gpt-5-mini separately |
Housekeeping and costs
- Owner. Agree who maintains the style guide in the knowledge base. Uploading a new version is steps 1 to 3 again; you delete the old document under Documents.
- Logs. Every app has Logs in the left-hand menu: there you see what colleagues entered and what came out. Use it to tune the prompts, not to check up on colleagues, and say so.
- Personal data. A parent letter easily contains a name or a situation. Agree that colleagues remove those before pasting, or use placeholders such as [NAME]. Dify processes in the cloud, outside the school.
- Costs. With your own OpenAI key (Integrations → Model Provider) a parent letter costs about half a cent and a School news run about a cent. On Dify credits an agent answer costs 6 to 7 credits and a workflow run with three LLM blocks about 10.
Make it yours
Everything above is an example. The school is invented, the style guide is invented, the prompts are our choices. This chapter helps you rebuild the apps for your school, your team and your style. Work from top to bottom: the first changes take five minutes, the last ones half a day.
| Change | Where | Difficulty | What you get for it |
|---|---|---|---|
| School name, contact details, form of address | Style guide (document) and the first line of each prompt | easy | The texts are right for your school straight away |
| Words to avoid and standard phrases | Style guide | easy | Your house style instead of ours |
| Tone options (informative, celebratory, urgent) | School news, field tone | easy | Options your team recognises, for example "businesslike" or "personal" |
| Shape of the answer (explanation or not, two variants, another language) | Parent letter assistant, point 3 of the instruction | medium | An assistant that fits how you correct |
| Channels (newsletter, staff bulletin, second-language site) | School news, LLM blocks and Output | medium | Exactly the channels you use |
| A second document (for example the year planner or the attendance protocol) | Knowledge base, part A again | medium | Reception mode answers more questions well |
| Your own switch word or a separate reception app | School guide assistant or Duplicate | medium | A way of working your reception finds logical |
| Sending automatically (email, parent app) | Tools or HTTP Request in the workflow | hard | A message that is not only written but also posted; only after agreements about checking |
Three assignments
- Replace the style guide. Make a document of at most two pages with your school's writing rules (or ten rules you find important). Upload it next to or instead of ours (part A). Have the Parent letter assistant rewrite the same woolly letter and compare: which rule from your document do you see back, which not? Adjust the description of the knowledge base until it is right.
- Add a channel. Choose a channel you really use and we do not have. Write the channel rule in three sentences (length, form of address, what must always be in it), make a fourth LLM block and a fourth output variable. Test with a message from last week.
- Let a colleague break it. Give the webapp link to someone who was not in the workshop and ask for three real messages. Read the Logs: where did it go wrong? The answer is usually one extra sentence in a prompt, or one extra rule in the style guide. Change it, publish again, and let them try once more.
Checklist before you use your own material
- The document you upload contains no names of students, parents or staff, and no personal email addresses (a general address such as info@ is fine)
- The document belongs to the school and may be shared with an external processor (Dify runs in the cloud)
- There is one owner who maintains the document and republishes the app
- You have decided whether the webapp link stays internal or also goes to parents; in the second case, involve the data protection officer first
- The model is set to gpt-5-mini and you know what a run costs
- Someone reads the output before it goes out; the app writes a draft, not a decision
What next
You now have a team toolkit that moves with one document. Guide 7 builds on School news with a checker and a gatekeeper, so that a message with gaps never goes out unseen. After that the next step is an agent that goes looking by itself: reading files, searching the web and delivering several products. That is the Agent Console, guide 4 (the Test week planner) and guide 6 (assessing and adapting learning material for students who need support).











































