DEV Community

Dendi Prayogo Hidayat
Dendi Prayogo Hidayat

Posted on

OpsBuddy: A Privacy-First Local AI SysAdmin Mentor (Built with Gemma, Ollama & Sentry)

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built OpsBuddy, a local, privacy-first AI mentor designed specifically for SysAdmin and Linux training in a CLI environment.

I built this for my friend and trainee, Andre, who is currently learning the ropes of server administration. The biggest hurdle for beginners like him is understanding complex error logs without accidentally leaking sensitive server information (like IPs, usernames, or paths) to public cloud AI tools. OpsBuddy solves this by running entirely locally on his machine. It acts as a safe, intelligent sandbox where he can ask technical questions and securely analyze local .log files.

Demo

Here is OpsBuddy in action safely analyzing a local log file, along with the deep-dive performance tracing data captured by Sentry!

Terminal showing OpsBuddy securely analyzing a local error log

Sentry dashboard showing the Waterfall view of AI inference trace

Code


How I Built It

OpsBuddy is built around a fully open-source and local stack:

  • AI Model: Google's Gemma 2B (open-weight model) for fast, concise, and accurate technical mentoring.
  • Local Inference: Ollama to run the LLM efficiently without internet access.
  • Logic & UI: Python combined with the rich library for a beautiful, colorful CLI experience.
  • Agent Tracing: Sentry SDK to monitor the AI's performance. I implemented start_transaction and start_child spans to track the exact latency of the local inference streaming process whenever Andre interacts with the agent, ensuring the application remains responsive.

Why Does Open Innovation Matter?

Open innovation is the absolute backbone of this project. By utilizing open-weight models like Gemma 2B and open local harnesses like Ollama, OpsBuddy guarantees absolute data privacy. Andre can command the AI to analyze sensitive SSH, database, or application logs without the fear of that data being sent to a closed, third-party API. Open innovation made it possible to build a capable, free-to-use mentor that respects user data sovereignty.

Prize Categories

  • Best Use of Gemma
  • Best Use of Sentry Agent Tracing

Top comments (0)