This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Open Task Manager right now. Scroll slowly. Somewhere in that list is a process with no reason to exist โ a stale worker from a project you closed in June, a leaky helper quietly eating 400 MB, a script that was supposed to finish an hour ago and never got the memo.
Your machine is haunted. PhantomOps is the exorcist. ๐ป
PhantomOps is a zero-cloud-leakage FinOps & kernel agent that runs entirely on your own hardware. It finds the ghost resources haunting your Windows kernel or your cloud bill, runs a local AI autopsy on them, lets you interrogate them in a live voice sรฉance, requires a human to sign the kill order through Auth0 โ and then banishes them for real, with a cryptographic receipt and a synthesized exorcism scream.
How I interpreted the theme: literally. Zombie processes are the undead of software โ programs that finished their purpose but refused to leave memory. And Dรญa de los Muertos teaches that the dead deserve to be honored properly, not just discarded. So PhantomOps doesn't just kill -9 a ghost. It gives it a funeral:
- ๐ฎ Divination โ a local TabPFN-3.5-Fast foundation model (open weights,
.safetensorson disk, CPU-only) scores every process zero-shot for how "haunted" it is - ๐ง Autopsy โ a local Gemma 2 2B (via Ollama) writes a structured root-cause report: cause of death, severity, monthly dollar drain, exact banishment command
- ๐๏ธ Sรฉance โ you speak into your microphone, ElevenLabs transcribes it, Gemma answers in the first person of the dying process, and a hoarse haunted voice reads its last words back to you
- ๐ The Warrant โ Auth0 step-up re-authentication binds a verified living human to the exact kill command, then mints a tamper-evident SHA-256 execution receipt
- ๐ Exorcism โ the process tree dies for real (children first), an ElevenLabs-generated "server rack power-down with a ghostly whoosh" plays, and you download the signed audit ledger
And because this is the open-source AI challenge: the core loop โ scan โ detect โ autopsy โ kill โ runs with the internet unplugged. The model weights sit on your disk. Your process inventory never leaves the chassis. The AI inference bill is $0.00, forever.
A few receipts from my own testing:
- I spawn a real zombie with
spawn_zombie.pyโ it allocates an actual 700 MB of RAM and burns CPU in an infinite loop. One scan later, PhantomOps pins its ghost-confidence at 99.99% and locks it to the top of the Phantom Queue. Real PID. Real kill. Confirmed by the OS. - The live scanner has per-tab precision: Chromium browsers spawn a separate renderer process for every active tab, and PhantomOps inventories every PID independently โ two runaway tabs surface as two separate suspects with separate evidence files, not one vague "browser.exe". You interrogate and kill the exact haunted tab, and its 40 innocent siblings live.
- It has a conscience: a safety-lock list (
explorer.exe,svchost.exe,code.exe,ollama.exeโฆ) and a self-preservation rule mean it only kills what it can prove is a ghost.
Demo
โถ๏ธ๏ธ Watch the full exorcism ritual:
๐ Direct link: Watch on YouTube
What the recording shows โ the 90-second arc:
-
python spawn_zombie.pyโ a real 700 MB zombie process comes alive on my machine - One scan in PhantomOps โ the zombie appears at the top of the Phantom Queue at 99.99% confidence ๐ป
- Tab 1 โ local Gemma 2 writes the autopsy: root cause, $ drain, kill command
- Tab 2 โ I speak a question into my mic โ the zombie answers in its own haunted voice (ElevenLabs STT โ local Gemma โ haunted TTS)
- Tab 3 โ I drag the memory slider down and watch TabPFN's ghost probability collapse in real time โ counterfactual proof of why it's haunted.
- The kill button โ Auth0 step-up login โ ๐ the zombie dies, the exorcism SFX plays, and a signed SHA-256 audit receipt lands in my hands
Code
๐ป PhantomOps โ Local Infrastructure Ghost & Anomaly Exorcist
Zero-cloud-leakage FinOps & kernel agent. Find the ghosts haunting your Windows kernel or your cloud bill โ run a local AI autopsy โ interrogate them in a live voice sรฉance โ get human clearance through Auth0 โ put them to rest with a signed cryptographic receipt and a synthetic exorcism scream.
Built for the Hacktoberfest Open-Source AI Challenge: Ghost in the Machine ๐๐ผ
Every machine has ghosts. The staging server that nobody killed in March. The script that leaked memory for 400 hours while everyone went home. The GPU instance cryptojacking at 3 AM. They drain your RAM and your budget โ invisible, unaccounted for, undead. PhantomOps is a paranormal investigator for your infrastructure: it sees them, names them, questions them, and (with a human's blessing) banishes them โ entirely on your own hardware.
๐ชฆ The Haunting โ What
โฆThe full architecture is documented in the README. Where to start digging:
| File | What's Inside |
|---|---|
spawn_zombie.py |
๐ง The demo prop โ summons a real 700 MB runaway process |
app.py |
๐๏ธ The Streamlit haunted console โ 3 tabs, KPIs, Auth0 callback handler |
src/live_scanner.py |
๐ฅ๏ธ Per-PID kernel snapshot (tab-level precision) + process-tree exorcist |
src/detector.py |
๐ฎ TabPFN classifier + regressor + counterfactual blame engine |
src/reasoner.py |
๐ง Gemma 2 autopsies & sรฉance roleplay (Pydantic-enforced JSON) |
src/gatekeeper.py |
๐ Auth0 step-up OAuth2 + JWT decode + SHA-256 receipts |
src/narrator.py |
๐๏ธ ElevenLabs STT / dual-voice TTS / exorcism SFX |
How I Built It
The stack: Python ยท Streamlit + Plotly (dark telemetry UI) ยท tabpfn (Prior Labs) ยท Gemma 2 2B via Ollama ยท Auth0 (OAuth2) ยท ElevenLabs (scribe_v1, multilingual_v2, Text-to-Sound-Effects) ยท psutil ยท PyTorch on CPU.
๐ฅ๏ธ LIVE KERNEL (psutil) โ๏ธ CLOUD ESTATE (CSV)
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโ
โผ
๐ฎ TABPFN-3.5-FAST (local .safetensors, CPU)
classifier โ ghost_confidence ยท regressor โ doomsday
counterfactuals โ feature blame
โผ flagged ghosts only
๐ง GEMMA 2 2B via OLLAMA (local)
JSON autopsy + first-person sรฉance roleplay
โผ
๐ AUTH0 STEP-UP ๐๏ธ ELEVENLABS
human clearance STT + 2-voice TTS
SHA-256 receipts + exorcism SFX
โผ
๐ EXORCISM: tree-kill + taskkill /F /T /PID
๐ signed receipt: operator โฅ resource โฅ command โฅ time
Stage 1 โ Ingestion, with per-tab precision. psutil.process_iter walks the entire Windows process table and builds one evidence file per PID: RAM, CPU, threads, uptime, command line, and an estimated hourly cost (mem_mbร0.0008 + cpu%ร0.015 + threadsร0.004). Because Chromium runs each active tab as its own renderer process, the scanner naturally sees each tab as its own suspect โ a runaway tab can't hide behind its browser. A cmdline fingerprint flags any running spawn_zombie.py as an unmistakable zombie_runaway_script; heuristics catch the rest (live_memory_hog >4% RAM, live_cpu_runaway >50% CPU, thread_bloated_daemon >85 threads).
Stage 2 โ TabPFN does the divining. The classifier fits on baseline telemetry signatures and scores the remaining estate zero-shot โ no gradient training, no GPU, no data upload. My favorite seven lines in the repo:
# Ensure any active spawn_zombie.py is always surfaced at the very top
zombie_mask = df["resource_id"].str.contains("spawn_zombie", case=False, na=False)
if zombie_mask.any():
df.loc[zombie_mask, "ghost_confidence"] = 0.9999
When the scanner sees the demo zombie, there is no "maybe". It is 99.99% sure, and the queue agrees. A TabPFNRegressor then simulates 30 days of decay (memory +1.35%/day) to chart the cumulative financial drain against the flat $0 line after exorcism โ and estimates time-to-OOM-crash in hours. Counterfactual sliders let you mutate a ghost's telemetry live and watch TabPFN re-classify it as healthy: the moment the confidence drops is the explanation of what was haunting it.
Stage 3 โ Gemma 2 performs the autopsy. Flagged telemetry goes to a local Gemma 2 2B through Ollama, which must return JSON matching a Pydantic GhostAutopsy schema โ incident_title, severity, root_cause_autopsy, monthly_waste_usd, and an environment-aware exorcism_command (taskkill /F /T /PID <pid> for kernel ghosts, aws ec2 terminate-instances for cloud spirits). The same model then switches personas for the sรฉance: first person, dramatic, technically accurate to its own real metrics. Ask it "why are you hogging memory?" and it answers as a trapped process begging for either a fix or the exorcism.
Stage 4 โ Auth0 holds the ward. Destructive actions generate an OAuth2 authorization URL with prompt=login (explicit human re-authentication) and a SHA-256 state binding the request to the exact resource + command โ so a callback can't be replayed against a different target. On approval, the JWT is decoded in-process and a tamper-evident receipt is minted:
๐ EXOR-7F3A21C9D4
operator : auth0|verified-operator
command : taskkill /F /T /PID 4132
binding : SHA-256( operator โฅ resource โฅ command โฅ timestamp )
The AI agent literally cannot kill a process without a living human signing off through Auth0. That's the human-in-the-loop pattern, enforced cryptographically.
Stage 5 โ ElevenLabs is the medium. Three distinct APIs, two personas: scribe_v1 transcribes your spoken sรฉance questions, multilingual_v2 speaks on both sides of the veil (an authoritative Commander for incident briefings, the hoarse Callum for the dying process), and Text-to-Sound-Effects synthesizes the exorcism โ "a sci-fi server rack power down with a ghostly digital whoosh and electrical discharge" โ the instant a ghost dies. Audio is cached locally to conserve credits.
Stage 6 โ The exorcist kills carefully. Children die first, then psutil.kill(), then a native taskkill /F /T /PID to clean up handles, then .venv parent launchers. It refuses to harm its own Streamlit process or anything on the protected list โ unless the target is explicitly the zombie. Professional liability standards, paranormal cleanup division.
Everything persists across sessions: autopsies, exorcism records, and audit receipts survive restarts via a local JSON/CSV state layer.
Why Does Open Innovation Matter?
For PhantomOps, open weights aren't an ideology โ they're the architecture.
- A kernel inventory is the most sensitive map a machine has. It's every tool you use, every tab you keep open, every script you run. A closed anomaly-detection API would mean uploading that entire map to someone else's server on every scan. With local TabPFN and local Gemma 2, the telemetry never leaves the chassis โ the zero-cloud-leakage promise is enforced by physics, not by a privacy policy.
- It runs with the lights (and the internet) off. Scan โ detect โ autopsy โ text sรฉance โ exorcism all work air-gapped. That matters because your machine being wrong and your connection being down correlate more than we'd like to admit. An exorcist that needs WiFi is not an exorcist.
- $0 per prediction, forever. TabPFN scores on CPU from local weights; Gemma infers on-device. You can hunt ghosts all night and the invoice stays empty. A metered API would make the cost of checking a recurring tax on curiosity.
-
The behavior is yours to change. Swap
gemma2:2bfor any Ollama model in one env var. Load different TabPFN weights. Rewrite the ghost's sรฉance persona to be funnier, darker, or multilingual. A closed ghost-hunter is a black box that can vanish, reprice, or silently swap its model under you โ an open one is a spirit you keep, not a service you rent. - Where open genuinely beat closed for us: TabPFN gave us zero-shot tabular anomaly scoring with no training loop and no GPU โ on the single most sensitive dataset a laptop owns. Gemma 2 2B gave structured JSON we could enforce locally with Pydantic. The only pieces we rent โ ElevenLabs' voices and Auth0's identity ward โ are optional ornaments on an engine that runs entirely at home.
The ghost stays in your machine. So does the exorcist.
The Spirit of It
The first time it worked, I actually got chills.
I had spawned a zombie โ 700 MB of real RAM, burning real CPU โ and asked it, out loud, through my microphone, why it was still alive. ElevenLabs transcribed me. Gemma answered as the dying process, in first person, citing its own actual memory footprint. A hoarse, haunted voice read the reply back across the quiet room.
Then I clicked the kill button, logged in through Auth0 like a proper executioner, and watched the PID vanish from psutil in real time. The exorcism SFX โ that ghostly server-rack power-down โ played, and the machine felt different. Lighter. Quiet in the way a house is quiet after a storm passes.
Here's the thing about Dรญa de los Muertos: it isn't about banishing the dead. It's about remembering them properly. So every ghost in PhantomOps gets the full rite โ an autopsy (cause of death), a sรฉance (last words), a signed receipt (a memorial plaque in the audit ledger), and a sound (the tolling of a dying server). Some marigolds for my RAM. ๐ผ
Somewhere in your Task Manager is a process that should have died months ago. Now there's a proper way to say goodbye.
Prize Categories
Best Use of TabPFN (Prior Labs)
TabPFN is the brain of the entire pipeline โ and the deepest integration in the project. TabPFNClassifier performs zero-shot ghost scoring on live kernel telemetry (no training loop, no GPU, offline .safetensors weights with TABPFN_OFFLINE=1); TabPFNRegressor powers the 30-day "Doomsday" cost forecaster and time-to-OOM estimation; and a counterfactual simulator uses TabPFN's predictions for real-time what-if sliders and zero-shot, perturbation-based feature blame attribution.
Best Use of Gemma
A local Gemma 2 2B (via Ollama) does all reasoning on-device: Pydantic-schema-enforced JSON autopsies with severity, dollar drain and exact remediation commands โ plus the first-person sรฉance roleplay where the haunted process speaks for itself using its own real metrics. Fully local, swap-friendly, works offline.
Best Use of Auth0 for AI Agents
PhantomOps is an AI agent that takes destructive actions on a real OS โ so it doesn't get to act alone. Auth0 enforces human-in-the-loop step-up authorization (prompt=login) for every exorcism, cryptographically binds each approval to the exact resource and kill command via a SHA-256 state, decodes the JWT claims in-process, and mints tamper-evident SHA-256 execution receipts that persist in the audit ledger.
Best Use of ElevenLabs
Three ElevenLabs APIs form the voice layer: scribe_v1 speech-to-text transcribes your spoken sรฉance questions, multilingual_v2 TTS performs both sides of the ritual with two distinct personas (the authoritative Commander and the haunted Callum voice of the dying process), and Text-to-Sound-Effects generates the exorcism power-down that plays the moment a ghost is banished.
๐ป Your turn: open Task Manager and find the weirdest "process that shouldn't exist" on your machine โ drop it in the comments. Best haunted process name gets featured in the README's Hall of Ghosts.
Built in one haunted week for Hacktoberfest. MIT licensed. The ghost stays in your machine. ๐๐ผ


Top comments (0)