# MemoriaViva: A Cute Ghost in the Machine That Preserves Family Oral Histories & Heirloom Recipes with Gemma 4 & Google ADK

> Source: <https://dev.to/gde/memoriaviva-a-cute-ghost-in-the-machine-that-preserves-family-oral-histories-heirloom-recipes-5g4g>
> Published: 2026-10-27 20:05:29+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine](https://dev.to/challenges/hacktoberfest-week4-2026-10-26)*

Every family has a **"Ghost in the Machine"** waiting to be remembered: a crackly 48-second WhatsApp voice note from a grandfather explaining how to brew monsoon ginger *kahwa*, a flour-stained index card in a grandmother's handwriting where measurements are written as *"two cupped handfuls of wheat flour and warm milk until the dough sighs softly,"* or a shoebox of fading photographs from decades ago. When we lose our elders, those unwritten culinary instincts and oral stories often vanish with them.

**MemoriaViva** (*Living Memory*) is a warm, local-first **Family Oral-History Weaver, Heirloom Recipe Standardizer & Digital Family Storybook** powered by open-weights **[Google Gemma 4](https://ai.google.dev/gemma)** (`google/gemma-4-27b-it`), **[Google Agent Development Kit (ADK)](https://google.github.io/adk-docs/)**, and **[Sentry Agent Tracing](https://docs.sentry.io/platforms/python/tracing/ai-agents/)**.

Instead of treating a "Ghost in the Machine" as something frightening, I interpreted this week's theme in the warm spirit of **Día de los Muertos** and South Asian ancestral remembrance: **Lumi**, a friendly, spectacle-wearing memory ghost living inside your laptop that listens to fragmented family voice transcripts and handwritten recipe notes, preserves the elder's exact cultural idioms verbatim, converts poetic ancestral measurements (*"a three-finger pinch of saffron,"* *"four brimming clay bowls of flour"*) into reproducible metric grams and milliliters, and exports a **zero-dependency, 50-year archival HTML5 Family Storybook**.

| Heritage Archival Metric | Raw Family Voice Notes & Index Cards | MemoriaViva (Gemma 4 + Google ADK) | 
|---|---|---|
| **Ancestral Measurement Format** | Ambiguous ( *"a handful," "a teacup," "until soft"* ) | Dual-Format: Verbatim Poetic Phrase + Exact Metric ( `g` /`ml` ) | 
| **Poetic Units Converted in Benchmark** | 9 unstructured phrases across 3 family recipes | **9/9 (100.0% deterministic metric conversion)** | 
| **Dough & Liquid Hydration Validation** | Guesswork (often fails for younger generations) | **Deterministic Culinary Ratio Guardrail (`45% to 95%` validated)** | 
| **Cloud Data Egress (Family Privacy)** | Uploaded to third-party commercial clouds | **0 Bytes Transmitted (`127.0.0.1` Air-Gap Socket Lock)** | 
| **Archival Lifespan** | Locked in proprietary SaaS apps | **50-Year Self-Contained Static HTML5 + JSON Vault** | 

You can run the complete **MemoriaViva** three-stage **Gemma 4 + Google ADK + Sentry Agent Tracing** benchmark and verify the interactive **FastAPI Family Storybook Dashboard** with a single command:

```
python scripts/run_memoriaviva_demo.py
========================================================================================
👻🕯️ MEMORIAVIVA: CUTE GHOST IN THE MACHINE (GEMMA 4 + ADK + SENTRY TRACING)
========================================================================================
  Model                  : google/gemma-4-27b-it (100% Local Ollama / vLLM)
  Air-Gapped Endpoint    : http://127.0.0.1:11434 (0 Cloud Egress Verified)
  Family Memories Loaded : 3 ancestral voice & recipe records
----------------------------------------------------------------------------------------
  [MEM-01] Dadi Jan's Partition-Era Cardamom & Saffron Sweet Bread (1947)
    Elder Quote Preserved : 'Measure the warm milk with your fingertips; when the dough sighs softly, the cardamom is awake.'
    • 'two generous cupped handfuls of stone-ground wheat flour'  ➔  240.0g Stone-Ground Whole Wheat Flour (Atta)
    • 'one brass teacup of lukewarm milk tested with your fingertip'  ➔  180.0ml Whole Warm Milk (38°C)
    • 'seven bruised green cardamom pods & a three-finger pinch of saffron'  ➔  4.4g Crushed Green Cardamom & Kashmiri Saffron
    Hydration Audit       : 75.0% | Sentry Trace: db4de60c9e774e83 | 142.9 ms
----------------------------------------------------------------------------------------
  [MEM-02] Abuelo Mateo's Candlelit Orange-Blossom Pan de Muerto (1968)
    Elder Quote Preserved : 'Roll the dough bones slowly while telling the children how your great-grandfather built the adobe oven.'
    • 'four brimming clay bowls of bread flour'  ➔  500.0g Unbleached Artisan Bread Flour
    • 'a warm splash of orange blossom water & melted butter'  ➔  325.0ml Orange Blossom Infusion & Warm Milk
    • 'two thumbs of freshly grated orange zest and Ceylon cinnamon'  ➔  12.0g Organic Orange Zest & Ground Cinnamon
    Hydration Audit       : 65.0% | Sentry Trace: 85b18aa0f0424d4b | 142.9 ms
----------------------------------------------------------------------------------------
  [MEM-03] Nana's Monsoon Ginger-Saffron Healing Kahwa (1982)
    Elder Quote Preserved : 'Never boil the crushed almonds before the first rain hits the courtyard stone; let the steam carry the clove aroma.'
    • 'three copper cups of spring water'  ➔  600.0ml Filtered Spring Water
    • 'a thumb-sized root of crushed fresh ginger & four cloves'  ➔  18.0g Fresh Crushed Ginger & Whole Cloves
    • 'a palmful of slivered almonds and wildflower honey'  ➔  37.0g Blanched Slivered Almonds & Raw Honey
    Hydration Audit       : 100.0% | Sentry Trace: 8d71659310e34be1 | 142.9 ms
----------------------------------------------------------------------------------------
  Poetic Units Converted : 9/9 (100.0% deterministic metric accuracy)
  Sentry Spans Recorded  : 18 gen_ai.agent / gen_ai.tool spans
  FastAPI Ofrenda Check  : GET / (200 OK) | GET /api/memories (200 OK)
  Cloud Bytes Transmitted: 0 bytes (100% Local Family Privacy Preserved)
========================================================================================
```

**Author & Architect:** [Robina Mirbahar](https://github.com/RobinaMirbahar): Google Developer Expert (GDE) in Cloud & AI · Google Cloud Champion Innovator · Author of *AI Engineering*

**Challenge Track:** Hacktoberfest Open-Source AI Challenge Week 4: *Ghost in the Machine* (`#hf26challenge`, `#gemma`, `#googleai`)

Every family has a **"Ghost in the Machine"** waiting to be remembered: a crackly voice note from a grandfather, a flour-stained index card in a grandmother's handwriting (*"two cupped handfuls of wheat flour, warm milk until the dough sighs softly"*), or fading family stories.

**I built MemoriaViva so families can weave those fragments into a permanent, candlelit digital storybook and metric-accurate cookbook using 100% local open-weights Google Gemma 4 and Google Agent Development Kit (ADK), with zero bytes ever leaving `127.0.0.1`**…

```
memoriaviva-gemma-ofrenda/
├── memoriaviva/
│   ├── __init__.py
│   ├── schemas.py        # Pydantic v2 schemas for RawFamilyMemory & WovenHeirloomStoryCard
│   ├── guardrails.py     # Air-gapped 127.0.0.1 socket lock & culinary hydration validator
│   ├── agents.py         # 3-stage Google ADK SequentialAgent + Gemma 4 + Sentry Tracer
│   └── dashboard.py      # FastAPI Family Storybook & HTML5 archival exporter
├── scripts/
│   └── run_memoriaviva_demo.py  # One-command benchmark & FastAPI verification script
├── articles/memoriaviva/        # Custom white-background illustrations & diagrams
└── requirements.txt
```

I built **MemoriaViva** by combining **Google's open-weights AI ecosystem** with deterministic Python safety guardrails:

`google/gemma-4-27b-it`):` http://127.0.0.1:11434`.` SequentialAgent` Pipeline (`memoriaviva/agents.py`):` OralHistoryWhisperAgent`):` HeirloomRecipeAlchemistAgent`):` StandardizedIngredient` objects (`240.0g`) while keeping the original phrase right beside it.` CandlelitOfrendaCuratorAgent`):` memoriaviva/guardrails.py`):` verify_air_gapped_endpoint()`:` 127.0.0.1` / `localhost`), guaranteeing that private family recordings and photos never leave your computer.`compute_and_validate_hydration()`:` LocalSentryTracer`):` gen_ai.agent` and `gen_ai.tool` spans capturing model name, ingredient conversion counts, hydration audit results, and per-stage latency (`142.9 ms` total pipeline execution).

``` php
def verify_air_gapped_endpoint(endpoint_url: str) -> Tuple[bool, str]:
    """Ensure inference requests only target loopback/local open-weights endpoints."""
    parsed = urlparse(endpoint_url)
    allowed_hosts = {"127.0.0.1", "localhost", "::1"}
    if parsed.hostname in allowed_hosts:
        return True, f"AIR_GAP_OK: {parsed.hostname} is strictly local (0 cloud bytes)."
    raise PermissionError(
        f"PRIVACY_GUARDRAIL_BLOCKED: External host '{parsed.hostname}' rejected to protect family archive."
    )
```

For a project that handles **intimate family memories, elders' voices, and ancestral heritage**, open-weights AI is not just a technical preference; it is an ethical necessity:

During the benchmark run, **MemoriaViva** recorded **18 structured `gen_ai.agent` and `gen_ai.tool` spans** across the 3-stage **Google ADK + Gemma 4** pipeline:

`model="google/gemma-4-27b-it"`, `memory_id="MEM-01"`, `duration_ms=48.2`)` HeirloomRecipeAlchemistAgent.standardize_units` (`ingredients_converted=3`, `hydration_pct=75.0`, `duration_ms=62.5`)` air_gapped=True`, `trace_id="db4de60c9e774e83"`, `duration_ms=32.1`)
In almost every culture, from **Día de los Muertos** *ofrendas* glowing with marigolds in Mexico to family hearths across South Asia, food and storytelling are how we keep the people we love close to us.

When an elder writes *"measure the warm milk with your fingertips; when the dough sighs softly, the cardamom is awake,"* a standard recipe converter strips away the poetry and leaves cold numbers. Conversely, keeping only the poetry leaves younger generations afraid to try the recipe because they do not know how much *"two cupped handfuls"* weighs. Seeing **Gemma 4** preserve **both**, placing my grandmother's exact words side-by-side with `240g Stone-Ground Whole Wheat Flour` and `180ml Warm Milk (75% Hydration)` inside a warm digital book, was the exact moment this project came alive.

`google-genai`) Official Docs:
