This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
MemoryKeeper is a local-first AI memory archive built around a simple idea:
What if AI could help us preserve the things we don't want to disappear, without asking us to hand those memories over to a cloud service?
You write down a memory — a childhood moment, a person you remember, a place you visited, or a story that means something to you.
MemoryKeeper can then ask a local Gemma 3 4B model to read the memory and suggest useful metadata such as:
- People
- Places
- Dates
- Topics
- Themes
- A title
But the AI never gets the final say.
Every suggestion is presented for review. I decide what to keep, edit, or ignore. The original story is never rewritten by the AI.
That's the part of the "Ghost in the Machine" theme that inspired me.
There is something slightly ghostly about a machine reading the memories of people who came before us — quietly recognizing names, places, moments, and themes — while helping us keep those memories alive.
The project also draws inspiration from the spirit of Día de los Muertos: remembering the people and stories that remain part of us even after time has passed.
MemoryKeeper is my attempt to build a small digital place for those memories.
Demo
Code
https://github.com/bdhamithkumara/memorykeeper
The application runs with Next.js and uses Ollama locally with Gemma 3 4B.
To experience the AI functionality, Ollama and the gemma3:4b model are required.
How I Built It
MemoryKeeper is built with:
- Next.js
- TypeScript
- Tailwind CSS
- shadcn/ui
- Zod
- Vitest
- Ollama
- Gemma 3 4B
- Local JSON storage
The important architectural decision was to keep the AI completely local.
The flow looks like this:
MemoryKeeper
│
▼
User writes memory
│
▼
Next.js Server Action
│
▼
Local Ollama
│
▼
Gemma 3 4B
│
▼
Structured suggestions
│
▼
Human review
/ \
Keep Ignore
│
▼
Local archive
The browser does not communicate directly with Ollama.
The server sends the memory to the locally running Ollama instance, which runs Gemma 3 4B on the same machine.
Gemma's response is constrained by a Zod schema and validated before it can become a suggestion.
There are also grounding checks to prevent the model from inventing people, places, or dates that aren't supported by the memory.
The original story remains untouched.
One of the things I particularly wanted to explore was trust.
AI shouldn't automatically become the author of someone's memories.
So MemoryKeeper follows a simple rule:
AI suggests. The human decides.
The project currently has 141 automated tests, covering validation, storage, AI responses, failure handling, prompt-injection scenarios, suggestion merging, and archive behavior.
I also tested the application against the real local gemma3:4b model through Ollama.
Why Does Open Innovation Matter?
This project would be fundamentally different if I had built it around a hosted AI API.
The most important part of MemoryKeeper is not simply that an AI understands a memory.
It's that the memory can stay private while the AI understands it.
Personal memories can contain names, relationships, locations, childhood experiences, and deeply personal stories. Sending all of that to a third-party AI service isn't something everyone will be comfortable with.
Open-weight models and local inference make another approach possible.
With Gemma 3 4B and Ollama, the model can run on the user's own machine.
There is no OpenAI API key.
There is no Anthropic API.
There is no hosted Gemini endpoint.
There is no requirement to upload the memory to a cloud AI service.
The model is running locally.
That changes the relationship between the user and the AI.
Instead of:
Your memory → someone else's server → AI → response
MemoryKeeper can work like:
Your memory → your machine → your model → your archive
Open innovation matters here because it makes privacy-preserving AI experiences accessible to ordinary developers.
I didn't need to build or train a foundation model myself.
I could take an open-weight model, run it locally, put it behind an application, validate its output, and design a human-controlled experience around it.
That's the part of open AI that I wanted to explore with this project.
The Spirit of It
The older I get, the more interesting memories become.
A photograph can disappear.
A message can be lost.
A story that someone tells you can eventually be forgotten.
But sometimes a small detail survives — a person's name, a place, a smell, a particular afternoon — and suddenly an entire memory comes back.
That's what I wanted MemoryKeeper to feel like.
Not a chatbot.
Not another AI assistant.
A quiet archive.
Something that sits there until you need it.
And when you return, it helps you find the memory you thought you had almost forgotten.
Some stories deserve to stay.
Prize Categories
Gemma
MemoryKeeper uses Gemma 3 4B as its local AI model through Ollama.
The model is central to the application: it reads memories locally and produces structured metadata suggestions that the user can review before accepting.
Open-Source AI Challenge — Ghost in the Machine
The project directly explores the theme through a local AI system that interacts with human memories while remaining deliberately quiet and unobtrusive.
The "ghost" isn't a horror character.
It's the small presence inside the machine that helps recognize and preserve the traces of the past.


Top comments (0)