File size: 3,834 Bytes
4aca747 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | ---
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
|