| --- |
| language: |
| - en |
| license: apache-2.0 |
| tags: |
| - singapore |
| - sovereign-ai |
| - edge-ai |
| - meralion |
| - singlish |
| - knowledge-base |
| - agentic-innovation |
| pretty_name: MINA Knowledge Base |
| size_categories: |
| - n<1K |
| task_categories: |
| - conversational |
| --- |
| |
| # MINA Knowledge Base — mina_knowledge.json |
| |
| Runtime knowledge file for the [MINA Bridge](https://huggingface.co/munyew/mina-bridge). Defines crisis hotline resources and MINA's current capability flags. Read at runtime by `append_resources()` and the unknown-capability detector — update this file to change MINA's behaviour without touching bridge code. |
|
|
| --- |
|
|
| ## Schema |
|
|
| ```json |
| { |
| "crisis_resources": { ... }, |
| "capabilities": { ... } |
| } |
| ``` |
|
|
| ### `crisis_resources` |
| |
| Hotline entries appended to VITA (crisis) agent replies. Each entry supports `phone`, `whatsapp`, `hours`, and `description` fields. |
| |
| ```json |
| "crisis_resources": { |
| "SOS_Lifeline": { |
| "phone": "1767", |
| "whatsapp": "https://wa.me/6591511767", |
| "hours": "24/7", |
| "description": "Singapore suicide prevention helpline" |
| }, |
| "IMH_Crisis": { |
| "phone": "6389 2222", |
| "hours": "24/7", |
| "description": "Institute of Mental Health crisis line" |
| } |
| } |
| ``` |
| |
| The bridge reads these values at request time (`load_knowledge()`), so updating phone numbers or adding new services takes effect immediately on the next request — no bridge restart required. |
|
|
| ### `capabilities` |
|
|
| Boolean flags representing what MINA can currently do. The unknown-capability detector in `completion()` checks these flags; any `false` entry for a keyword the user mentions triggers a `log_gap()` call. |
|
|
| ```json |
| "capabilities": { |
| "make_phone_call": false, |
| "send_whatsapp": false, |
| "check_calendar": true, |
| "detect_scam": true, |
| "emotional_support": true, |
| "detect_crisis": true |
| } |
| ``` |
|
|
| When a capability is implemented, flip the flag to `true`. The gap detector will stop logging it and `append_resources()` will stop showing the "I can't do this yet" message. |
|
|
| --- |
|
|
| ## Gap Logging Integration |
|
|
| The capability flags drive MINA's autonomous gap detection loop: |
|
|
| ``` |
| User says "can you call SOS for me" |
| ↓ |
| unknown-capability detector finds "call" in transcript |
| ↓ |
| caps.get("make_phone_call") == false |
| ↓ |
| log_gap("make_phone_call", transcript, context) |
| ├── written to ~/meralion/gaps/gap_log.jsonl |
| └── POSTed to ntfy.sh/roar-imda-demo |
| ``` |
|
|
| Each gap entry in `gap_log.jsonl`: |
| ```json |
| { |
| "timestamp": "2026-05-02T14:23:01", |
| "gap_type": "make_phone_call", |
| "user_request": "can you call SOS for me", |
| "context": "User requested phone call to SOS", |
| "status": "pending" |
| } |
| ``` |
|
|
| --- |
|
|
| ## Adding New Resources |
|
|
| To add a new crisis line, append to `crisis_resources`: |
| ```json |
| "SilverRibbon": { |
| "phone": "1800 774 5433", |
| "hours": "Mon–Fri 9am–6pm", |
| "description": "Singapore mental health awareness" |
| } |
| ``` |
|
|
| To register a new capability: |
| ```json |
| "make_phone_call": true |
| ``` |
|
|
| To track a new capability gap before it is built: |
| ```json |
| "play_music": false, |
| "set_reminder": false, |
| "read_news": false |
| ``` |
|
|
| --- |
|
|
| ## File Location on Device |
|
|
| ``` |
| /data/data/com.termux/files/home/meralion/mina_knowledge.json |
| ``` |
|
|
| The bridge resolves this via `KNOWLEDGE_FILE = Path("~/meralion/mina_knowledge.json")` expanded at startup. To use a different path, update the `KNOWLEDGE_FILE` constant in `bridge.py` or symlink the file. |
|
|
| --- |
|
|
| ## Versioning |
|
|
| | Version | Date | Changes | |
| |---|---|---| |
| | 1.0 | 2026-05-02 | Initial — SOS Lifeline, IMH Crisis, 6 capability flags | |
|
|
| --- |
|
|
| ## Acknowledgements |
|
|
| Crisis resources sourced from: |
| - [Samaritans of Singapore (SOS)](https://www.sos.org.sg) — 1767 |
| - [Institute of Mental Health (IMH)](https://www.imh.com.sg) — 6389 2222 |
| - [ScamShield](https://www.scamshield.org.sg) — 1799 |
|
|