← Back to all posts
[AI Project]

Arwanos v10 — The Mental State Monitor and ML Pipeline

June 3, 202612 min read

A few weeks ago, I traveled across the Arab world — almost ten days. It was a remarkable journey, and I met many people along the way, but one person stood out: Feras, a Quality Assurance Engineer who also teaches at a university in Prague, Czech Republic. He's sharp, thoughtful, and we ended up having a long conversation about software testing and — more importantly — how to present a program to an end user in a way that actually makes sense to them.

That conversation stuck with me. So here I am — and this article is an update. A lot has changed since the first introduction. Arwanos is now at v10, and the biggest addition is something I want to walk through in real technical depth: the Mental State Monitor.



Overview: What is Arwanos?

Arwanos is a local AI personal assistant that runs entirely on your own machine — no cloud, no subscriptions, and no data ever leaves your device. It's built in Python on top of Ollama as the local inference backend, using llama3:8b-instruct-q4_K_M as its main reasoning model.


The core idea is straightforward: Arwanos runs entirely on your own hardware. Every response, every journal entry, every private conversation stays on your machine — nothing is sent to a server. There are other local AI tools out there (PrivateGPT, Jan, LM Studio), but Arwanos is specifically built around psychological self-analysis and adaptive resource management — not just model serving.


Underneath the surface, there's a system called ARM (Adaptive Resource Management) that scores every query before it reaches the model. It asks: Does this question need a web search? Does it need conversation history? How long should the answer be? The answers determine exactly how many resources get used for that specific query. A simple math question uses almost nothing. A complex research question automatically enables web search and extended output — without you changing any settings.



How did Arwanos come to be?

Arwanos went through many stages of development. I started writing it at the end of 2024 under the name Rona — initially to experiment with graph-based algorithms and push the model in unconventional directions. But over time I decided to refactor everything and build something that would actually be useful to me, both psychologically and intellectually.


By early 2025 it had a proper name — Arwanos — and a clear purpose: a personal AI that knows you, not just a generic chatbot. As of v10, it has seven distinct input modes, a psychological journal analysis pipeline, and a machine-learning-backed monitoring system I'll describe in detail below.



What problems did Arwanos help me with?

On the psychological side, I was going through a rough stretch. I was spread too thin — too many goals, too much pressure, pushing myself to the edge of burnout. I needed something personal to help me make sense of it all.


I had been studying self-knowledge and psychology from an Islamic perspective for a while, and I came to appreciate the practice of solitude through self-observation and writing — something close to what Western psychology calls writing therapy. So I built Arwanos to support exactly that: a private journal the AI can read, analyze, and reflect back to you — without sending a single character outside your machine.



The seven input modes

Arwanos has seven distinct ways of interacting with it. Rather than walking through each one in detail, here's the overview:


ModeWhat it does
Normal chatJust type. ARM scores your query and decides whether to search the web, pull history, or answer directly — you don't configure anything.
/deepForces a live web search regardless of ARM's decision. Use when you need fresh, sourced information.
/analyzeReads your private journal entries and answers questions about your behavioral patterns, emotional arcs, and contradictions.
/lo (Companion)Talks with you conversationally. Has permanent long-term memory — extracts facts after every conversation and recalls past topics using semantic vector search.
/ragSearches your imported documents using a keyword index. Answers come only from what you imported — no hallucinations from mixed sources.
Reply-to-SelectionHighlight text on screen, click Reply, ask a follow-up. Skips the full pipeline — responds in about 10 seconds.
VoiceHands-free voice dictation with a mode picker and VAD auto-calibration that adapts to your room's background noise.

Each of these serves a real purpose, and I use most of them daily. But the biggest addition in v10 — and the reason I'm writing this article — is the Mental State Monitor.




The Mental State Monitor

A note before I go further: The Monitor is designed for self-reflection and pattern exploration — it is not a diagnostic tool and is not intended to replace a licensed mental health professional. Think of it as a structured mirror that shows you what's already in your writing, not what's clinically wrong with you.


Here's the simple version of what it does: you write journal entries over days and weeks. When you open the Monitor, it reads everything you've written, builds a profile of your recurring themes and struggles, and generates questions that are specifically about your patterns — not generic self-help prompts. After you answer, it compares what you said against what your journals actually show and tells you where those two stories agree, contradict, or reveal something new.


What makes it different from a simple questionnaire is that it gets more precise over time. Each session's findings feed into the next session's starting point. By session five or six, the questions stop being surface-level and start probing the specific gaps between what you say you're doing and what your journal history actually shows.


The problem I was trying to solve was this: I had months of journal entries sitting in a file, and I knew there were patterns I wasn't seeing. I could re-read them myself, but I'd always read them with the same bias I wrote them with. I wanted something that could cross-reference what I wrote three months ago with what I wrote yesterday and show me the contradiction I was too close to notice on my own.


How it works under the hood

Access the Monitor by clicking 🧭 Monitor in the web UI sidebar — it opens as a dedicated page in your browser, all served from 127.0.0.1. Nothing goes outside your machine. When you start a session, three things happen in sequence:


First — Tuning. The system reads all your data: every journal entry you've ever written, your complete habits history, previous monitor sessions, and any past cross-reference findings. From all of this, the LLM builds a psychological profile — your dominant themes, recurring patterns, habit struggles, mood trends, unresolved tensions, and areas you haven't explored yet.


Second — Question generation. Questions are built from three sources simultaneously: your own deep conversation history, all your previous monitor answers and insights, and 7,557 real examples from professional psychology datasets (CounselChat, Mental Health Counseling Conversations, and ESConv). These datasets aren't used as generic templates — they're keyword-searched using your specific profile themes, so only the most relevant professional examples influence the questions you receive.


Third — Insight pipeline. After you answer, your responses are cross-referenced against your full journal history. The system identifies confirmed patterns, contradictions between what you said today and what your journals show, and new revelations only visible by comparing both sources. That inference then drives a second search against the professional datasets, and the LLM generates focused insights grounded in both your personal data and real therapeutic patterns — ending with one specific, actionable step for tomorrow.


Questions never repeat across sessions. The system runs a programmatic similarity check after every generation — if a new question is too close to any previous one, even when rephrased, it gets regenerated with instructions to explore different territory. Over multiple sessions, the questions also rotate through different angles of the same theme: first identifying what an emotion is, then where it originates, then how it drives your decisions. The depth scales with how many sessions you've completed.


What a real session looks like

To make this concrete, here's an anonymized example based on real usage:


What the journal showed: Multiple entries over several weeks mentioning "too many projects," "not finishing things," and a recurring pattern of starting something new whenever an existing project hit a difficult phase.


What the Monitor asked: "You've described starting new projects several times during periods where an existing one required sustained, uncomfortable focus. What specifically becomes unbearable about staying with the difficult phase?"


What the insight revealed: The cross-reference found that journal entries where new projects were started consistently followed entries with low mood scores and language about feeling "stuck." The system's inference was that the new projects weren't necessarily signs of ambition — they were functioning as an avoidance mechanism triggered by the discomfort of being stuck. Recognizing that pattern was the first step toward breaking it.


That's the kind of connection I couldn't see by just re-reading my own entries. I knew I was juggling too many things, but I didn't realize why I kept adding more until the system laid it out by comparing what I wrote on different days.


Progress tracking

The Monitor tracks cumulative engagement across sessions: topic progress bars showing how often each psychological category was engaged vs skipped, average mood shift over time, and session history with full Q&A and AI insights viewable in the browser. Each session's cross-reference findings are stored and fed back into the next session's tuning phase — the system accumulates knowledge of your patterns rather than starting from scratch each time.




What does it look like in practice?

Arwanos runs as a native desktop application built with CustomTkinter — no browser tab required, no Electron overhead. The local web interface (Flask, bound to 127.0.0.1:5005) gives you journal browsing, date-range analysis, weekly reports, and access to the Mental State Monitor. You launch the desktop app, click Open Predictive, and it opens in your browser alongside the desktop window. It even has an animated dragon mascot if that's your thing.


The system requirements are reasonable: Python 3.11+, Ollama installed and running, and a GPU with around 6GB of VRAM. It will still run on CPU if you don't have a discrete GPU — just at reduced speed. The Mental State Monitor additionally requires the psychology datasets to be built once with python build_datasets.py; after that it works fully offline.


On Linux, the included arwanos_launcher.sh detects your NVIDIA GPU and VRAM, checks whether Ollama is running on GPU or CPU, starts Ollama automatically if it's offline, and shows a confirmation dialog before launch. On Windows, you can build a standalone Arwanos.exe using PyInstaller — Ollama still needs to be installed separately, but everything else is bundled.



Watch it in action

I recorded a walkthrough where I discuss Arwanos, what it does, and how I use it personally. Worth watching if you're considering setting it up:




Source code

Arwanos is open source. You can read the code, open issues, or fork it from the GitHub repository:


github.com/GMMB1/Transmitted-Ai


The Mental State Monitor is the part of this project I'm most proud of technically. It's not a chatbot wrapper — it's a pipeline that accumulates structured inferences from your own writing over time, cross-references them against professional therapeutic data, and produces questions that deepen with every session. All of it runs on your own hardware, on models you control, against data that never leaves your machine.


The best way to understand a tool like this is to use it for something real — not test queries, but something you actually want to know about yourself. That's when the privacy matters. That's when the journal analysis means something. And that's when the ML pipeline proves its value quietly in the background, without asking you to think about it.


Author: GMM

buy me a coffee: ko-fi.com/ghostman77506