<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roope Paukku on Medium]]></title>
        <description><![CDATA[Stories by Roope Paukku on Medium]]></description>
        <link>https://medium.com/@roope.paukku?source=rss-5b2a7f17bfc8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XM5Z6-GikF_Yw8QsqgjzEg@2x.jpeg</url>
            <title>Stories by Roope Paukku on Medium</title>
            <link>https://medium.com/@roope.paukku?source=rss-5b2a7f17bfc8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:06:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roope.paukku/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Steve Yegge’s Beads as a Secure Multi-Developer Remote Server on GCP]]></title>
            <link>https://medium.com/@roope.paukku/running-steve-yegges-beads-as-a-secure-multi-developer-remote-server-on-gcp-5268f4dc2ddc?source=rss-5b2a7f17bfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5268f4dc2ddc</guid>
            <category><![CDATA[beads]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agentic-coding]]></category>
            <category><![CDATA[google-compute-engine]]></category>
            <dc:creator><![CDATA[Roope Paukku]]></dc:creator>
            <pubDate>Fri, 15 May 2026 13:15:38 GMT</pubDate>
            <atom:updated>2026-05-18T07:49:22.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQhP0P1KS4R5M9xaoE-how.png" /></figure><p>I have begun using a multi-agent coding workflow with a pretty standard pattern: Plan → Implement → Validate → Iterate → Ship. This centers around <a href="https://github.com/paukkroa/skills/tree/main">skills</a> as the instructors and Beads as the shared context and task management layer.</p><p>For those who don’t know, <a href="https://github.com/gastownhall/beads">Beads</a> is a agentic-first lightweight issue/project tracking tool that can use Dolt as its backend. Dolt gives you a “Git-for-SQL” database engine with a MySQL-compatible protocol.</p><p>Beads are incredibly easy to setup locally and I have been mostly using them privately in the--stealth mode. However, my fellow developers and their agents don’t then have access to the beads I create. I use beads to create breakdowns of major features but also some minor improvement tasks/TODOs which would be beneficial to share with the other developers so we have a single source of “programming tasks” to be done. Also, when moving into multi-consumer agentic workflows, a single, feature-branch independent source of truth for the context and the tasks is a must-have.</p><p>So, here I present how we setup a simple and lightweight remote Beads setup for a multi-developer and multi-agent workflow.</p><h3>1. Target architecture</h3><p>The architecture we built:</p><ul><li><strong>Database engine:</strong> Dolt</li><li><strong>Application interface:</strong> Beads CLI, bd</li><li><strong>Topology:</strong> centralized server model</li><li><strong>Client access:</strong> GCP IAP TCP forwarding (Zero-Trust Access)</li><li><strong>Network exposure:</strong> no external VM IP, no public MySQL port</li><li><strong>Storage:</strong> separate persistent data disk mounted at /mnt/disks/beads-data</li><li><strong>Dolt mode:</strong> --data-dir mode, so each Beads project becomes its own SQL database</li><li><strong>Service management:</strong> systemd</li><li><strong>Linux service user:</strong> dedicated non-login user beads-dolt</li></ul><p>In this setup, a single Google Cloud VM runs Dolt in server mode. Every Beads project gets its own Dolt SQL database inside one shared data directory. Developers connect from their laptops through an Identity-Aware Proxy SSH tunnel. The connection is pretty much like this:</p><p>Developer laptop → bd CLI → local 127.0.0.1:13306 → authenticated IAP SSH tunnel → private GCP VM → Dolt bound to 127.0.0.1:3306 → persistent disk at /mnt/disks/beads-data</p><h3>2. GCP Setup</h3><p>The VM is created with a security-first posture.</p><h4>VM Settings</h4><p>In Compute Engine, create a VM with:</p><ul><li>Standard provisioning</li><li>Deletion protection enabled</li><li>Live migration enabled</li><li>Shielded VM enabled</li><li>Secure Boot</li><li>vTPM</li><li>Integrity Monitoring</li><li>OS Login enabled</li><li>OS Login 2FA enabled if your organization supports it</li><li>Project-wide SSH keys blocked</li></ul><p>We chose the e2-standard-2 machine for the demo setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzUfMPofvyKPt4604QpoUw.png" /></figure><p>Add a secondary data disk separate from the boot disk:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHNILFTXkn-Xuadwm_4WEA.png" /></figure><p>Recommended settings (use SSD or Extreme Persistent Disks for optimal performance):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xWyxlY8MQto-w1N_v0yiRg.png" /></figure><p>Make sure the deletion rule on the data disk is “Keep disk” for data persistence (found under Add New Disk -&gt; Advanced Configuration).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/384/1*Lv1bXj25JuR8pLKoSRxl2Q.png" /></figure><p>For <strong>networking</strong> settings, use the following for a private VM:</p><ul><li>no public HTTP</li><li>no public HTTPS</li><li>no public MySQL 3306</li><li>no public SSH from 0.0.0.0/0</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J2Pg8YPSFwNdvmWasf47mg.png" /></figure><p>SetExternal IPv4 -&gt; None under “Network interfaces”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f7yX-rKf9rdWOB-KWQEvFg.png" /></figure><p>For <strong>security</strong>, I recommend turning all “Shielded VM” features on. Also allow access to all Cloud APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7Csgvs5qTz_2AT8bfpK7Q.png" /></figure><p>For VM access, we chose to use gcloud with 2FA instead of SSH keys for ease of use and security (Zero Trust Access). The rest of tutorial is built around this choice, so bear that in mind. If you decide to use SSH keys yourself, the exact commands you should use later might be different (primarily for setting up the tunnel), but you can still keep following the tutorial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZAT2isa1WYiQQgwCDqOvQ.png" /></figure><p>With these settings, developers/admins will need permissions for:</p><ul><li>OS Login SSH access to the VM</li><li>IAP TCP forwarding</li></ul><p>Typical roles include, depending on your org policy:</p><ul><li>roles/compute.osLogin or roles/compute.osAdminLogin</li><li>roles/iap.tunnelResourceAccessor</li></ul><p>These settings can be applied for principals at “IAM &amp; Admin → IAM → Allow → Grant Access”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MWYzpxs6UlGgOsz42t1L7g.png" /></figure><p>Coming back to the VM creation, in the Advanced settings tab, we chose to “Enable deletion protection” to ensure nobody deletes this VM accidentally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aKOfyDxi_XGTy67DxAewPQ.png" /></figure><p>Now, go ahead and Create your instance.</p><p>After the creation, for IAP SSH access, ensure there is a firewall rule that allows SSH from Google’s IAP TCP forwarding range:</p><p>35.235.240.0/20 -&gt; TCP:22</p><p>This allows gcloud compute ssh --tunnel-through-iap to work without giving the VM a public IP. You can add this rule at “Network Security → Firewall Policies → Create firewall rule”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzWtil47asUFdUB6oE6DDA.png" /></figure><p>Choose a name and add Google’s IAP TCP forwarding range:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*SvDt25-PV-vUNCyDDL4-Kw.png" /></figure><p>Allow TCP traffic and Create the rule:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*kbx-uJJB0LWuOEx9elqhZg.png" /></figure><p>Now you should be able to <strong>login to your instance</strong> via:</p><p>gcloud auth login</p><p>gcloud compute ssh &lt;vm-instance&gt; --project=&lt;gcp-project&gt; --zone=&lt;vm-zone&gt; --tunnel-through-iap</p><p>(remember to set the IAM policies)</p><p>The next steps are done on the VM unless stated otherwise. <strong>So login first!</strong></p><h3>3. Storage Setup</h3><p>The VM uses two disks:</p><ul><li>boot disk for the operating system</li><li>secondary persistent disk for Beads/Dolt data</li></ul><p>Check what is the data disk (run on the VM): lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS,MODEL</p><p>In our case it looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5JNu-KJp_jFTLX0haA5zw.png" /></figure><p>And the stable GCP disk symlinks were (ls -l /dev/disk/by-id/ | grep google):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*byTunrT_knB8_sevZiyGHw.png" /></figure><p>So the data disk was dev/disk/by-id/google-beads-disk .</p><h4>Format and Mount the Data Disk</h4><p>On the VM, set the data disk variable: export DATA_DEV=/dev/disk/by-id/google-beads-disk</p><p>Check that the disk has no existing filesystem signatures:sudo wipefs -n &quot;$DATA_DEV&quot;</p><p>Format it as ext4: sudo mkfs.ext4 -m 0 -E lazy_itable_init=0,lazy_journal_init=0,discard &quot;$DATA_DEV&quot;</p><p>Create the mount point:sudo mkdir -p /mnt/disks/beads-data</p><p>Mount it:sudo mount -o discard,defaults &quot;$DATA_DEV&quot; /mnt/disks/beads-data</p><p>Verify the mount:df -hT /mnt/disks/beads-data</p><p>Also inspect block devices again:lsblk -f</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DUErXOzyrHkox8g9DFOx7w.png" /></figure><p>Persist the mount in /etc/fstab:UUID=&quot;$(sudo blkid -s UUID -o value &quot;$DATA_DEV&quot;)&quot;</p><p>Then append the mount entry:echo &quot;UUID=$UUID /mnt/disks/beads-data ext4 discard,defaults,nofail 0 2&quot; | sudo tee -a /etc/fstab</p><p>Reload systemd and verify the mount configuration:</p><p>sudo systemctl daemon-reload</p><p>sudo findmnt --verify</p><p>Test remounting:</p><p>sudo umount /mnt/disks/beads-data</p><p>sudo mount -a</p><p>df -hT /mnt/disks/beads-data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DR9qeNCF7YF2ebatW-RHRg.png" /></figure><h4>Troubleshooting: Boot Disk and Data Disk May Be Reversed</h4><p>Do not assume the boot disk is always /dev/sda. In our case:</p><ul><li>/dev/sdb was the boot disk</li><li>/dev/sda was the data disk</li></ul><p>Always verify with lsblk -f and ls -l /dev/disk/by-id/ | grep google .</p><p>Use the stable /dev/disk/by-id/google-... path rather than guessing /dev/sda or /dev/sdb.</p><h3>4. Add Cloud NAT for Outbound Internet</h3><p>Because the VM we configured had no external IP (outbound internet path), apt package installations failed. Since we want a secure deployment, the fix is not to add an external IP. The better solution is <strong>Cloud NAT</strong>.</p><p>Cloud NAT gives the private VM outbound internet access while preserving:</p><ul><li>no external VM IP</li><li>no public SSH</li><li>no public database port</li><li>IAP-only administrative access</li></ul><h4>Discover Network and Subnet</h4><p>From a local machine (not the VM) with gcloud, run:</p><p>gcloud compute instances describe &lt;instance&gt; --project=&lt;project&gt; --zone=&lt;vm-zone&gt; --format=&quot;get(networkInterfaces[0].network,networkInterfaces[0].subnetwork)&quot;</p><p>The result shows your:</p><ul><li>project</li><li>region</li><li>zone</li><li>network</li><li>subnet</li></ul><h4>Create Cloud Router and NAT</h4><p>Create a Cloud Router if it doesn’t exist in your project:</p><p>gcloud compute routers create beads-nat-router --project=&lt;project&gt; --region=&lt;region&gt; --network=default</p><p>Create Cloud NAT:</p><p>gcloud compute routers nats create beads-nat --project=&lt;project&gt; --router=beads-nat-router --region=&lt;region&gt; --nat-all-subnet-ip-ranges --auto-allocate-nat-external-ips</p><p>This gives private VMs in the default network outbound internet access through NAT. Inbound access remains blocked except through IAP/Google-controlled paths. This setup permits all VMs in the project/zone for outbound traffic, so be sure to verify if this appropriate in your context.</p><p>Verify the NAT:</p><p>gcloud compute routers nats describe beads-nat --project=&lt;project&gt; --router=beads-nat-router --region=&lt;region&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oo5m6FLaO61hQ46xFJCrAg.png" /></figure><p>Once NAT was active, the required package downloads and GitHub downloads should work.</p><h4>Troubleshooting: No Cloud NAT</h4><p>If installing Dolt or Debian packages fails with network timeouts, check whether the VM has outbound internet. Cloud NAT is my recommended approach to allow outbound connectivity. There are some other ways to install Beads and Dolt to the VM without Cloud NAT, such as copying the installation files via the tunnel we have created.</p><h3>5. Install Dolt</h3><p>On the VM, update package lists:</p><p>sudo apt-get update</p><p>Install basic tools:</p><p>sudo apt-get install -y curl ca-certificates default-mysql-client</p><p>Download the Dolt installer:</p><p>curl -fsSL https://github.com/dolthub/dolt/releases/latest/download/install.sh -o /tmp/dolt-install.sh</p><p>Run the installer:</p><p>sudo bash /tmp/dolt-install.sh</p><p>Verify the installation:</p><p>which dolt</p><p>dolt version</p><p>In our case, Dolt installed successfully as:</p><p>/usr/local/bin/dolt</p><p>with version:</p><p>dolt version 2.0.3</p><h3>6. Create a Dedicated Dolt Service User</h3><p>It is not recommended to run Dolt as root for obvious reasons. Rather, let’s create a system user:</p><p>sudo useradd --system --home-dir /var/lib/beads-dolt --create-home --shell /usr/sbin/nologin beads-dolt</p><p>Give it ownership of the data directory and its home directory:</p><p>sudo chown -R beads-dolt:beads-dolt /mnt/disks/beads-data</p><p>sudo chown -R beads-dolt:beads-dolt /var/lib/beads-dolt</p><p>Configure Dolt identity for commits and metadata:</p><p>sudo -u beads-dolt HOME=/var/lib/beads-dolt dolt config --global --add user.name &quot;Beads Dolt Server&quot;</p><p>sudo -u beads-dolt HOME=/var/lib/beads-dolt dolt config --global --add user.email &quot;beads-dolt@localhost&quot;</p><p>Verify the config:</p><p>sudo -u beads-dolt HOME=/var/lib/beads-dolt dolt config --global --list</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*82uzzWghepAXVPgd-6x0Fg.png" /></figure><h3>7. Create the Dolt systemd Service</h3><p>Create the service file:</p><p>sudo nano /etc/systemd/system/beads-dolt.service</p><p>Paste this service definition:</p><blockquote>[Unit]</blockquote><blockquote>Description=Beads Dolt SQL Server</blockquote><blockquote>Documentation=https://github.com/dolthub/dolt</blockquote><blockquote>After=network-online.target</blockquote><blockquote>Wants=network-online.target</blockquote><blockquote>RequiresMountsFor=/mnt/disks/beads-data</blockquote><blockquote>[Service]</blockquote><blockquote>Type=simple</blockquote><blockquote>User=beads-dolt</blockquote><blockquote>Group=beads-dolt</blockquote><blockquote>Environment=HOME=/var/lib/beads-dolt</blockquote><blockquote>WorkingDirectory=/mnt/disks/beads-data</blockquote><blockquote>ExecStart=/usr/local/bin/dolt sql-server --data-dir /mnt/disks/beads-data --host 127.0.0.1 --port 3306</blockquote><blockquote>Restart=on-failure</blockquote><blockquote>RestartSec=5</blockquote><blockquote>LimitNOFILE=65535</blockquote><blockquote>NoNewPrivileges=true</blockquote><blockquote>PrivateTmp=true</blockquote><blockquote>ProtectSystem=full</blockquote><blockquote>ProtectHome=true</blockquote><blockquote>ReadWritePaths=/mnt/disks/beads-data /var/lib/beads-dolt</blockquote><blockquote>[Install]</blockquote><blockquote>WantedBy=multi-user.target</blockquote><p>Reload systemd:sudo systemctl daemon-reload</p><p>Enable and start the service:sudo systemctl enable --now beads-dolt</p><p>Check service status:sudo systemctl status beads-dolt --no-pager</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Jor76I2PrnhrB4Mk-nWDw.png" /></figure><p>Check recent logs:sudo journalctl -u beads-dolt -n 100 --no-pager</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R7RPcnTvUNN6MLS6_ZFK-Q.png" /></figure><p>Confirm Dolt is listening only on loopback:sudo ss -ltnp | grep 3306</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ib5nDAZy1NVmPnAGv2sWJQ.png" /></figure><p>This is the important safety check. You want Dolt bound to 127.0.0.1:3306, not 0.0.0.0:3306.</p><h3>8. Test Dolt Locally on the VM</h3><p>Run:mysql -h 127.0.0.1 -P 3306 -u root -e &quot;SHOW DATABASES;&quot;</p><p>Before creating any Beads databases, the expected databases are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*wlWFEvyGZ2sBjZcnxQxCDQ.png" /></figure><p>This confirms Dolt SQL server is working locally.</p><h3>9. Open an IAP Tunnel From the Developer Machine</h3><p>From the <strong>local developer machine</strong> (not the VM), run:</p><p>gcloud compute ssh &lt;instance&gt; --project=&lt;project --zone=&lt;vm-zone&gt; --tunnel-through-iap -- -N -L 127.0.0.1:13306:127.0.0.1:3306</p><p>Leave this terminal open. This maps:</p><p>local 127.0.0.1:13306 -&gt; IAP SSH tunnel -&gt; VM 127.0.0.1:3306</p><p>I use local port 13306 rather than 3306 to avoid conflicts with a local MySQL or MariaDB server.</p><p>Optionally test from the local machine:mysql -h 127.0.0.1 -P 13306 -u root -e &quot;SHOW DATABASES;&quot;</p><h3>10. Initialize a Remote Beads Project</h3><p>On the <strong>local developer machine</strong> again, create a project directory:</p><p>mkdir -p ~/remote-beads-test &amp;&amp; cd ~/remote-beads-test</p><p>Assuming you have Beads <a href="https://github.com/gastownhall/beads/blob/main/docs/INSTALLING.md">installed</a>, initialize Beads against the remote Dolt server (replace remote_beads_test with your database name if you want to):</p><p>bd init --server --external --database remote_beads_test --server-host 127.0.0.1 --server-port 13306</p><p>I recommend setting auto-export to “n”, we experienced some version control hiccups if it was set to “y”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1E0w1s2svg-KvDfLXZnvIQ.png" /></figure><p><strong>On the</strong> <strong>VM</strong>, verify the database exists:</p><p>mysql -h 127.0.0.1 -P 3306 -u root -e &quot;SHOW DATABASES;&quot;</p><p>The database list should now include remote_beads_test or whatever you named your database as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*-4T3i_og0yLcJZvp5pW4Jg.png" /></figure><p>Also verify the directory exists:sudo ls -la /mnt/disks/beads-data</p><p>You should see your database name there(remote_beads_test in our case):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yaCitjje_LuVYifqnpmh2Q.png" /></figure><h3>11. Test Beads</h3><p>First, with the tunnel running, run bd status on the local machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vAXsLMeTqG1miFwC4FN6g.png" /></figure><p>Create a test issue:</p><p>bd create &quot;Test issue for remote Beads&quot;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pApiAYugnXr5B0gQt1M7w.png" /></figure><p>bd list :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxexAm7eYnJuXlhIH9pgVA.png" /></figure><p>bd show &lt;issue&gt; :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6XkiREsp0owlEdxq4LOyg.png" /></figure><p>As we can see, the remote server works! The issue has the correct owner as well.</p><p>You may stop here, or read along for some recommended security tightenings.</p><h4>Troubleshooting</h4><p>Make sure all Beads users have up-to-date versions of Beads and Dolt installed. Make sure the server also has an up-to-date version of Dolt. Version mismatches might cause issues when connecting to the database and when managing issues.</p><h3>(12.) Tighten Data Directory Permissions</h3><p>After Dolt generated its config, we can tighten permissions.</p><p>On the VM:</p><p>sudo chmod 600 /mnt/disks/beads-data/config.yaml</p><p>sudo chown beads-dolt:beads-dolt /mnt/disks/beads-data/config.yaml</p><p>sudo chmod 750 /mnt/disks/beads-data</p><p>Verify:</p><p>sudo ls -la /mnt/disks/beads-data</p><p>The final shape should include:</p><ul><li>/mnt/disks/beads-data owned by beads-dolt:beads-dolt</li><li>config.yaml owned by beads-dolt:beads-dolt</li><li>config.yaml with mode 600</li><li>project directories such as remote_beads_test</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0npvNnQhmbH4hLeVcMcrRw.png" /></figure><p>Restart Dolt:</p><p>sudo systemctl restart beads-dolt</p><p>Check status:</p><p>sudo systemctl status beads-dolt --no-pager</p><p>Verify the database is still visible:</p><p>mysql -h 127.0.0.1 -P 3306 -u root -e &quot;SHOW DATABASES;&quot;</p><h4>Troubleshooting: Permission denied When Listing the Data Directory</h4><p>After running:</p><p>sudo chmod 750 /mnt/disks/beads-data</p><p>a normal SSH user may get:</p><p>ls: cannot open directory &#39;/mnt/disks/beads-data&#39;: Permission denied</p><p>That is expected. The directory belongs to beads-dolt.</p><p>Use:</p><p>sudo ls -la /mnt/disks/beads-data</p><p>The Dolt service still works because it runs as beads-dolt.</p><h4>About the secure_file_priv Warning</h4><p>Dolt logged this warning:</p><p>secure_file_priv is set to &quot;&quot;, which is insecure.</p><p>It also warned:</p><p>Any user with GRANT FILE privileges will be able to read any file which the sql-server process can read.</p><p>This warning did not block functionality.</p><p>We checked whether Dolt 2.0.3 exposed a direct flag:</p><p>dolt sql-server --help | grep -i secure</p><p>The output showed TLS-related settings, but not a direct secure-file-priv option:</p><p>listener.require_secure_transport</p><p>listener.tls_cert</p><p>listener.tls_key</p><p>So we left the service as-is.</p><p>This is acceptable for the current architecture because:</p><ul><li>Dolt runs as beads-dolt, not root</li><li>Dolt listens only on 127.0.0.1</li><li>the VM has no external IP</li><li>developers must have IAM/IAP/SSH access before reaching SQL</li><li>the data directory permissions are restricted</li></ul><p>Verify no accidental systemd override was active:</p><p>sudo systemctl cat beads-dolt</p><p>The clean active command was:</p><p>ExecStart=/usr/local/bin/dolt sql-server --data-dir /mnt/disks/beads-data --host 127.0.0.1 --port 3306</p><h3>13. Final Verification</h3><p>On the VM, check service status using sudo systemctl status beads-dolt --no-pager :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XPouuD_OdNqrUfXdw6cUDA.png" /></figure><p>Check the listener sudo ss -ltnp | grep 3306 :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pZjXNxuxNDiOc1fHqrM_nA.png" /></figure><p>Inspect the data directory sudo ls -la /mnt/disks/beads-data :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPPs4fCg-yQQlqIJooCq1w.png" /></figure><p>List databases mysql -h 127.0.0.1 -P 3306 -u root -e &quot;SHOW DATABASES;&quot; :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*v7aUW5aoWQ5PzEjurnM6UQ.png" /></figure><h3>14. Conveniences</h3><p>After the setup, we created a shareable tunneling script for developers to use when wanting to connect to the remote Beads database. I can’t share the script directly since it contains a few confidential details like our project ids and instance ids, but I believe you can scrape a script together from the snippets in this article quite easily.</p><p>The daily developer workflow is now something like this:</p><ol><li>Start the tunnel:</li></ol><p>beads-tunnel</p><p>2. In another terminal, enter the Beads project:</p><p>cd /path/to/beads/project</p><p>3.a. If it is an existing project, use the Beads commands directly.</p><p>bd status</p><p>3.b. For a new project/database, create a directory:</p><p>mkdir -p ~/projects/my-new-beads-project &amp;&amp; cd ~/projects/my-new-beads-project</p><p>Initialize Beads:</p><p>bd init --server --external --database my_new_beads_project --server-host 127.0.0.1 --server-port 13306</p><p>3.c. For a locally new project but with an existing Beads database (e.g. new developer joining):</p><ul><li>(Git clone)</li><li>If the repo already contains the Beads metadata/config and you have the tunnel open, you can usually go straight to bd status</li><li>If the Beads metadata is corrupted/missing (e.g. gitignored) or you just want to use Beads outside of a specific project for collaboration, you can use bd init --server --external --database remote_beads_project --server-host 127.0.0.1 --server-port 13306 (<strong>IMPORTANT: </strong>the database name should match the remote database name)</li><li>If not in a tracked repository, when Beads asks Contributing to someone else&#39;s repo? [y/N]: the new developer should answern .</li><li>That’s it!</li></ul><h3>15. Recommended Next Hardening Steps</h3><ol><li>Add a snapshot schedule for google-beads-disk.</li><li>Restrict IAP and OS Login IAM to a specific developer group.</li><li>Document Beads database naming conventions.</li><li>Monitor disk usage with df -hT /mnt/disks/beads-data.</li><li>Keep OS packages updated with sudo apt-get update and sudo apt-get upgrade.</li></ol><h3>Conclusion</h3><p>Thank you for reading through! I hope this article provided enough detail into how we provisioned a Beads server using GCP so you can do the same in your context.</p><p>In summary:</p><ul><li>Provision a VM with a persistent (and fast) disk</li><li>Define your networking and access protocol to your security preferences (we used GCP’s IAP tunneling via gcloud and 2FA)</li><li>Ensure external connections are available for the VM (via e.g. Cloud NAT) for package installations</li><li>Install and run Dolt (we used systemd with a specific user role)</li><li>Create a tunnel to your VM (gcloud compute ssh)</li><li>Point Beads to your tunnel (bd init --server --external --database remote_beads_project --server-host 127.0.0.1 --server-port 13306 )</li></ul><p>I’m sure there are plenty of optimizations to be made here, but this simple setup was enough for us. You could utilize Cloud Run for more cost-effectiviness for example. I’ll leave these up to you :)</p><p>Happy vibing! -R</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5268f4dc2ddc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SemaTree: Semantically Structured LLM Knowledge Base]]></title>
            <link>https://medium.com/@roope.paukku/agentindex-navigable-semantic-file-trees-for-complex-information-retrieval-with-ai-agents-e96469760e93?source=rss-5b2a7f17bfc8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e96469760e93</guid>
            <category><![CDATA[mcp-server]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-search]]></category>
            <category><![CDATA[research]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Roope Paukku]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:13:42 GMT</pubDate>
            <atom:updated>2026-04-05T21:28:21.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5nnuDTaGolkxk4wJ" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>TL;DR: Yes, it works. By up to 19% better than Hybrid RAG in complex scenarios. But, there are buts.</blockquote><p><strong><em>GitHub</em></strong><em>: </em><a href="https://github.com/paukkroa/SemaTree">https://github.com/paukkroa/SemaTree</a></p><p>I have been working with Information Retrieval for AI for a few years now, and I have been ever-increasingly frustrated with some unsolved issues in the field. So, welcome to my attempt at finding something <em>better</em>.</p><p>I think it’s best to introduce myself first. I have been working with AI ever since ChatGPT emerged back in 2022. I have done two prior research papers regarding AI (<a href="https://urn.fi/URN:NBN:fi:tuni-202405095616">GenAI in Supporting Business Intelligence Management</a> &amp; <a href="https://urn.fi/URN:NBN:fi:tuni-2025112610970">GenAI in Requirements Engineering</a>) and have worked as an AI consultant for the past few years, recently focusing on AI information management and discovery systems.</p><p>I believe my path regarding AI information retrieval has been pretty standard, starting from simple vector similarity based retrieval-augmented generation (RAG), moving up towards Hybrid RAG, which combines keyword matching with the prior method to provide a “best-of-both-worlds” -approach. I have explored different indexing strategies (e.g. semantical and hierarchical) and some more recent methods which have shown promise, such as <a href="https://pageindex.ai/blog/pageindex-intro">PageIndex</a>. Then, as AI agents have came along, listing, finding and grepping files (aka Agentic Search) has proven to be a fantastically reliable, although a bit expensive method of Information Retrieval within contexts such as codebases.</p><p>Along this path I have started to sense that traditional RAG has reached a point where the limitations of flat, similarity-based search paradigms are starting to obstruct the adoption and utilization of autonomous agents. While these traditional retrieval systems were designed to support human-in-the-loop information seeking, agentic workflows (which utilize multi-step reasoning, autonomous tool selection and iterative browsing) raise a need towards structured, machine-navigable knowledge environments. For example, <a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">Anthropic (2025)</a> and <a href="https://pageindex.ai/blog/pageindex-intro">PageIndex (Zhang &amp; Tang, 2025)</a> have demonstrated that agentic search can beat traditional rag in complex information retrieval using appropriate tools and the logic provided by LLMs.</p><p>While some solutions have risen to address the needs of the agentic era, all of the major current approaches I have discovered have their limitations. I propose <strong>SemaTree</strong> as a new framework to provide a semantically hierarchical information retrieval logic that aligns with the recursive reasoning capabilities of modern large language models (LLMs).</p><p>Welcome to this semi-scientific proposal and evaluation article, let’s dive in!</p><h3>Background</h3><h4><strong>What are the issues with current methods of Information Retrieval for AI?</strong></h4><p>Let’s back up a bit first. The primary mechanism for grounding LLMs in external knowledge has long been the RAG pipeline, which relies on the segmentation of documents into discrete chunks and converting these into dense vector embeddings. However, as the scale of data increases, the reliance on cosine similarity within a high-dimensional vector space begins to falter. “Semantic masking” occurs when the knowledge base contains sentences that are semantically identical to the query but belong to an entirely different context, misleading the model (Shi &amp; Penn, 2025). This is particularly prevalent in datasets involving numeric values, code snippets, or highly standardized legal and medical terminology where surface-level matches are frequent but distinct in meaning. Additionally, the structural context of the original document is often lost during the chunking process, leading to semantic fragmentation where the relationship between a paragraph and its broader section or chapter is severed.</p><p>It might not be enough to retrieve the correct chunk either. For example, the U-NIAH framework emphasizes that retrieval noise and reverse chunk ordering are significant drivers of performance degradation (Gao et al., 2025). When an agent retrieves a set of top-k chunks that are presented in an order that contradicts their original narrative or logical flow, the model’s ability to reason over that evidence is compromised. This necessitates a retrieval framework that preserves the structural hierarchy of the data, ensuring that “local” facts are always situated within their “global” context.</p><p>One popular approach has already stepped into this area – <a href="https://www.ibm.com/think/topics/graphrag">GraphRAG</a>. By introducing a relational layer, connecting individual text units into local and global communities, <a href="https://www.ibm.com/think/topics/graphrag">GraphRAG</a> allows an agent to reason about the whole dataset and smaller communities within it. However, while GraphRAG provides an associative hierarchy, it is not logically navigable. It can tell you that Component A is related to Feature B, but it doesn’t understand that Component A lives inside a specific directory and that its logic is governed by a parent configuration file three levels up.</p><p>When we look at most enterprise data, it is often not just a web of entities, but rather it is usually a logical hierarchy. You need to know where you started in order to know what the current piece of information <em>means</em>. This calls for a different approach when compared to GraphRAG.</p><p>When autonomous agents transition from internal knowledge bases to the open web, the retrieval challenges shift from document chunking to the navigation of opaque and often deceptive architectures. Current web agents often lack in-domain knowledge about the websites they operate on, forcing them to rely on a trial-and-error strategy that is computationally expensive and prone to premature task abandonment. (Spiegel &amp; Horák, 2024)</p><p>In addition, while the Universal Resource Locator (URL) was designed as a human-readable address, the evolution of web development has led to structures that are increasingly difficult for AI agents to parse and navigate. Modern websites often utilize hashed addresses, query parameters, or dynamically generated paths that provide no semantic cue as to the content or hierarchy of the destination page. When agents encounter opaque URLs, the inference cost increases as the model must repeatedly invoke tool calls to “look” inside the page before deciding its relevance. In multi-step web tasks, these costs accumulate, as each tool execution requires an additional LLM forward pass, leading to substantial computational overhead. (Jia &amp; Li, 2025)</p><p>All the while Agentic Search has gained popularity especially in software development environments. Yet no real approaches exist to specifically tailor knowledge bases for this new, highly promising paradigm.</p><h4><strong>Current solutions</strong></h4><p>Prior attempts to transform knowledge into an AI-friendly format, such as <a href="https://llmstxt.org/">llms.txt </a>and <a href="https://pageindex.ai/blog/pageindex-intro">PageIndex</a>, have laid important groundwork but remain limited by maintenance challenges and structural dependencies. The llms.txt file is envisioned as a Markdown-based “context guide” placed at the root of a domain to help AI systems prioritize content (<a href="https://www.allmo.ai/articles/llms-txt">Allmo, 2026</a>). However, the practical adoption of llms.txt is remarkably low, with only 0.3% of the top 1,000 websites implementing the file as of early 2026 (<a href="https://www.allmo.ai/articles/llms-txt">Allmo, 2026</a>) and many major AI crawlers do not even check for these files in the first place (<a href="https://www.hungryram.com/blog/llms-txt-hype-vs-reality-web-design-agency-perspective">Hungry Ram Web Design, 2026</a>). From a structural perspective, llms.txt often only provides a narrow context that fails to capture the full complexity of a site (<a href="https://www.mintlify.com/blog/real-llms-txt-examples">Mintlify, 2026)</a>.</p><p><a href="https://pageindex.ai/blog/pageindex-intro">PageIndex</a>, which has already been referred to for quite a few times, is a reasoning-based RAG system that builds a hierarchical tree index from long documents. While highly effective for individual documents, achieving a remarkable 98.7% accuracy on FinanceBench, it unfortunately does not provide the means for managing large knowledge bases of hundreds or thousands of documents. PageIndex is heavily reliant on the presence of a pre-existing Table of Contents or clear Markdown header levels to determine the hierarchy of a document. In documents converted from PDF or HTML where this structure is lost, or in documents where it is not implemented correctly in the first place, the system requires proprietary OCR tools to reconstruct the hierarchy. SemaTree seeks to generalize the strengths of PageIndex while removing these dependencies.</p><h4><strong>Blast from the past — semantic file trees</strong></h4><p>The core of SemaTree is based around the idea of semantic file trees. Semantic file trees are rooted in decades of operating systems research focused on moving beyond physical location-based storage. The formal notion of a Semantic File System (SFS) was introduced by David Gifford and colleagues in 1991. Gifford defined SFS as an information storage system that provides “flexible associative access” to its contents by automatically extracting attributes from files. This early work demonstrated that semantic organization could significantly improve findability and add expressive power to command-level programming, providing a more effective storage abstraction than rigid trees.</p><p>The vision expanded in the 2000s toward the “Semantic Desktop,” drawing on Vannevar Bush’s “Memex” to integrate desktop data with the Semantic Web using ontologies and metadata tags. However, these systems often required intensive manual tagging or specialized APIs that hindered interoperability. The modern resurgence of this field (and also an inspiration to SemaTree) is the LLM-based Semantic File System (LSFS) (Shi et al., 2024), which leverages the reasoning capabilities of LLMs to automate file management through natural language prompts. Recent experiments show that LSFS can achieve a 15% retrieval accuracy improvement and 2.1x higher retrieval speed compared to traditional file systems. This shift situates the file system as a foundational layer in the “LLM-as-OS” paradigm, where the LLM acts as a kernel orchestrating context, tools, and agents.</p><p><em>Now to the fun stuff.</em></p><h3>SemaTree</h3><p>SemaTree takes these foundations and expands them into the world of reasoning agents. SemaTree emerges from the core ideas of agentic search and semantic file trees.</p><p>The key idea is to build navigable knowledge bases, which are organized structurally by meaning and expand from top to bottom. Simultaneously, SemaTree aims to provide the agents the best methods to discover the correct information. Thus, SemaTree is built by design for Agentic OS’.</p><p>SemaTree works by building semantical graphs which begin from the root of the knowledge base and expand through nodes such as folders and documents. This way, the agent can discover top level categories, such as “Technical Documentation”, “HR” and “Legal”, and then drill down further. SemaTree maintains descriptive names and summaries for nodes. Nodes however do not contain the actual full content of the documents they are built on, rather these can be fetched live when the agent is ready. This allows quick, token-efficient traversal through listing node names and reading node summaries (few sentences max), allowing the agent to discover the correct node(s) efficiently without ever reading the full content of them.</p><p><strong>The index</strong> can be built as a physical file tree or as a database. Creating the structure as a physical file tree allows for nice things such as version tracking, compression and easy maintenance, but databases may offer scale, performance and availability benefits worth considering. As we do not store the actual content of the documents, the size of the nodes remains manageable. This also allows for single-source-of-truth for the actual content storage, as the index only contains references to the actual files (local or remote). This means that we can for example index websites natively and fetch the live content at runtime, which can be good for highly dynamic sites, such as news outlets.</p><p>SemaTree’s indexing algorithm works as follows:</p><ol><li>The framework ingests flat content, e.g. HTML/Markdown from the web or local sources. Different file format parsers allow the ingestion of multiple file types.</li><li>An LLM analyses all document/page titles and metadata to build a “Skeleton Tree” of nodes. It ignores raw URL structures and generates a human-logical hierarchy (e.g., grouping all “Cloud Providers” under a single node). The node names generated may differ from the ones in the source material.</li><li>All nodes are summarized bottom-up. Leaf nodes (documents) get a more detailed summary. Parent nodes (folders) get a “Summary-of-Summaries”, allowing an agent to understand an entire branch of the tree without entering it.</li><li>The tree is persisted as a physical directory structure, which enables easy sharing and version control, or as a database structure.</li></ol><p>Here is an example of what the indexed tree could look like:</p><pre>```<br>my-docs/<br>├── _meta.json<br>├── _summary.md<br>└── topic-name/<br>    ├── _summary.md<br>    ├── getting-started/<br>    │   ├── _summary.md<br>    │   ├── installation.md<br>    │   └── quickstart.md<br>    ├── configuration/<br>    │   ├── _summary.md<br>    │   ├── environment-variables.md<br>    │   └── provider-setup.md<br>    └── api-reference/<br>        ├── _summary.md<br>        ├── authentication.md<br>        └── endpoints.md<br>└── another-topic/<br>    ...<br>```</pre><p>Each node contains _meta.json and _summary.md implementations. _meta.json contains basic information:</p><pre>```json<br>{<br>  &quot;version&quot;: &quot;1.0&quot;,<br>  &quot;created_at&quot;: &quot;2025-01-15T10:30:00+00:00&quot;,<br>  &quot;updated_at&quot;: &quot;2025-01-15T10:30:00+00:00&quot;<br>}<br>```</pre><p>_summary.md files contain the summaries and other navigation-related data of the nodes. For leaf nodes, the _summary.md may look like this (using YAML Frontmatter):</p><pre>```yaml<br>---<br>id: 0.0.1.2<br>title: &quot;Environment Variables&quot;<br>nav_summary: &quot;All supported env vars and their defaults&quot;<br>ref: https://docs.example.com/config/env-vars<br>ref_type: url<br>---<br><br># Environment Variables<br><br>&lt;detailed AI-generated summary of the page content&gt;<br><br>[Link to original](https://docs.example.com/config/env-vars)<br>```</pre><p>Folder nodes’ _summary.md contains a nav_summary, which is the “Summary-of-Summaries”, enabling “peeking” into the graph without entering it:</p><pre>```<br>  &lt;!-- nav_summary: Install, configure, and run your first index --&gt;<br><br>  Getting Started covers the full onboarding workflow...<br>  ```</pre><p><strong>Retrieval</strong> is enabled through a set of tools provided for the AI agent. In the evaluation section, I tested multiple different tooling strategies to discover an optimal set of tools for the agent. Generally, the tools include a listing tool with a depth parameter, which can list names and possibly summaries of nodes, as well as a find tool enabling node discovery via pattern matching, and read tools for retrieving the node summary and the actual content of the file/url represented by the node. This approach enables the semantic file tree to always point to the latest version of a website or a document, regardless of when the indexing has been made.</p><p>Our example toolset contains the tools <em>ls</em>,<em> find</em>,<em> get_summary </em>and<em> get_details</em>. Here are some example usages:</p><pre>### `ls(path, depth, include_summaries)`<br><br>**Example output (`ls(&quot;/&quot;, depth=1)`):**<br>```<br>📁 /<br><br>### Subdirectories:<br>- **claude-docs/**<br>- **python-tutorial/**<br>```<br><br>### `find(pattern)`<br><br>**Example output (`find(&quot;auth&quot;)`):**<br>```<br>### Search results for &#39;auth&#39;:<br><br>📁 /claude-docs/security<br>  - authentication.md<br>  - authorization.md<br>```<br><br>### `get_summary(path)`<br><br>**Example output (`get_summary(&quot;/claude-docs/configuration/environment-variables.md&quot;)`):**<br>```<br>---<br>id: 0.0.2.1<br>title: &quot;Environment Variables&quot;<br>nav_summary: &quot;All supported env vars and their defaults&quot;<br>ref: https://docs.example.com/config/env-vars<br>ref_type: url<br>---<br><br># Environment Variables<br><br>Covers CLAUDE_API_KEY, CLAUDE_MODEL, MAX_TOKENS, and all other<br>supported environment variables. Includes default values and examples<br>for each provider (Ollama, Gemini).<br>```<br><br>---<br><br>### `get_details(path)`<br><br>Fetches the **full, live content** of a document from its original source.<br></pre><p>This approach enables the agent to traverse the tree while fully controlling the contextual cost. Nonetheless, tool-based travelsal will incur more output token-costs than traditional RAG.</p><h3><strong>Evaluation of SemaTree</strong></h3><p>Sounds cool right, but you’re not sold yet, right? That’s good because neither was I. We need to carefully evaluate the framework to see if it actually offers any benefit over the existing solutions, especially considering the token-costs required for the tool calls and interpreting their results. If you’re just interested in if SemaTree is any good, feel free to skip ahead to results. Otherwise, here we go.</p><p>I formed 5 hypotheses which could be tested via comparative analysis against the current gold-standard method, Hybrid RAG (BM25). The hypotheses are supported by scientific literature and my own empirical observations of LLM behavior in retrieval tasks.</p><blockquote><strong>H1</strong>: AgenticIndex retrieves the gold standard documents more often than Hybrid RAG</blockquote><blockquote><strong>H2</strong>: AgenticIndex retrieves less noise than Hybrid RAG in large knowledge bases with multiple semantic areas</blockquote><blockquote><strong>H3</strong>: AgenticIndex can provide more complete answers than Hybrid RAG</blockquote><blockquote><strong>H4</strong>: Simple AgenticIndex (2 tools) leads to performance gains when compared to complex AgenticIndex (3 tools)</blockquote><blockquote><strong>H5</strong>: Concise micro-summaries alongside the list command provides more efficient agentic search (fewer tool calls) than listing by name and using separate commands for summary and content retrieval.</blockquote><p>To test these hypotheses, agent generated answers were evaluated via calculated metrics (keyword and semantic similarity) and blind testing (precision, recall) against predefined “gold-answers”. The research setup utilized a noise-rich 450-document dataset meant to simulate a heterogeneous enterprise knowledge base. The dataset contained the Claude Code documentation as the main corpus, the OpenAI Codex documentation as a similar corpus to Claude Code’s documentation, the Python 3 Library documentation to add technical noise and just for pure noise, a corpus of different dog breeds scraped from Purina’s website. A set of 40 questions and their gold-answers was created from the Claude Code documentation. The questions spanned four different categories to evaluate the systems across different types of tasks:</p><blockquote><strong>SF</strong> (Single-Fact): The answer is a specific value or string (like a config path) found in one place.</blockquote><blockquote><strong>MH</strong> (Multi-Hop): Requires finding a reference in one doc (e.g., “See Sandboxing”) and then navigating to that second doc to find the final answer.</blockquote><blockquote><strong>COMP</strong> (Comparison): Requires the agent to visit two distinct branches of the index (e.g., “AWS Bedrock”vs “Google Vertex”) and synthesize a comparison.</blockquote><blockquote><strong>PROC</strong> (Procedural): Requires a sequence of steps. These often fail if the agent summarizes too much and misses a “boring” but vital step (like npm install).</blockquote><p>The optimal toolset was also evaluated by running the experiment on three different toolsets (<strong>Explicit</strong>, <strong>Navigational</strong>, <strong>Simplified</strong>). The simplified toolset contained a listing tool, providing just the names of the nodes and a read tool to fetch the full content of the original document. The navigational toolset differed from the simplified strategy by providing node summaries alongside the names in the list tool’s response. The explicit toolset contained a list tool providing just the names of the nodes, a get_details tool to get the full content and a get_summary tool to just get the summary of a node. The idea behind the explicit toolset was to allow the AI agent to have full control over the contextual cost of each tool call. All of the strategies also contained a “Find” tool for pattern matching names of documents, but not searching the content within them.</p><p>Each setup was trialed twice, so we got a total of 40 questions * 2 trials * 4 methods = 320 experiments. The experiments were run locally using a simple ReAct agent with Qwen3:8b on a M1 Pro Macbook Pro. All configurations used the same knowledge base which was indexed on a prototype version of SemaTree. Hybrid RAG used a local ChromaDB instance as the vector database, all-MiniLM-L6-v2 as the embedding model with 512 token chunks with 50 token overlap. The Hybrid RAG retrieval was implemented via a hybrid configuration combining vector similarity with BM250kapi-algorithm to find chunks with the highest frequency of the specific words used in the question. The results from both retrieval methods were reranked using RRF with the k-value set to 60. Top-K was set to 5.</p><p>The code for the prototype indexer, the evaluation script, the result data itself and some other things, like an MCP server with the <strong>Explicit</strong> toolset (perhaps a spoiler?) are available at this repo: <a href="https://github.com/paukkroa/SemaTree">https://github.com/paukkroa/SemaTree</a></p><h3>Results</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2VYHUQSonFoa8EMpM4fgg.png" /><figcaption>Figure 1: Overall automated metrics</figcaption></figure><p>Let’s start with the automated metrics (figure 1). SemaTree seems to perform quite similarly regardless of the toolset configuration. Semantic similarities are within the margin of error in all toolsets and in Hybrid RAG (0.75–0.78), but Hybrid RAG has a slightly better keyword recall value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOngLlUcL3Go8imkJiWuZQ.png" /><figcaption>Figure 2: Blind test evaluation scores</figcaption></figure><p>In terms of precision and recall from the blind test, the agent equipped with the explicit toolset performed on par with Hybrid RAG (figure 2). This shows that the Explicit toolset performs more accurately than the other toolset strategies. Also, while Hybrid RAGs keyword recall was higher in figure 1, we can see that in terms of raw accuracy SemaTree can perform on par with it. This means that SemaTree produced answers’ can be equally correct and complete even if the answer’s style and word choices might differ from the source material, where in Hybrid RAG they might be more reflective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o8EuKhxf_qDqnFO6kYiAWg.png" /><figcaption>Figure 3: Keyword match by category</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8O9AxsRqh9Hmj79nqnkCow.png" /><figcaption>Figure 4: Semantic similarity by category</figcaption></figure><p>Taking a look at the question-category-wise results in keyword recall and semantic similarity (figures 3 and 4), we can see that hybrid RAG scores decrease a little bit in the COMP (comparison) and PROC (procedural) categories, which might indicate that the system might work better in simpler questions. For SemaTree however, we can see that it is less affected by the complex question categories, and actually score higher than Hybrid RAG in semantic similarity in the COMP and PROC categories. The Explicit toolset shines here as well.</p><p>Let’s take a look at the blind test results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rv8aHQPk9qoeQifNy6gkNQ.png" /><figcaption>Figure 5: Precision by category</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cs0C9rF0pOUv6baKhHUEPw.png" /><figcaption>Figure 6: Recall by category</figcaption></figure><p>What we can see from figures 5 and 6 is that while hybrid RAG still works better for single fact retrieval, AgenticIndex matches or beats it in the more complex question categories, especially with the Explicit toolset strategy.</p><p>In the procedural category, which requires more reasoning and detail than the other categories, we can see that the <em>agentic-explicit</em> configuration is the clear winner in terms of both precision and recall, <strong>improving up to around 18% in precision and 19% in recall when compared to Hybrid RAG</strong>. It even reaches a <strong>precision of 1.00 in the MH category</strong>. This can indicate that SemaTree and reasoning based search overall might work better for complex and detailed information retrieval, while Hybrid RAG still proves to be the faster and more precise method for simple fact retrieval.</p><p>As for the hypotheses, we actually have some surprises:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JLaQKkNQqMlpsLnxNYc2Mg.png" /><figcaption>Table 1: Hypothesis results</figcaption></figure><p>Most importantly, hypothesis H4 was rejected. The simplified toolset consistently performed worst, whereas the explicit toolset, giving full context-cost control to the agent, performed the best. This makes sense since it allows the agent to choose a lookup strategy of their choice (e.g. <em>top-down</em>, <em>drill-down</em>, <em>find-then-drill</em>, <em>peek-before-fetch</em>) in relation to the given task. I believe this supports the ever increasing evidence of agentic reasoning capabilities of modern LLMs, meaning they are best at knowing what context they need.</p><p>Overall, it seems that SemaTree proves that agentic search in combination with semantic filetress has great potential for complex information retrieval. It is able to reduce noise dramatically while maintaining similar or better accuracy in most scenarios and outshining traditional Hybrid RAG in complex queries.</p><p>The results do not disprove Hybrid RAG’s use either. Rather, these two approaches could complement each other and provide massive gains when combined. I would still recommend Hybrid RAG for single fact retrieval due to its high accuracy and efficiency in those scenarios. SemaTree can complite hybrid RAG by providing more accurate and less noisier information retrieval in complex retrieval scenarios, which might require combination of information from multiple distinct yet similar sources or reasoning about where the contextually correct piece of information is located.</p><h3>Conclusions and what’s next</h3><p>SemaTree’s goal was to shift from a flat, similarity based retrieval towards hierarchical, machine navigable environments. SemaTree achieved this by constructing semantic file trees from unstructured data. The results show that while traditional Hybrid RAG is still accurate and efficient for simple single fact retrieval, SemaTree exceeds it in complex query scenarios.</p><p>SemaTree dramatically reduced the amount of noise from 3.9–4.2 retrieved sources per query to only around <strong>1.17 sources per query</strong>, while surpassing accuracy in comparison and procedural tasks by <strong>up to 19%</strong>. The results also show that giving the agent full control over listing nodes and getting summaries versus the full content produced the best results. Therefore, SemaTree shows great promise for the future of complex knowledge bases and context management with the ever-increasing adoption of AI agents.</p><p>As this prototype and research were just proof-of-concepts, further research and development is needed. While tested on a 450-document dataset, research is needed to determine if the current logic remains navigable when scaled to enterprise levels (100,000+ documents) without exceeding agent reasoning limits. The results also remained inconclusive about whether embedded micro-summaries help or hinder search efficiency. Further studies should investigate if summaries act as “distractors” that lead agents down irrelevant paths.</p><p>Also, inference cost optimization is a key issue with SemaTree. Further research is needed to quantify the trade-off between the increased LLM forward passes required for tree navigation versus the reduced token cost of retrieving only the most relevant documents.</p><p>Further development should focus on integrating SemaTree with pre-existing agentic frameworks and standards. Production-ready deployments would also require numerous features in addition to the current prototype, such as the ability to update the semantic structure of the knowledge base and the contents of nodes when source information changes.</p><p>Version control could be beneficial for the agents to understand how the data has changed. Integration with a solution like <a href="https://github.com/dolthub/dolt">Dolt</a>, which is a database that supports version control, could benefit the system and reduce the need to maintain the knowledge base as a physical file tree.</p><p>Furthermore, the system could be expanded to support more efficient vector search for single fact retrieval alongside the more complex agentic search, which would require multi-kernel support. But this is just a technical challenge which I’m sure any coding agent can handle.</p><h3>Finally</h3><p>While I am beginning the journey of bringing these improvements to life myself, I recognize that the potential of this idea is far greater than one person can realize alone. I’m proud to have discovered this (seemingly) novel framework but I also hope that other creators will start experimenting with this as well and contribute to this exciting and emerging area of technology. Let’s make information retrieval better together.</p><p>Thanks for reading!</p><p>Please cite this as:</p><blockquote>Paukku, R. 2026. SemaTree: Navigable Semantic File Trees for Complex Information Retrieval with AI Agents. Medium.com.</blockquote><p><strong>GitHub</strong>: <a href="https://github.com/paukkroa/SemaTree">https://github.com/paukkroa/SemaTree</a></p><h3>Sources</h3><p>Allmo. 2026. LLMs.txt for AI Search Report 2026.</p><p>Anthropic. 2025. Effective Context Engineering for AI Agents. Available (2.3.2026): <a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents">https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents</a></p><p>Gao, Y., Xiong, Y., Wu, W., Li, B., Zhong, Y., &amp; Wang, H. (2025). U-niah: Unified rag and llm evaluation for long context needle-in-a-haystack. ACM Transactions on Information Systems.</p><p>Hungry Ram Web Design. 2026. llms.txt: The Hype vs Reality.</p><p>IBM. 2026. What is GraphRAG?. https://www.ibm.com/think/topics/graphrag</p><p>Jia, J., &amp; Li, Q. (2025). AutoTool: Efficient Tool Selection for Large Language Model Agents. arXiv preprint arXiv:2511.14650.</p><p>Mingtian Zhang, Yu Tang &amp; PageIndex Team. 2025. PageIndex: Next-Generation Vectorless, Reasoning-based RAG. PageIndex Blog.</p><p>Mintlify. 2026. Real llms.txt examples from leading tech companies (and what they got right).</p><p>Shi, K., &amp; Penn, G. (2025, January). Semantic masking in a needle-in-a-haystack test for evaluating large language model long-text capabilities. In Proceedings of the First Workshop on Writing Aids at the Crossroads of AI, Cognitive Science and NLP (WRAICOGS 2025) (pp. 16–23).</p><p>Shi, Z., Mei, K., Jin, M., Su, Y., Zuo, C., Hua, W., … &amp; Zhang, Y. (2024). From commands to prompts: Llm-based semantic file system for aios. arXiv preprint arXiv:2410.11843.</p><p>Spiegel, M., &amp; Horák, A. (2024). WebMap: Improving LLM Web Agents with Semantic Search for Relevant Web Pages. In RASLAN (pp. 139–152).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e96469760e93" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>