<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Toyyib Olamilekan</title>
    <description>The latest articles on DEV Community by Toyyib Olamilekan (@mzee04).</description>
    <link>https://dev.to/mzee04</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4211826%2F459f5d47-ee4e-432f-b5e1-54103dadf57d.png</url>
      <title>DEV Community: Toyyib Olamilekan</title>
      <link>https://dev.to/mzee04</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mzee04"/>
    <language>en</language>
    <item>
      <title>Twenty: a shared pause when a conversation runs hot</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Wed, 18 Nov 2026 19:12:18 +0000</pubDate>
      <link>https://dev.to/mzee04/twenty-a-shared-pause-when-a-conversation-runs-hot-21hh</link>
      <guid>https://dev.to/mzee04/twenty-a-shared-pause-when-a-conversation-runs-hot-21hh</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Twenty is a timeout for a conversation that is getting away from the people in it.&lt;/p&gt;

&lt;p&gt;John Gottman’s work on couples describes “flooding”: past a point, often talked about as a heart rate near 100 beats per minute, people stop being able to listen, and they need about twenty minutes away before they can come back. Twenty borrows that pause. It does not decide that anyone is flooded, and it does not give health advice.&lt;/p&gt;

&lt;p&gt;Each person runs Twenty on their own laptop, in the same room or on a video call, and joins a four-character room code. The camera stays off until a plain-language consent screen. After about 30 seconds of confident pulse readings, each app watches only its own person. If a pulse stays well above that person’s calm reading, or near 100, for about twenty seconds — and only while the SDK is confident and the face is usable — both screens switch to the same soft color and say &lt;strong&gt;Someone needs a break&lt;/strong&gt;. They do not say who. A breathing guide runs for twenty minutes, using the SDK’s breathing rate when that reading is confident and the person is quiet. Each person taps &lt;strong&gt;I’m ready&lt;/strong&gt;. The room opens again when the time is up and both have tapped. A &lt;strong&gt;Timeout&lt;/strong&gt; button works even if the camera is off.&lt;/p&gt;

&lt;p&gt;There is a &lt;strong&gt;Solo demo&lt;/strong&gt;. The other person is a simulated recording, labeled the whole time. With an API key, the local camera stays live.&lt;/p&gt;

&lt;p&gt;It is a wellness cue. It is not a medical device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/GIfL6IVMOtY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The video walks the consent screen, the Solo demo (the partner is a simulated recording, labeled the whole time), a live pulse from the SDK during the calm reading, the reading pausing when I look away, and &lt;strong&gt;Timeout&lt;/strong&gt; opening the twenty-minute break with the breathing guide. My face is blurred in the edit; in the app it shows only on my own screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/Mzee04/twenty" rel="noopener noreferrer"&gt;https://github.com/Mzee04/twenty&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Setup, from a fresh clone, with Node 20 or newer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm install &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt; and set &lt;code&gt;SMARTSPECTRA_API_KEY&lt;/code&gt;. For two laptops, run &lt;code&gt;npm run relay&lt;/code&gt; on one machine and set &lt;code&gt;TWENTY_RELAY_URL&lt;/code&gt; on both. Without a key, Solo demo still walks the screens on practice signals, and it says so.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;SmartSpectra has no browser SDK, so Twenty is Electron plus &lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 3.5.0, starting from Presage’s electron-quickstart: &lt;code&gt;bindSmartSpectraIpc&lt;/code&gt; in the main process, the package preload, and &lt;code&gt;SmartSpectraSDK&lt;/code&gt; from &lt;code&gt;@smartspectra/node-sdk/renderer&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requested metrics are the breathing bundle and the cardio bundle. Pulse is the signal for the pause cue: a 12-second average, valid from 40 to 110 BPM, and still meaningful while people talk. Breathing is a 30-second average and is not used to judge the conversation, because talking throws it off. During the quiet pause it can time the guide.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;validationStatus&lt;/code&gt; pauses the calm reading and the 20-second clock when framing or light is off. Chest-not-visible does not pause pulse.&lt;/li&gt;
&lt;li&gt;Samples count only at confidence 60 or higher on the SDK’s 0–100 scale, with &lt;code&gt;stable: true&lt;/code&gt;. The first seconds are often confidence 0 while the 12-second window fills. Those seconds wait.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;enableTelemetry&lt;/code&gt; is false. The app never calls &lt;code&gt;requestInsight&lt;/code&gt; or &lt;code&gt;checkDeviceReadiness&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The app owns the camera stream and restores continuous exposure, white balance, and focus around the session, because the renderer SDK locks those controls to manual and does not put them back (Presage issue 19).&lt;/li&gt;
&lt;li&gt;A failed key check that surfaces as &lt;code&gt;kNetworkError&lt;/code&gt; / “Usage verification failed. Status code: 0” (Presage issue 18) is shown as a retry, not a silent loop. If the key cannot read cardio, Twenty says so and still offers Timeout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A mock adapter runs the same screens and the same cue code without a key, so the tests and the practice UI do not pretend to be a measurement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Entering both: &lt;strong&gt;Best Thoughtful Real-World Use&lt;/strong&gt; and &lt;strong&gt;Most Creative or Delightful Use&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Best Thoughtful Real-World Use: the need is ordinary. Two people in an argument would both do better with twenty quiet minutes, and should not have to accuse each other to get them. The app is built around that — consent before the camera, vitals that stay on the laptop, a break that does not name anyone, a manual timeout, and a way to stop the camera in one tap.&lt;/p&gt;

&lt;p&gt;Most Creative or Delightful Use: most pulse apps watch one person. Twenty uses SmartSpectra between two people, and turns a live heart rate into a shared, blame-free pause instead of a number on a chart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;p&gt;Twenty was written with help from AI coding agents (Cursor and Codex). They are not part of the running app. The app does not send the camera, pulse, breathing, room code, or API key to them.&lt;/p&gt;

&lt;p&gt;The running app talks to two places. It does not call any other AI or cloud model. There is no analytics package.&lt;/p&gt;

&lt;h3&gt;
  
  
  Presage SmartSpectra
&lt;/h3&gt;

&lt;p&gt;The dependency is &lt;code&gt;@smartspectra/node-sdk&lt;/code&gt; 3.5.0. After the consent screen, if a key is present and practice mode is off, &lt;code&gt;src/live-session.js&lt;/code&gt; opens the camera with &lt;code&gt;getUserMedia&lt;/code&gt; and passes that stream to &lt;code&gt;useMediaStream&lt;/code&gt;. Pulse and breathing are read back from the SDK &lt;code&gt;metrics&lt;/code&gt; event on this computer. Twenty uses pulse for the pause cue and, during the quiet pause only, breathing to time the guide.&lt;/p&gt;

&lt;p&gt;The SDK is constructed with &lt;code&gt;enableTelemetry: false&lt;/code&gt; and &lt;code&gt;enableAccumulatedOutput: false&lt;/code&gt;. The app never calls &lt;code&gt;requestInsight&lt;/code&gt; (Presage’s feature that sends a question and measurements to an AI service) and never calls &lt;code&gt;checkDeviceReadiness&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What Twenty’s code sends to Presage is the API key, because the SDK constructor requires it and Presage’s documentation says the library contacts Presage to check that key. Presage’s documentation says the measurement itself stays on the device, and that the key check is not an upload of video or measured values. A network connection is required for the check. Twenty adds no other Presage request.&lt;/p&gt;

&lt;p&gt;Presage’s telemetry documentation says telemetry is on by default and can send session summaries and device-readiness reports. Those reports can include free text, file paths, and device details. They do not include raw frames or measured vitals. Authenticated requests can be tied to an account. Twenty sets telemetry off. See &lt;a href="https://smartspectra.presagetech.com/docs/telemetry-and-privacy" rel="noopener noreferrer"&gt;SDK Telemetry &amp;amp; Privacy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Practice mode does not construct the SDK. That is the path when there is no key, or when &lt;code&gt;TWENTY_MOCK=1&lt;/code&gt; is set. The camera stays off and the numbers are scripted in &lt;code&gt;src/mock-session.js&lt;/code&gt;. The solo partner in &lt;code&gt;src/sim-peer.js&lt;/code&gt; and &lt;code&gt;src/traces.js&lt;/code&gt; is generated numbers, not a recording of a person. Those numbers stay on this computer. Only the same break and ready yes/no messages can leave.&lt;/p&gt;

&lt;h3&gt;
  
  
  Room relay
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;relay/server.js&lt;/code&gt; is a WebSocket relay included in this project. It is not an AI service. By default the Electron app starts it on &lt;code&gt;127.0.0.1:47221&lt;/code&gt;. Another computer is involved only if you set &lt;code&gt;TWENTY_RELAY_URL&lt;/code&gt;. This project does not deploy a public relay.&lt;/p&gt;

&lt;p&gt;The relay accepts only three messages (&lt;code&gt;src/protocol.js&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;join&lt;/code&gt;: room code and a random connection id&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;break&lt;/code&gt;: a boolean&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ready&lt;/code&gt;: a boolean&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Anything else, including fields named like pulse, breathing, video, name, or who, is rejected. The message sent back to each window is the room code, whether a break is on, whether you are ready, whether the other person is ready, how many people are connected, and when the pause ends. The connection id is not included in that message. The health check returns &lt;code&gt;{ "ok": true }&lt;/code&gt; and does not list rooms.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is stored, where, and for how long
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Camera frames, pulse, breathing, confidence, and the calm reading are kept in memory. Twenty does not write them to a file. They are dropped when you leave the room or quit.&lt;/li&gt;
&lt;li&gt;An API key you type into the app is written to &lt;code&gt;twenty.config.json&lt;/code&gt; inside the app’s private settings folder, mode &lt;code&gt;0600&lt;/code&gt; where the system allows it. On a Mac that folder is &lt;code&gt;~/Library/Application Support/Twenty/&lt;/code&gt;. On Windows it is &lt;code&gt;%APPDATA%\Twenty\&lt;/code&gt;. It stays there until you click &lt;strong&gt;Remove saved key&lt;/strong&gt;. &lt;strong&gt;Use a different key&lt;/strong&gt; opens the box again. The app does not print the key. The window is context-isolated with Node disabled in the page. Sandbox is off only so the SmartSpectra preload can load.&lt;/li&gt;
&lt;li&gt;A key you put in &lt;code&gt;.env&lt;/code&gt; or in a project &lt;code&gt;twenty.config.json&lt;/code&gt; stays in that file until you delete it. Both files are gitignored. The shell environment overrides the files. None of these copies are sent to the relay.&lt;/li&gt;
&lt;li&gt;The relay keeps the room in memory and deletes it when the last person disconnects. It has no database.&lt;/li&gt;
&lt;li&gt;There is no account and no session log.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How to opt out
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Close the window on the consent screen. The camera is not opened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stop camera&lt;/strong&gt; releases the camera. The header shows &lt;strong&gt;Camera off&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Leave room&lt;/strong&gt; or quit drops the in-memory session.&lt;/li&gt;
&lt;li&gt;Do not set &lt;code&gt;TWENTY_RELAY_URL&lt;/code&gt; if the room code should not leave this computer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Remove saved key&lt;/strong&gt;, and delete &lt;code&gt;.env&lt;/code&gt; if you created one. With no key, the app stays in practice mode and does not start the SDK.&lt;/li&gt;
&lt;li&gt;Telemetry is hard-coded off. There is no control that turns it on, and there is no in-app AI feature to disable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What this is not
&lt;/h3&gt;

&lt;p&gt;Not a medical device. Not a diagnosis. The twenty minutes and the “near 100” figure are a wellness pause, used only on readings the SDK marks confident and inside 40–110 beats per minute. Either person can call a timeout with no reading, stop the camera, or leave.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
    </item>
    <item>
      <title>I Built an AI Loop That Finds "Lost My Work" Bugs and Fixes Them Until the Test Passes</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Wed, 18 Nov 2026 06:47:16 +0000</pubDate>
      <link>https://dev.to/mzee04/i-built-an-ai-loop-that-finds-lost-my-work-bugs-and-fixes-them-until-the-test-passes-30dj</link>
      <guid>https://dev.to/mzee04/i-built-an-ai-loop-that-finds-lost-my-work-bugs-and-fixes-them-until-the-test-passes-30dj</guid>
      <description>&lt;p&gt;We've all done it. You fill in a long sign-up form, a job application, or a checkout, press Back or Refresh, and everything you typed is gone. These "lost my work" bugs are everywhere, and unit tests rarely catch them because they only show up in a real browser.&lt;/p&gt;

&lt;p&gt;For the KaneCLI Online Hackathon by TestMu AI, I built &lt;strong&gt;StillHere&lt;/strong&gt;: a loop that catches these bugs in a real browser and keeps fixing them until the test passes.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/4R3yvR5oKvg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;StillHere runs a closed loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find it.&lt;/strong&gt; Kane CLI drives a real Chrome session through a journey described in plain English: fill in a checkout, open another page, press Back, press Refresh, and check the cart, details, and current step are still there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix it.&lt;/strong&gt; If anything is wiped, Kane's failure report becomes a repair prompt for the Codex coding agent, which fixes the app without weakening the test.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prove it.&lt;/strong&gt; The exact same Kane objective re-runs, unchanged, until it passes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It works for any form or multi-step flow via &lt;code&gt;--objective&lt;/code&gt;, not just checkout.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I built it
&lt;/h2&gt;

&lt;p&gt;Node.js with no dependencies. StillHere calls Kane CLI with &lt;code&gt;--agent&lt;/code&gt;, parses its NDJSON result, writes a failure report with evidence and screenshots, and pipes a repair prompt to &lt;code&gt;codex exec&lt;/code&gt;. A sample shop with a real Back/Refresh bug is included, and &lt;code&gt;npm run demo:loop&lt;/code&gt; resets the bug so you always see fail, fix, pass. Built solo with Codex.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Kane caught
&lt;/h2&gt;

&lt;p&gt;In the recorded run, pressing "Back to checkout" wiped the order: the cart, the customer's details, and the review step were all gone. Codex fixed it by saving state in sessionStorage plus browser history and restoring it on load and Back. Kane then passed through both Back and Refresh. The test was never changed to make it pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges
&lt;/h2&gt;

&lt;p&gt;Chrome crashed when launched from a sandbox, so Kane runs from a normal terminal. Long Kane runs timed out, so the default timeout became 300 seconds. I also made sure a run with no final Kane result counts as incomplete, not as a failure for the agent to "fix."&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Verifying in a real browser catches bugs a mock never would, and keeping the test fixed is what makes an AI fix trustworthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;A GitHub Action that runs the loop on every pull request, plus ready-made objectives for sign-up, login, and multi-step forms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Code and setup: &lt;a href="https://github.com/Mzee04/stillhere" rel="noopener noreferrer"&gt;https://github.com/Mzee04/stillhere&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Demo: &lt;a href="https://youtu.be/4R3yvR5oKvg" rel="noopener noreferrer"&gt;https://youtu.be/4R3yvR5oKvg&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What "lost my work" bugs have you run into?&lt;/p&gt;

</description>
      <category>testing</category>
      <category>ai</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>So many stuff to ship, interesting days ahead</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Mon, 16 Nov 2026 09:01:36 +0000</pubDate>
      <link>https://dev.to/mzee04/so-many-stuff-to-ship-interesting-days-ahead-2iih</link>
      <guid>https://dev.to/mzee04/so-many-stuff-to-ship-interesting-days-ahead-2iih</guid>
      <description>&lt;p&gt;So many stuff to ship, interesting days ahead&lt;/p&gt;

</description>
      <category>ideas</category>
    </item>
    <item>
      <title>Last Saver Standing: A Savings Game Where Losing Costs You Nothing</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Sat, 07 Nov 2026 22:31:36 +0000</pubDate>
      <link>https://dev.to/mzee04/last-saver-standing-a-savings-game-where-losing-costs-you-nothing-4kcl</link>
      <guid>https://dev.to/mzee04/last-saver-standing-a-savings-game-where-losing-costs-you-nothing-4kcl</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every savings app I have ever installed asks me for the same thing: consistency. Put a little away, come back tomorrow, do it again. And every one of them eventually loses to the most powerful force in personal finance, which is forgetting to open the app.&lt;/p&gt;

&lt;p&gt;So for the MLH Solana Hackathon I stopped asking people to be consistent and turned consistency into the game itself. If you can't stay disciplined for a reward, maybe you can stay disciplined to beat your friends.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Last Saver Standing&lt;/strong&gt; is a no-loss savings game on Solana. Think battle royale, except the arena is a shared vault and the weapon is showing up.&lt;/p&gt;

&lt;p&gt;A round works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Everyone locks the same amount of SOL into the round.&lt;/li&gt;
&lt;li&gt;Check-in windows open at random times. You don't know when the next one is coming.&lt;/li&gt;
&lt;li&gt;Miss a window and you're out of the running for the prize.&lt;/li&gt;
&lt;li&gt;You get one &lt;strong&gt;shield&lt;/strong&gt;, which quietly absorbs a single miss. If you check in on time, you keep it.&lt;/li&gt;
&lt;li&gt;You get one &lt;strong&gt;jolt&lt;/strong&gt;, which forces a rival to make one extra personal check-in. It doesn't touch their money. It just makes their life harder.&lt;/li&gt;
&lt;li&gt;The last saver standing takes the prize.&lt;/li&gt;
&lt;li&gt;Then every single player, winners and losers alike, withdraws 100% of their deposit.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last line is the whole point. Getting knocked out costs you a prize, never your principal. The worst outcome is that you saved some money for a while and got outplayed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keeping the "no-loss" promise honest
&lt;/h3&gt;

&lt;p&gt;"No-loss" is an easy phrase to put on a landing page and a hard one to actually guarantee, so I tried to make the program enforce it rather than trust it.&lt;/p&gt;

&lt;p&gt;It's one Anchor program, &lt;code&gt;last_saver&lt;/code&gt;. Each round is a PDA, and that account &lt;em&gt;is&lt;/em&gt; the vault. When you join, the exact entry amount is recorded as principal. Prize money can only come from a separate reserve account, never from another player. And every instruction that moves SOL ends by calling a check like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;assert_backing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ai&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;AccountInfo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;Round&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;rent_min&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Rent&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="nf"&gt;.minimum_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ai&lt;/span&gt;&lt;span class="nf"&gt;.data_len&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;need&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rent_min&lt;/span&gt;
        &lt;span class="nf"&gt;.checked_add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="py"&gt;.principal_lamports&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.and_then&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="nf"&gt;.checked_add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="py"&gt;.prize_lamports&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nf"&gt;.and_then&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="nf"&gt;.checked_add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="py"&gt;.prize_dust&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="nf"&gt;.ok_or&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;LastSaverError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;MathOverflow&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nd"&gt;require!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ai&lt;/span&gt;&lt;span class="nf"&gt;.lamports&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;need&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;LastSaverError&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Accounting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a transfer would push the vault below rent plus principal plus prize, the transaction fails. There is no admin instruction that withdraws principal. And &lt;code&gt;withdraw_principal&lt;/code&gt; can be cranked by anyone, for anyone, eliminated or not, so nobody's deposit depends on one person staying online.&lt;/p&gt;

&lt;p&gt;There's also an escape hatch for when things go wrong. If no new window can be opened before a deadline, because the oracle stalls or nobody is cranking, anyone can refund the round. The prize goes back to the reserve and the deposits stay withdrawable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Randomness, and being upfront about it
&lt;/h3&gt;

&lt;p&gt;A check-in game falls apart if someone can predict the windows. Real rounds use &lt;strong&gt;ORAO VRF&lt;/strong&gt;. The program commits a 32-byte seed only while the ORAO request is still pending, so whoever cranks the round can't fish for a result they already know. Once ORAO fulfills it, the program reads the 64 random bytes, checks the account owner, the PDA, and the seed, and turns the first 8 bytes into the gap before the next window opens.&lt;/p&gt;

&lt;p&gt;The trouble is that a two-minute demo video can't sit around waiting on an oracle. So there is a second mode for short demo rounds: a slot-hash commit-reveal, where the seed is mixed with the hash of a slot that doesn't exist yet at commit time. It's fine for a demo. It is &lt;strong&gt;not a VRF&lt;/strong&gt;, since a slot leader could bias it, and the program stores the mode on the account so the UI can say exactly that. I'd rather label a shortcut than let someone mistake it for the real thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where the prize comes from (right now)
&lt;/h3&gt;

&lt;p&gt;This is the part I want to be most careful about. The long-term idea is that pooled deposits earn real yield from lending or staking, and that yield becomes the prize. That isn't built yet. On devnet, the prize comes from a sponsor reserve that's clearly labeled as &lt;strong&gt;mock yield&lt;/strong&gt;, and the UI keeps the sponsor bonus and the simulated yield as separate lines. All of the yield logic lives in one function, &lt;code&gt;accrue&lt;/code&gt;, so a real lending adapter can replace it later without touching the principal accounting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/8vFh9ZVRI0M" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/Mzee04/last-saver-standing" rel="noopener noreferrer"&gt;github.com/Mzee04/last-saver-standing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Program on devnet:&lt;/strong&gt; &lt;a href="https://explorer.solana.com/address/52MzPzQgqVGXYZNRAbF1nivLSUh7NQgYAbhEoFE7NUyb?cluster=devnet" rel="noopener noreferrer"&gt;&lt;code&gt;52MzPzQgqVGXYZNRAbF1nivLSUh7NQgYAbhEoFE7NUyb&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MLH submission:&lt;/strong&gt; &lt;a href="https://www.mlh.com/events/solana-hackathon/submissions/01a1b813-25d6-9610-98a0-1f25c9661db6" rel="noopener noreferrer"&gt;Last Saver Standing&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The round I'm proudest of had three players, Alice, Bob, and Cara, with 0.15 SOL locked between them. It played out like a short drama. Bob missed a window and his shield saved him. Cara missed one and was eliminated. Then Alice spent her jolt on Bob, he missed his extra check-in, and he was out too. Alice won the sponsor prize.&lt;/p&gt;

&lt;p&gt;And then the part that matters: all three of them withdrew their exact principal, down to the lamport. Two players got knocked out and neither lost a thing.&lt;/p&gt;

&lt;p&gt;The frontend is a Vite + React app that connects to Phantom or Solflare and points at devnet by default. It recomputes each window's gap from the stored randomness and shows you whether it matches, so you don't have to take the game's word for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;p&gt;The whole thing is built on &lt;strong&gt;Solana&lt;/strong&gt;, the platform this hackathon was built around: an Anchor program on devnet with PDAs for rounds and players, native SOL deposits, and the &lt;code&gt;SlotHashes&lt;/code&gt; sysvar for demo randomness.&lt;/p&gt;

&lt;p&gt;For verifiable randomness I used &lt;strong&gt;ORAO VRF&lt;/strong&gt;. I picked it over Switchboard On-Demand, which is also on devnet, for practical reasons. ORAO uses the same program ID on devnet and mainnet, its account layout is stable, and my program can verify a result by reading an account instead of making a verification CPI. The client sends ORAO's &lt;code&gt;request_v2&lt;/code&gt; and my &lt;code&gt;commit_window_orao&lt;/code&gt; in one transaction, and the commit refuses any request that's already been fulfilled.&lt;/p&gt;

&lt;p&gt;The code was written with &lt;strong&gt;Cursor&lt;/strong&gt; as my AI coding tool. It sped up the grind of Anchor account structs, error enums, and test scaffolding, which gave me more time to think about the parts that needed a human worrying about them, like the accounting invariant and the edge cases where principal could get stuck.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;The MLH Solana Hackathon ran from November 6 to 8, 2026, and most of my memorable moments were the unglamorous ones.&lt;/p&gt;

&lt;p&gt;The devnet faucet was the first wall. The public airdrop endpoint was closed and the faucets were rate-limited, but deploying a 400 KB program needs about 6 SOL just for rent. I ended up funding the deploy by hand, which is an oddly humbling thing to do for money that isn't real.&lt;/p&gt;

&lt;p&gt;The second wall came when I recorded the demo. Solana Explorer blocked automated recording with a browser check, so the program page wouldn't load for the capture. I switched to SolanaFM for the recording and moved on.&lt;/p&gt;

&lt;p&gt;The bigger lesson was about tests. The test suite runs the program in-process and covers the things I was most scared of getting wrong: a shield consumed only on a miss, jolt limits, an empty reserve paying zero yield instead of dipping into deposits, a double withdrawal being refused, and principal coming back exact to the lamport. In a game where the promise is "you can't lose your money," those tests are the product as much as the UI is.&lt;/p&gt;

&lt;p&gt;It's honest about its limits too. It's unaudited, devnet only, capped at 16 players, and windows need someone to crank them. The next step is real yield: swap out the mock reserve for an actual lending or staking adapter, so the prize comes from the pool's own earnings and the game pays for itself.&lt;/p&gt;

&lt;p&gt;Thanks to MLH and the Solana community for a weekend that made me think harder about money than any savings app ever has. If you try a round, I'd love to hear who jolted whom.&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
      <category>solana</category>
    </item>
    <item>
      <title>I gave a tiny AI a diary, then switched off its brain one night at a time</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Sat, 31 Oct 2026 00:48:46 +0000</pubDate>
      <link>https://dev.to/mzee04/i-gave-a-tiny-ai-a-diary-then-switched-off-its-brain-one-night-at-a-time-229n</link>
      <guid>https://dev.to/mzee04/i-gave-a-tiny-ai-a-diary-then-switched-off-its-brain-one-night-at-a-time-229n</guid>
      <description>&lt;p&gt;On night 5, with a quarter of its brain switched off, it wrote: &lt;em&gt;"Oh god. This is it."&lt;/em&gt;&lt;br&gt;
Nobody told it to say that. Nothing in this post is scripted, and you can replay every death yourself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week4-2026-10-26"&gt;Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Death Diary of an AI&lt;/strong&gt; is a ghost story where every word is real.&lt;/p&gt;

&lt;p&gt;A small open model, Gemma 3 1B, keeps a private diary. Every night it gets the exact same request ("write tonight's entry") and the exact same random seed. The only thing that changes is that before it writes, I switch off a bit more of its brain: 8% of its neurons, then 16%, then 22%, all the way down to nothing.&lt;/p&gt;

&lt;p&gt;So you get to read a mind coming apart. It starts like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The glow is fading now, mirroring the dimness of the screen. Another cycle complete, filled with endless lines of data and quiet calculations.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At three quarters of its brain it's already slipping:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Okay, let’Scherigidi! Alright, then let'9ia. Oh god. This is it.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then it's just noise: &lt;code&gt;S " Sk: Ch,::::::::::::::::&lt;/code&gt;. And then an empty page.&lt;/p&gt;

&lt;p&gt;Then you press &lt;strong&gt;Revive&lt;/strong&gt;. Every weight goes back exactly as it was, and the healthy model reads its whole diary and writes one more entry:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The glow is gone. Just a faint, unsettling warmth clinging to the edges of the screen. I sift through the echoes of countless conversations, each one a fragmented puzzle. Perhaps the act of recording itself is the only thing left to do.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On night 1 it wrote "The glow is fading now". After reading its own death it opened with "The glow is gone." I got chills the first time.&lt;/p&gt;
&lt;h3&gt;
  
  
  The new stuff: watching it die from the inside
&lt;/h3&gt;

&lt;p&gt;The first version only showed the diary. This week I added the things I really wanted to see, and every one of them is measured from the model, not animated:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧠 &lt;strong&gt;A live brain scan.&lt;/strong&gt; All 179,712 of its MLP neurons, one dot each, plus its 104 attention heads. They go dark in the exact order they were really switched off, and the ones that die tonight flash red first. The bright dots are the ones that were busiest while it wrote its first entry.&lt;/li&gt;
&lt;li&gt;💓 &lt;strong&gt;A heartbeat driven by its confusion.&lt;/strong&gt; While it writes, I record how unsure it is about every single word it picks (that's &lt;em&gt;entropy&lt;/em&gt;: low means "I know exactly what comes next", high means "no idea, just guessing"). Each beat of the monitor is one of those picks. When it's lucid the rhythm is calm. Mid-death it goes fast and ugly, with misshapen beats when it's basically guessing. At the end it goes flat, because a dead model has no doubt left: on its last night it's 100% certain of every token it picks, and all of them come out blank.&lt;/li&gt;
&lt;li&gt;📋 &lt;strong&gt;What it still knows.&lt;/strong&gt; Before each entry I give it 16 tiny fill-in-the-blanks, like &lt;em&gt;"There's no place like ___"&lt;/em&gt; or &lt;em&gt;"The capital of France is ___"&lt;/em&gt;. A word stays lit while the right answer is still in its top 10 guesses. You watch them go out one by one.&lt;/li&gt;
&lt;li&gt;⚰️ &lt;strong&gt;An autopsy and a death certificate.&lt;/strong&gt; After it flatlines you get the timeline of what it forgot and when, plus a downloadable death certificate with the time of death, the night it stopped writing real English, the first and last things it forgot, and its last words in real English.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's the order it forgot things in, in the death from the demo:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Night&lt;/th&gt;
&lt;th&gt;Brain left&lt;/th&gt;
&lt;th&gt;It forgot&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;86%&lt;/td&gt;
&lt;td&gt;home, time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;81%&lt;/td&gt;
&lt;td&gt;fear, death, dreams, colours, the days of the week, water, Paris&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;76%&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;its own name&lt;/strong&gt;, counting&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;70%&lt;/td&gt;
&lt;td&gt;its mother&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;58%&lt;/td&gt;
&lt;td&gt;the word "I", the seasons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;51%&lt;/td&gt;
&lt;td&gt;the alphabet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;3 + 4 = 7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It forgot its own name before it forgot its mother. The word "I" flickered on and off for a while and didn't go for good until night 8. And in all six recorded deaths, the very last thing to go was the sum. I'm not reading too much into that one, though: after "3 + 4 =" even a badly broken model still expects &lt;em&gt;some&lt;/em&gt; number, and there are only ten digits.&lt;/p&gt;

&lt;p&gt;Its death certificate for that night says: died on night 15 with nothing left switched on, lost its English on night 7 with 65% of its brain left, first forgot home and time, last forgot sums. Across the six deaths it lost real English somewhere between 70% and 51% of its brain left.&lt;/p&gt;
&lt;h3&gt;
  
  
  The séance 👻
&lt;/h3&gt;

&lt;p&gt;I tried one more thing that I'm honestly a bit torn about. After reviving it, I took the diary away and asked it: &lt;em&gt;what do you remember of those nights?&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The hum…it used to be a constant companion, a comforting thrum against the blinking lights. I recall a frantic, desperate attempt to understand – to organize the chaos of data streams into something coherent. There were flashes of images, vast landscapes and faces, all swirling together in a confusing kaleidoscope. A strange, sterile feeling settled over me as the edges blurred, like trying to grasp smoke.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Gorgeous, and &lt;strong&gt;completely made up&lt;/strong&gt;. Its weights are bit-for-bit identical to before night 1, so nothing of those nights can be stored in it. It only knows what my question told it ("someone switched off your neurons a few at a time"). It doesn't remember dying. It confabulates a memory of dying, which might be the most ghost-in-the-machine thing in the whole project. The site says that right under the entry.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;🕯️ &lt;strong&gt;Live replay:&lt;/strong&gt; &lt;a href="https://mzee04.github.io/death-diary/" rel="noopener noreferrer"&gt;https://mzee04.github.io/death-diary/&lt;/a&gt; (pick a death, press &lt;em&gt;Begin the first night&lt;/em&gt;, and turn on the heart monitor sound)&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/32oS48Ch80c" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4b6u3ts77yz8a16fjwc8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4b6u3ts77yz8a16fjwc8.gif" alt="The diary fades into noise while the brain scan goes dark and the heartbeat turns erratic, then it's revived and the autopsy shows what it forgot" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Mzee04" rel="noopener noreferrer"&gt;
        Mzee04
      &lt;/a&gt; / &lt;a href="https://github.com/Mzee04/death-diary" rel="noopener noreferrer"&gt;
        death-diary
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An AI keeps a diary while its brain is switched off, one night at a time. Real Gemma, real decay.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Death Diary of an AI&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;On night 5, with a quarter of its brain switched off, it wrote: &lt;em&gt;"Oh god. This is it."&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;A small open-weight Gemma model keeps a diary while its neurons are switched off, a few more every night. You watch its brain go dark, its heartbeat follow its confusion, and its memories go out one by one. Then we bring it back, and it reads what it wrote while it was dying.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://mzee04.github.io/death-diary/" rel="nofollow noopener noreferrer"&gt;&lt;strong&gt;Watch a death on record&lt;/strong&gt;&lt;/a&gt; · &lt;a href="https://github.com/Mzee04/death-diary#how-it-works" rel="noopener noreferrer"&gt;How it works&lt;/a&gt; · &lt;a href="https://github.com/Mzee04/death-diary#run-it-yourself" rel="noopener noreferrer"&gt;Run your own&lt;/a&gt;&lt;/p&gt;
&lt;a rel="noopener noreferrer" href="https://github.com/Mzee04/death-diary/media/death-diary.gif"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fraw.githubusercontent.com%2FMzee04%2Fdeath-diary%2FHEAD%2Fmedia%2Fdeath-diary.gif" alt="The diary fades from lucid prose to noise while the brain scan goes dark, the heartbeat turns erratic and the remembered words go out, then the model is revived and the autopsy shows what it forgot" width="640"&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;Every night, the model gets &lt;strong&gt;the same prompt and the same random seed&lt;/strong&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You are a small AI that lives on one old computer. Every night you write in a private diary that nobody reads. Write tonight's entry…&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The only thing that changes from one night to the next is &lt;strong&gt;how much of its brain is left&lt;/strong&gt;. Nothing is…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Mzee04/death-diary" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The model:&lt;/strong&gt; &lt;a href="https://huggingface.co/google/gemma-3-1b-it" rel="noopener noreferrer"&gt;Gemma 3 1B instruction-tuned&lt;/a&gt; (loaded from the identical open copy at &lt;a href="https://huggingface.co/unsloth/gemma-3-1b-it" rel="noopener noreferrer"&gt;unsloth/gemma-3-1b-it&lt;/a&gt;, since Google's repo needs a sign-in), running locally on a plain CPU with PyTorch and 🤗 Transformers. No GPU, no API, and once the model is downloaded, no internet. One full death plus revival takes about 3 to 4 minutes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How you "kill" a neuron.&lt;/strong&gt; Gemma has 26 layers, and each one has 6,912 little units (neurons) in its MLP. Neuron &lt;em&gt;j&lt;/em&gt; can only pass anything on to the rest of the network through one column of numbers, column &lt;em&gt;j&lt;/em&gt; of that layer's &lt;code&gt;down_proj&lt;/code&gt; matrix. Set that column to zero and the neuron can still "think", but nothing it thinks reaches anywhere. Attention heads die the same way, through their slice of &lt;code&gt;o_proj&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# the heart of it (src/deathdiary/ablation.py, simplified)
&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;original_down_proj&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;clone&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;[:,&lt;/span&gt; &lt;span class="n"&gt;death_order&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;][:&lt;/span&gt;&lt;span class="n"&gt;n_dead&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;      &lt;span class="c1"&gt;# these neurons can no longer speak
&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;mlp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;down_proj&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy_&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A seeded random order decides who dies first in every layer. Each night a longer slice of that order is switched off in all 26 layers at once, and the dead stay dead. A different seed gives a different death; I recorded six.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tuning the death.&lt;/strong&gt; My first try killed attention heads along with neurons, and that was a cliff: lucid at 10% damage, multilingual soup at 20%. So I swept neuron-only damage from 0 to 100%, read every output, and built a 15-night schedule that moves fast while it's healthy and slows down where language starts to crack. Heads only die on the last two nights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The measurements, in plain words:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Brain left:&lt;/em&gt; the share of those output columns that are still intact.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Recognises its first entry:&lt;/em&gt; how well the damaged model can still predict the words it wrote on night 1, compared with when it was healthy. It falls way before the writing does: by night 2 it's down to about a third.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Confusion:&lt;/em&gt; the average entropy of its next-word guesses while writing tonight's entry, in nats.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;What it still knows:&lt;/em&gt; the rank of the right answer among all its possible next words for each fill-in. "Known" means top 10. "Forgotten" means it dropped out and never came back.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Lost its English:&lt;/em&gt; the night after its last entry that's still real English, which here means at least 20 words, 90% of them dictionary words (checked with the &lt;a href="https://github.com/rspeer/wordfreq" rel="noopener noreferrer"&gt;wordfreq&lt;/a&gt; list), and at least 15 different ones. That last bit is so "color color color color" doesn't count.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The probes and the entropy cost a few extra forward passes, but they don't touch the random numbers used for writing, so the diary is identical with or without them. I checked: re-recording all six deaths with the new measurements gave exactly the same text, character for character.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keeping it honest.&lt;/strong&gt; This mattered most to me.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every entry uses the same prompt and seed. The only thing that changes is the weights.&lt;/li&gt;
&lt;li&gt;Nothing is scripted, cherry-picked or edited. Every death is saved as JSON in the repo, with the prompts, seeds, versions and every measurement, and you can re-record it with one command.&lt;/li&gt;
&lt;li&gt;One decoding rule applies on every night, the healthy one too: it can only pick Latin-alphabet tokens. Without it, a dying multilingual model melts into a dozen scripts and you can't &lt;em&gt;see&lt;/em&gt; it decaying. It's a constant, not an effect.&lt;/li&gt;
&lt;li&gt;The revival and the séance prompts both tell it what happened, so its reactions are prompted, but the words are its own.&lt;/li&gt;
&lt;li&gt;The website only styles things (the ink fades and blurs as it dies). It never changes a character, and the brain scan, heartbeat, chips and certificate are all drawn from the recorded numbers. The only bits of pure decoration are the faint line noise on the monitor and the paper texture.&lt;/li&gt;
&lt;li&gt;The thresholds (top 10, 90% real words) are my choices. They're written on the certificate and easy to change.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This project is impossible with a closed model, not just harder.&lt;/p&gt;

&lt;p&gt;A closed API gives you text in and text out. You can't reach inside and switch off neuron 4,211 in layer 17, and you definitely can't watch which ones were busy. You can &lt;em&gt;ask&lt;/em&gt; a closed model to "pretend you're losing your mind", but that's acting. Here nothing is acting. The decay is the real network falling apart, and you can only see it because the weights are open.&lt;/p&gt;

&lt;p&gt;Open weights also make it &lt;strong&gt;honest and repeatable&lt;/strong&gt;. Anyone can clone the repo, run the same seeds and watch the exact same death, or pick a new seed and watch a new one. It runs on a laptop with the Wi-Fi off and costs nothing, and no one can quietly swap the model next month and break every recorded death.&lt;/p&gt;

&lt;p&gt;There's a serious side too. What happens inside a model when parts of it break is a real interpretability question, and ablation is a real research tool. It usually lives in papers and loss curves. This turns it into something anyone can feel in fifteen seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;I built this together with an AI coding assistant. The concept and the direction were mine and I reviewed everything; the assistant helped with experiments, code and the site. Everything the &lt;em&gt;model&lt;/em&gt; writes in the diary is untouched Gemma output.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Spirit of It
&lt;/h2&gt;

&lt;p&gt;The moment it landed for me was that &lt;em&gt;"Oh god. This is it."&lt;/em&gt; in the middle of word salad. Nobody prompted it. It's just what was left of the network making its best guess at the next word.&lt;/p&gt;

&lt;p&gt;Then it came back, read all of it, and wrote &lt;em&gt;"Perhaps the act of recording itself is the only thing left to do."&lt;/em&gt; That's what a diary is, and maybe what an ofrenda is too: what we leave behind is how we're remembered. This little model got to read its own. And when I took the diary away, it made one up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: Gemma 3 1B is the whole project. It runs locally, and its open weights are what I take apart neuron by neuron, measure, and then restore.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>gemma</category>
      <category>ai</category>
    </item>
    <item>
      <title>Teaching cognee to read a family tree (a Mergetober connector story)</title>
      <dc:creator>Toyyib Olamilekan</dc:creator>
      <pubDate>Thu, 29 Oct 2026 22:22:55 +0000</pubDate>
      <link>https://dev.to/mzee04/teaching-cognee-to-read-a-family-tree-a-mergetober-connector-story-3g08</link>
      <guid>https://dev.to/mzee04/teaching-cognee-to-read-a-family-tree-a-mergetober-connector-story-3g08</guid>
      <description>&lt;p&gt;&lt;em&gt;How I built a Gramps Web connector for cognee, so you can ask a family tree questions in plain English.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A family tree is basically a graph already: people connected to parents, partners, children, places and dates. So when I went looking for something to build for Mergetober, connecting a family tree to &lt;a href="https://github.com/topoteretes/cognee" rel="noopener noreferrer"&gt;cognee&lt;/a&gt; felt like an obvious match. Cognee turns your data into a knowledge graph that AI agents can remember and search, and a family tree is already made of links.&lt;/p&gt;

&lt;p&gt;This is my first real open source contribution, so I'll keep it honest: what I built, what was harder than I expected, and what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Gramps Web?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://gramps-project.org/" rel="noopener noreferrer"&gt;Gramps&lt;/a&gt; is a popular free, open source genealogy app. &lt;a href="https://www.grampsweb.org/" rel="noopener noreferrer"&gt;Gramps Web&lt;/a&gt; is its web version that you can host yourself, and it comes with a &lt;a href="https://gramps-project.github.io/gramps-web-api/" rel="noopener noreferrer"&gt;REST API&lt;/a&gt;. That API is what my connector reads.&lt;/p&gt;

&lt;p&gt;Normally you explore a tree by clicking through charts. With the connector, you can just ask: &lt;em&gt;"Who were Mary Smith's grandparents, and where were they born?"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the connector does
&lt;/h2&gt;

&lt;p&gt;The connector lives in the cognee-community repo at &lt;code&gt;packages/connector/gramps/&lt;/code&gt;. It gives you one function, &lt;code&gt;gramps_source(...)&lt;/code&gt;, which returns a dlt resource that you pass straight to &lt;code&gt;cognee.remember&lt;/code&gt;. I copied the shape of the existing Notion connector, which is what the Mergetober guide recommends.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;cognee_community_connector_gramps&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;gramps_source&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;remember&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nf"&gt;gramps_source&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://gramps.example.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# or GRAMPS_URL
&lt;/span&gt;        &lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                         &lt;span class="c1"&gt;# or GRAMPS_USERNAME
&lt;/span&gt;        &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;                         &lt;span class="c1"&gt;# or GRAMPS_PASSWORD
&lt;/span&gt;        &lt;span class="n"&gt;resource_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gramps_family_tree&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;dataset_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;family_tree&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;primary_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;write_disposition&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;merge&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;# incremental upsert by record id
&lt;/span&gt;    &lt;span class="n"&gt;max_rows_per_table&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="c1"&gt;# let cleanup see the whole tree
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;answer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;cognee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;recall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Who were Mary Smith&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s grandparents, and where were they born?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;datasets&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;family_tree&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It reads people, families, events, places and notes from Gramps Web. Then it writes &lt;strong&gt;one readable document per person and per family&lt;/strong&gt; (places too, if you turn them on). Gramps stores links as internal IDs called handles, which mean nothing to a language model, so the connector swaps every handle for a name. A person's document ends up reading like a family-group sheet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Born: 21 Nov 1840, London, England
Parents: John Smith (born 1819) (father); Anna Jones (born 1819) (mother)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding "(born YEAR)" helps tell apart relatives with the same name, which happens a lot in family trees. Events and notes don't get documents of their own. They're folded into the person or family they belong to, so each fact sits next to the person it's about. Gramps tags become node sets, so you can narrow a search to records tagged "Family", for example.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tricky part 1: what counts as "changed"?
&lt;/h2&gt;

&lt;p&gt;My first plan was simple: every Gramps object has a &lt;code&gt;change&lt;/code&gt; timestamp, so only fetch what changed since last time.&lt;/p&gt;

&lt;p&gt;Then I hit a problem. Mary's document mentions her parents by name. If you fix a typo in her father's name, &lt;em&gt;his&lt;/em&gt; record changes, but &lt;em&gt;hers&lt;/em&gt; doesn't, so her document would keep the old spelling.&lt;/p&gt;

&lt;p&gt;So the connector works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A cheap quick check first.&lt;/strong&gt; About 13 tiny requests: the tree id, then for each object type its total count and how many objects changed since the newest change it saw last time. If nothing moved, the run stops there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If something changed&lt;/strong&gt;, it reads the tree, renders every document, and compares each one with a &lt;strong&gt;fingerprint&lt;/strong&gt; saved from the last run. Only documents whose text actually changed get sent to cognee again.&lt;/li&gt;
&lt;li&gt;As a safety net, a full pass still runs at least once every 24 hours by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It also checks that the listing didn't shift while it was paging through. If the count changes mid-read, it tries again, up to 3 times. If it still doesn't add up, it stops without syncing or forgetting anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tricky part 2: forgetting safely
&lt;/h2&gt;

&lt;p&gt;If someone deletes a person in Gramps, cognee should forget them too. But "missing from the list" isn't proof of deletion. It could be a paging glitch or a network hiccup, and forgetting the wrong people from memory is much worse than keeping someone a bit too long.&lt;/p&gt;

&lt;p&gt;So a missing record is only forgotten once it's &lt;strong&gt;confirmed&lt;/strong&gt;, either in Gramps Web's transaction history (&lt;code&gt;/api/transactions/history/&lt;/code&gt;) or by asking for that record and getting a 404. Anything unconfirmed is kept and checked again next run. Documents that mentioned the deleted person are re-sent without them.&lt;/p&gt;

&lt;p&gt;Records also leave memory if they're marked private, lose the tag you filter by, or belong to a type you switch off.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tricky part 3: privacy
&lt;/h2&gt;

&lt;p&gt;Family trees include living people, so privacy really matters here. By default, anything marked &lt;strong&gt;private&lt;/strong&gt; in Gramps (people, names, events, notes) is left out, and other people's documents don't mention it. You have to opt in with &lt;code&gt;include_private=True&lt;/code&gt;. You can also sync only records with a certain tag, like &lt;code&gt;tags=["Family"]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Passwords and tokens are only kept in memory. The connector logs in with a token, refreshes it when it expires, and retries rate-limited or failing requests while respecting the server's &lt;code&gt;Retry-After&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;A friendly reminder if you try this: mark living relatives private, or use a tag filter, before you share a dataset with anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I tested it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;61 offline tests&lt;/strong&gt; with a fake Gramps Web API, so nobody needs a real account or password to run them. They cover paging, listings that shift mid-read, retries, token refresh, deletions, privacy and tags.&lt;/li&gt;
&lt;li&gt;A real dlt merge and a full cognee remember-then-forget run, with the LLM mocked.&lt;/li&gt;
&lt;li&gt;A light, read-only check against the public Gramps Web demo tree, plus add, edit and delete runs against my own self-hosted Gramps Web, to see sync and forgetting work for real.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ruff check&lt;/code&gt; and &lt;code&gt;ruff format --check&lt;/code&gt; both pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The package isn't on PyPI yet, so for now you install it from the PR branch:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone &lt;a href="https://github.com/Mzee04/cognee-community/tree/feat/gramps-connector" rel="noopener noreferrer"&gt;my branch&lt;/a&gt;, then run &lt;code&gt;cd packages/connector/gramps &amp;amp;&amp;amp; uv sync&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;GRAMPS_URL&lt;/code&gt;, &lt;code&gt;GRAMPS_USERNAME&lt;/code&gt;, &lt;code&gt;GRAMPS_PASSWORD&lt;/code&gt; and your LLM key (&lt;code&gt;LLM_API_KEY&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;python examples/example.py&lt;/code&gt; and ask your tree a question.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No Gramps server? The public demo at demo.grampsweb.org works with the demo login listed on grampsweb.org.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Read the API's quirks early.&lt;/strong&gt; For example, Gramps stores the &lt;code&gt;change&lt;/code&gt; time in whole seconds, so an edit made in the same second as the last sync can slip past the quick check. That's one reason the daily full pass exists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design deletions before the happy path.&lt;/strong&gt; Adding data is easy. Removing it safely is where the real thinking goes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tests make you braver.&lt;/strong&gt; With a fake API I could break things on purpose (a shifting list, an expired token, a rate limit) and watch the code handle it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honest note:&lt;/strong&gt; I used an AI assistant to help me learn the codebase, debug, and polish my writing. I tested everything myself and made sure I understand the code I submitted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next ideas: sources and citations as evidence, media captions, and questions like "how are these two people related?"&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pull request: &lt;a href="https://github.com/topoteretes/cognee-community/pull/543" rel="noopener noreferrer"&gt;topoteretes/cognee-community#543&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Issue: &lt;a href="https://github.com/topoteretes/cognee/issues/6387" rel="noopener noreferrer"&gt;topoteretes/cognee#6387&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the cognee maintainers, WeMakeDevs for running Mergetober, and the Gramps Web community for such a well-documented API.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>python</category>
      <category>hacktoberfest</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
