πŸ‘» Ghost AI β€” Your Personal Haunted AI Assistant

πŸ‘» Ghost AI β€” Your Personal Haunted AI Assistant

What if an AI assistant lived inside your computer like a ghost, ready to help whenever you needed it? That's the idea behind Ghost AI, a spooky personal AI assistant built using Gemma 4, Ollama, Python, and Flask. I created this project for Hacktoberfest 2026 Week 4, whose theme is "Ghost in the Machine." My goal was to combine the Halloween atmosphere with practical AI features while exploring how locally running AI models can give developers greater control over their applications and data. Instead of relying on a paid cloud AI API, Ghost AI uses a model running locally through Ollama. πŸ‘» What I Built Ghost AI is a local AI web application designed to be both useful and entertaining. Its features include: πŸ’¬ Ghost Chat: Chat with an AI assistant with a spooky personality. 🎭 Multiple Personalities: Switch between Friendly Ghost, Mysterious Ghost, and Nightmare Mode. πŸ’» Coding Assistant: Ask programming questions, understand errors, explain code, and explore debugging approaches. 🩸 Horror Story Generator: Generate horror stories with different settings and styles. 🧠 Persistent Memory: Save selected preferences and information for future conversations. πŸ“œ Conversation History: Save and revisit previous conversations. πŸ“ Text Summarizer: Ask the local AI model to summarize text. βš™οΈ Model Status: Check whether the local Ollama service is available. The application combines a spooky interface with useful AI functionality, making it more than just a Halloween-themed chatbot. 🎬 Demo Watch Ghost AI in action! πŸŽ₯ Demo Video: https://youtu.be/2gCFJ_GRcxQ The video demonstrates my Ghost AI project and its approach to building a personal AI assistant using a locally running Gemma model. To explore the source code and setup instructions, visit the GitHub repository below. πŸ’» Source Code GitHub Repository: https://github.com/Shantanuu1/ghost-ai The repository contains the application source code, backend modules, frontend assets, database implementation, tests, and setup instructions. Feel free to explore the code and share feedback! πŸ› οΈ How I Built It I built Ghost AI using a lightweight web development stack and a locally running language model. Technology Stack Python 3.10.11: Backend programming. Flask: Web application and API routes. Gemma 4 E2B: Language model generating AI responses. Ollama: Local runtime for running Gemma. HTML, CSS, and JavaScript: Frontend interface and interactions. SQLite: Persistent storage for conversations and saved memories. Git and GitHub: Version control and source code hosting. How It Works The application follows a simple architecture: The user enters a message in the Ghost AI interface. The Flask backend receives and validates the request. The backend sends the prompt to Gemma through the local Ollama API. Gemma generates a response using the selected personality instructions. Flask returns the response to the frontend. JavaScript displays the answer in the chat interface. SQLite stores conversations and explicitly saved memories so they can persist between application sessions. The application separates its responsibilities into different modules, including app.py, ai_service.py, database.py, and config.py. This structure makes the code easier to understand and maintain. πŸ”“ Why Does Open Innovation Matter? One of the main reasons I chose Gemma through Ollama was to explore the advantages of running AI locally. More Control Over AI Using a locally running model gives me control over the model runtime and allows me to experiment with prompts and assistant personalities without depending on a paid inference API. Privacy Through Local Processing In the local configuration, prompts are sent to Ollama running on my own computer rather than to a third-party AI provider. This helps keep conversations on the local machine during normal use of the application. However, privacy also depends on how the application is configured and deployed. Lower Dependence on Paid APIs Once the model is downloaded, local inference does not require paying a third-party AI provider for each request. The computer still uses its own memory, processor, electricity, and other resources, so local inference is not completely cost-free. Learning Through Experimentation Working with an open-weight model allowed me to explore how AI applications communicate with language models, how system prompts influence responses, and how a local model can be integrated into a web application. It also made it easier to experiment with different personalities and features. For me, open innovation means having the freedom to learn, experiment, and build applications without being entirely dependent on a closed AI service. Note: Open weights do not automatically mean that every part of a model is open source. Model licensing and usage conditions still matter. πŸ‘» The Spirit of It The idea behind Ghost AI is simple: an intelligent presence living inside your machine. It can help you understand code, answer questions, summarize text, or generate a horror story when you want something a little more mysterious. The ghost is fictional, of course. The AI behind it is a language model running on my own computer. I wanted to interpret "Ghost in the Machine" in a playful but practical way: combine a spooky digital personality with an application that demonstrates the possibilities of local AI. Beyond the Halloween theme, this project has helped me explore local inference, backend development, persistent storage, and the integration of AI into a web application. πŸ† Prize Category Best Use of Gemma Ghost AI uses Google's Gemma 4 E2B model through Ollama as its core language model. The application demonstrates how an open-weight model can power a locally running AI assistant with multiple personalities and practical features. πŸš€ What's Next? There is still room to improve Ghost AI. Some possible future improvements include: Streaming responses as the model generates them. More advanced memory retrieval. Additional assistant personalities. Better conversation export and import. More interface customization. Further testing and performance improvements. I would love to hear suggestions from the community about how to make local AI assistants more useful, private, and accessible. If you explore the project, feel free to share your feedback! GitHub: https://github.com/Shantanuu1/ghost-ai Thanks for checking out Ghost AI! πŸ‘» devchallenge #hf26challenge

Original Source

Read the full article at Dev →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.