cd /news/artificial-intelligence/storyai-on-demand-multilingual-kids-… · home › topics › artificial-intelligence › article
[ARTICLE · art-173569] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

StoryAI: On‑Demand Multilingual Kids' Tales for Refugee Camps

A developer built StoryAI, an open-source pipeline that generates age-appropriate, culturally tailored children's stories for displaced kids and delivers them over low-bandwidth channels like SMS, WhatsApp, and offline Raspberry Pi edge nodes. The system chains a prompt builder, LLM backends (GPT-4, Claude, LLaMA), a child-safety content filter with an optional human review queue, and a delivery engine, with tokenized analytics that avoid storing raw phone numbers.

recommendation

Run every generated story through a child-safety policy filter and route failures to a human review queue before delivery; tokenize phone numbers with UUIDs so analytics never store raw identifiers.

more in playbook: Verifying model output
by read4 min views4 publishedNov 21, 2026

Millions of displaced children grow up without a single storybook. StoryAI changes that by generating age‑appropriate, culturally‑sensitive tales on‑demand and delivering them over the low‑bandwidth channels that dominate refugee camps—WhatsApp, SMS, or even offline‑first devices.

Since the product’s debut on Product Hunt and the sharp rise in Google Trends for “children’s stories + refugees,” NGOs are asking: How do we turn a prototype into a privacy‑first, sustainable service? This guide gives you the practical steps, code snippets, and deployment tips you need to start today.

Component What It Does Quick‑Start Command
Prompt Builder Adds age, language, and cultural tags to steer the LLM. python build_prompt.py --age 5-7 --culture Ukrainian --lang es
LLM Backend Calls GPT‑4, Claude, or LLaMA via OpenAI/Anthropic/Meta APIs. curl -X POST https://api.openai.com/v1/chat/completions \ <br> -H "Authorization: Bearer $OPENAI_KEY" \ <br> -H "Content-Type: application/json" \ <br> -d '{"model":"gpt-4","messages":[{"role":"system","content":"You are a children’s author..."}]}'
Safety Filter Rejects any output containing violence, hate, or adult content. python filter.py --input story.txt --policy ./policies/child_safe.yaml
Human Review Queue (optional) Sends flagged stories to a reviewer Slack channel. slack webhook https://hooks.slack.com/services/... --payload @story.txt
Delivery Engine Sends text via Twilio SMS, WhatsApp Business API, or serves locally from an edge node. twilio sms:create --to +1234567890 --from +1987654321 --body "$(cat story.txt)"
Edge Cache Raspberry Pi Docker container that pre‑downloads a daily batch for offline use. docker run -d --restart unless‑stopped \ <br> -v $(pwd)/cache:/app/cache \ <br> storyai/edge:latest sync
git clone https://github.com/storyai/core.git
cd storyai
pip install -r requirements.txt

python build_prompt.py --age 5-7 --culture Ukrainian --lang es > prompt.txt

The resulting prompt.txt looks like:

You are a children’s author. Write a short story for a 6‑year‑old (age:5-7) in Spanish. The story must reflect Ukrainian cultural elements (e.g., sunflower fields, traditional lullabies) and contain no violence or adult themes.
curl -s -X POST https://api.anthropic.com/v1/complete \
  -H "x-api-key: $ANTHROPIC_KEY" \
  -H "Content-Type: application/json" \
  -d @- <<EOF
{
  "model": "claude-2.1",
  "prompt": "$(cat prompt.txt)",
  "max_tokens_to_sample": 500,
  "temperature": 0.7
}
EOF > story_raw.txt
python filter.py --input story_raw.txt --policy policies/child_safe.yaml --output story.txt
if [ $? -ne 0 ]; then
  echo "Content rejected – send to human reviewer"
  slack webhook https://hooks.slack.com/services/... --payload @story_raw.txt
  exit 1
fi

SMS (Twilio)

twilio sms:create \
  --to +1234567890 \
  --from +1987654321 \
  --body "$(cat story.txt)"

WhatsApp (Business API)

curl -X POST https://graph.facebook.com/v17.0/<PHONE_NUMBER_ID>/messages \
  -H "Authorization: Bearer $WHATSAPP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "messaging_product":"whatsapp",
        "to":"1234567890",
        "type":"text",
        "text":{"body":"'"$(cat story.txt)"'"}
      }'

Offline Edge Node

docker exec -it storyai_edge sync   # pulls the daily batch
docker exec -it storyai_edge serve  # opens a local Wi‑Fi hotspot at http://10.0.0.1

Camp volunteers can now hand out a simple QR code that points to the hotspot; families download stories directly to a cheap Android tablet.

from uuid import uuid5, NAMESPACE_DNS
def tokenise(phone):
    return uuid5(NAMESPACE_DNS, phone)

log = {
    "user_id": tokenise("+1234567890"),
    "story_id": "ukr_es_2024_04_12",
    "timestamp": datetime.utcnow().isoformat()
}
requests.post("https://analytics.storyai.org/collect", json=log, verify=True)

All data is encrypted at rest (AES‑256) and complies with GDPR and the UN Convention on the Rights of the Child.

Question Practical Answer
How do I guarantee age‑appropriate content across cultures? Use the prompt tags ( age ,culture ,language )and the built‑in safety filter. Fine‑tune the model on a curated UNESCO‑approved corpus; the filter will automatically reject any story that contains disallowed tokens.
What are the privacy requirements for phone numbers? Store only a deterministic hash (as shown above) for analytics. Keep raw numbers in a separate, encrypted table that is never queried for reporting. Record consent with a timestamped “YES” SMS reply; this single line satisfies GDPR’s consent‑record requirement.
Can the system run without internet? Yes. Deploy the Dockerized edge container on a Raspberry Pi or similar SBC. It syncs once per day when a mobile hotspot is available, then serves stories locally via Wi‑Fi or Bluetooth.
Which LLM should I start with? GPT‑4 offers the most robust safety controls out of the box, but Claude‑2.1 and LLaMA‑2‑13B are cheaper for high‑volume deployments. Test all three on a small batch and compare cost per 1 000 characters.
How do I handle audio versions for low‑literacy users? After the text is approved, pipe it through a TTS engine (e.g., Google Cloud Text‑to‑Speech) and store the MP3 alongside the text. The edge node can serve both files; the client app plays the audio automatically when the story is opened.

0 2 * * * docker exec storyai_edge sync). With these concrete steps, you can move from a proof‑of‑concept to a reliable, privacy‑first storytelling service that reaches the children who need it most—today.

Herramienta mencionada: Groq Cloud

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @storyai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/storyai-on-demand-mu…] indexed:0 read:4min 2026-11-21 · —