<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Derek.net.au</title>
	<atom:link href="https://www.derek.net.au/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.derek.net.au</link>
	<description></description>
	<lastBuildDate>Wed, 01 Oct 2025 12:12:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Screeps LLM Agent</title>
		<link>https://www.derek.net.au/logs/screeps-llm-agent/</link>
					<comments>https://www.derek.net.au/logs/screeps-llm-agent/#respond</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Fri, 01 Aug 2025 03:55:29 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.derek.net.au/?p=101</guid>

					<description><![CDATA[✅ Architecture Plan Architecture Plan Official Screeps Server Screeps API (HTTPS) &#124; v Local "Brain" (Node.js + LLM) &#124; ------------------+--------------------- &#124; &#124; Live Commands via API Code Edits on Disk (Memory updates, spawn orders) (LLM rewrites / optimizes JS files) A. Screeps API Integration Use the screeps-api NPM package. npm install screeps-api node-fetch const {...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/screeps-llm-agent/" title="Read Screeps LLM Agent">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>✅ Architecture Plan</p>



<h2 class="wp-block-heading">Architecture Plan</h2>



<ol class="wp-block-list">
<li>Data Flow Overview</li>
</ol>



<pre>Official Screeps Server  <--->  Screeps API (HTTPS)
                                    |
                                    v
                        Local "Brain" (Node.js + LLM)
                                    |
                  ------------------+---------------------
                  |                                    |
        Live Commands via API                 Code Edits on Disk
    (Memory updates, spawn orders)     (LLM rewrites / optimizes JS files)
</pre>



<p></p>



<ol start="2" class="wp-block-list">
<li>Core Components<br></li>
</ol>



<p>A. Screeps API Integration</p>



<p>Use the screeps-api NPM package.</p>



<pre class="wp-block-code"><code>Install:</code></pre>



<p>npm install screeps-api node-fetch</p>



<pre class="wp-block-code"><code>Basic Setup:</code></pre>



<p>const { ScreepsAPI } = require(&#8216;screeps-api&#8217;);<br>const api = new ScreepsAPI({<br>email: &#8216;you@email.com&#8217;,<br>password: &#8216;yourPassword&#8217;,<br>serverUrl: &#8216;https://screeps.com&#8217; // official server<br>});</p>



<p>(async () =&gt; {<br>await api.auth();<br>const memory = await api.memory.get(&#8216;brainInput&#8217;);<br>console.log(&#8216;Current Memory:&#8217;, memory.data);<br>})();</p>



<p>You’ll use:</p>



<pre class="wp-block-code"><code>api.memory.set() to push game state snapshots to the LLM or receive commands back.

api.rawSegment for larger data packets if needed.</code></pre>



<p>B. Local LLM Processing</p>



<p>Your local model (Ollama/DeepSeek) runs continuously:</p>



<pre class="wp-block-code"><code>Polls Screeps API every X ticks (say every 10 seconds).

Reads game state (brainInput).

Generates:

    Immediate orders (e.g., {spawn: &#91;{role:'miner',room:'W1N1'}]}).

    Suggestions for code changes (e.g., "optimize miner.js to use path caching").</code></pre>



<p>Example prompt snippet:</p>



<p>const prompt = <code>Game state: ${JSON.stringify(memory.data)} 1) Suggest immediate orders in JSON (no text). 2) Suggest code optimizations if needed (which file, what to change). </code>;</p>



<p>C. Writing Commands Back</p>



<p>Push orders directly:</p>



<p>await api.memory.set(&#8216;brainOutput&#8217;, JSON.stringify(orders));</p>



<p>Then, in your Screeps code:</p>



<p>if (Memory.brainOutput) {<br>executeOrders(JSON.parse(Memory.brainOutput));<br>delete Memory.brainOutput;<br>}</p>



<p>D. Local Code Editing</p>



<p>Since you’re syncing code with the official server:</p>



<pre class="wp-block-code"><code>The LLM generates code patches (JS diffs or full file replacements).

Node.js applies changes to the local /scripts folder.

Screeps’ official client auto-syncs these changes.</code></pre>



<p>Example:</p>



<p>const fs = require(&#8216;fs&#8217;);<br>function updateFile(file, newCode) {<br>fs.writeFileSync(<code>./screeps/scripts/${file}</code>, newCode, &#8216;utf8&#8217;);<br>console.log(<code>${file} updated, syncing with Screeps...</code>);<br>}</p>



<p>You can even have the LLM generate diffs:</p>



<h3 class="wp-block-heading">File: miner.js</h3>



<p>Replace function runMiner with:</p>



<p>function runMiner(creep) {<br>if(!creep.memory.path) {creep.memory.path = creep.pos.findPathTo(Game.sources[0]);}<br>if(creep.harvest(Game.sources[0]) == ERR_NOT_IN_RANGE) {<br>creep.moveByPath(creep.memory.path);<br>}<br>}</p>



<p>Your Node.js script parses this and rewrites the file.</p>



<ol start="3" class="wp-block-list">
<li>Recommended Flow Every 10–20 ticks: <code>Pull game state via API → LLM → push back orders (brainOutput).</code> Every few hours or on trigger: <code>Ask the LLM for code refactors. Save changed files locally → Screeps client auto-syncs.</code> Optional Safety: <code>Auto-commit changes to Git after each edit, in case the LLM breaks something.</code></li>
</ol>
</div>
</div>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/screeps-llm-agent/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Building Emergent Ant Intelligence with Babylon.js and a Local LLM</title>
		<link>https://www.derek.net.au/logs/building-emergent-ant-intelligence-with-babylon-js-and-a-local-llm/</link>
					<comments>https://www.derek.net.au/logs/building-emergent-ant-intelligence-with-babylon-js-and-a-local-llm/#respond</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Wed, 30 Jul 2025 06:39:12 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.derek.net.au/?p=104</guid>

					<description><![CDATA[View the source code on GitHub https://github.com/doctarock/AntBrain Introduction In this project, I set out to build the foundational components of artificial cognition using lightweight agents in a Babylon.js environment. The goal wasn&#8217;t to simulate a human brain, but something simpler and more achievable: a virtual &#8220;ant brain.&#8221; Through step-by-step iterations, I introduced perception, memory, and...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/building-emergent-ant-intelligence-with-babylon-js-and-a-local-llm/" title="Read Building Emergent Ant Intelligence with Babylon.js and a Local LLM">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<p>View the source code on GitHub <a href="https://github.com/doctarock/AntBrain">https://github.com/doctarock/AntBrain</a><br><br><strong>Introduction</strong> In this project, I set out to build the foundational components of artificial cognition using lightweight agents in a Babylon.js environment. The goal wasn&#8217;t to simulate a human brain, but something simpler and more achievable: a virtual &#8220;ant brain.&#8221; Through step-by-step iterations, I introduced perception, memory, and decision-making powered by a local large language model (LLM) running via Ollama.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Step 1: Setting the Scene with Babylon.js</strong> I began by creating a minimal 3D world using Babylon.js. The environment included a simple ground plane and several spheres representing agents (ants). These spheres were animated to move around the space with basic logic, simulating movement across a terrain.</p>



<p><strong>Technologies Used:</strong></p>



<ul class="wp-block-list">
<li>Babylon.js (UMD version for browser compatibility)</li>



<li>Node.js static server (Express)</li>



<li>Custom proxy middleware to handle CORS issues with Ollama</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Step 2: Adding Cognition &#8211; Perception and Memory</strong> Once the world was in place, I gave each agent the ability to perceive its environment. This included checking for nearby agents within a perception radius and logging these encounters in memory.</p>



<p>Each agent maintained:</p>



<ul class="wp-block-list">
<li>A list of recent positions</li>



<li>A memory of other agents it has seen</li>



<li>A log of its own thoughts</li>
</ul>



<p>This memory would serve as the context for decision-making.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Step 3: Integrating the Local LLM</strong> With cognition in place, I hooked up each agent to a local LLM hosted by Ollama. I chose OpenHermes for its conversational tone and ability to stay in character. Each agent constructs a prompt based on its memory and current perception, then sends that prompt to the LLM.</p>



<p>Example prompt:</p>



<pre class="wp-block-code"><code>You are an autonomous agent exploring a virtual world.
You remember: Saw agent 2 nearby.
You currently perceive: Agent 3 at (x, z).
What will you do next and why? Format your answer as:
Action: &lt;...&gt;
Reason: &lt;...&gt;</code></pre>



<p>The LLM&#8217;s response determines the agent&#8217;s next direction of movement.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Step 4: Preventing Overload &#8211; Throttling LLM Requests</strong> Running LLM inference every animation frame quickly overwhelmed the system. To fix this, we throttled each agent to only send a request every 3 seconds. This kept Ollama stable while allowing agents to reflect and act periodically.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Emergent Behavior Observed</strong> Once throttling was in place and OpenHermes was responding correctly, we started seeing surprisingly organic outputs:</p>



<pre class="wp-block-code"><code>Agent 1 thought: Action: Move forward. Reason: To explore the environment and gather information.
Agent 2 thought: Action: Explore the environment. Reason: To gather information and potentially find new resources.</code></pre>



<p>These responses, while simple, represent the foundation of autonomous behavior: perceiving, remembering, and acting with purpose.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>At this stage, the agents demonstrate:</p>



<ul class="wp-block-list">
<li>Local perception</li>



<li>Memory of encounters</li>



<li>LLM-driven decision-making</li>



<li>Individual internal logic and reflection</li>



<li>Co-operation</li>



<li>Shared memory or communication between agents</li>



<li>Goal-setting and prioritization</li>



<li>Emotional or philosophical traits</li>



<li>Planning and resource seeking</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Conclusion</strong> With very little direction, these little characters started talking, working together, sharing and forming their own little (emulated) personalities based off the input gained from the environment. I am very impressed with OpenHermes, it was a lot easier to train than deep-seek and other local llms I have tested.</p>



<p>Stay tuned for the next evolution.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p><strong>Tags:</strong> Babylon.js, Ollama, LLM, AI Agents, Ant Simulation, Emergent Behavior, OpenHermes, Cognitive Architecture</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/building-emergent-ant-intelligence-with-babylon-js-and-a-local-llm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Modding Games is Easier Than Ever – Thanks to AI</title>
		<link>https://www.derek.net.au/logs/modding-games-is-easier-than-ever-thanks-to-ai/</link>
					<comments>https://www.derek.net.au/logs/modding-games-is-easier-than-ever-thanks-to-ai/#respond</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Thu, 17 Jul 2025 06:40:44 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.derek.net.au/?p=99</guid>

					<description><![CDATA[Game modding used to be a bit of a black art. Even for me as a developer, just adding a glowing sword to Skyrim could feel like building a nuclear reactor with duct tape. But that’s changing fast. Now we have large language models (LLMs) like ChatGPT, DeepSeek, and their open-source cousins, modding is suddenly…...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/modding-games-is-easier-than-ever-thanks-to-ai/" title="Read Modding Games is Easier Than Ever – Thanks to AI">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Game modding used to be a bit of a black art. Even for me as a developer, just adding a glowing sword to Skyrim could feel like building a nuclear reactor with duct tape.</p>



<p>But that’s changing fast. Now we have large language models (LLMs) like ChatGPT, DeepSeek, and their open-source cousins, modding is suddenly… approachable. </p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">AI Makes Modding Accessible</h3>



<p>Modding used to start with hours of Googling and forum-diving. Now it starts with:<br><strong>“Hey, how do I add a new weapon to [game name]?”</strong></p>



<p>And you’ll actually get an answer. Step-by-step. Maybe even with example files. Want to know what each parameter in a config file does? LLMs can explain that too. Want to convert a .png into the right texture format? Ask. It’s like having a modding mentor on speed dial—minus the “RTFM” attitude.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">A Simple Example: Minecraft</h3>



<p>Let’s take Minecraft, because it’s wildly popular and heavily modded. Let’s say you want to add a new food item, something absurd like a “Spicy Pickle” that gives you fire resistance.</p>



<p>Instead of trawling through outdated YouTube tutorials, you can literally type this:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>Prompt:</strong><br><em>“Can you generate the code and assets needed to add a new food item to Minecraft using Fabric, called ‘Spicy Pickle’? It should restore 3 hunger, give 10 seconds of fire resistance, and have a funny tooltip. Make it compatible with Minecraft 1.20.”</em></p>
</blockquote>



<p>Boom, LLM gives you the item JSON, the class definition in Java, the <code>en_us.json</code> localization, and sometimes even the folder structure. Paste, tweak, test. Done.</p>



<p>Want the pickle to glow green in the hotbar? Ask. Want to add crafting recipes? Ask. You’re no longer at the mercy of modding forums from 2014.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">It’s Not Just Minecraft</h3>



<p>This works with <em>tons</em> of games, I have personally tested for 7 Days to Die, and Stardew Valley. Anything with an open modding API or a scripting layer can be reverse-engineered with the help of an LLM. You don’t need to memorize every ModLoader quirk, just describe what you want.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">The Prompt is the New Skill</h3>



<p>Modding now feels like a blend of creativity and prompting. You imagine something cool, then describe it clearly. The better you prompt, the better your result. Want a haunted tree that drops screaming apples in Valheim? You don’t need to code it from scratch—you just need to <em>ask</em>.</p>



<p>Here’s a good prompt template to get started:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><strong>“I want to create a [object/item/event/NPC] in [game] using [modding framework]. It should [describe features]. Can you generate the code, config files, and any assets or folder structure needed?”</strong></p>
</blockquote>



<p>It doesn’t need to be perfect. You can always follow up with:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>“Add a sound effect.”<br>“Make it rarer.”<br>“Give it particle effects when picked up.”</p>
</blockquote>



<p>You still get to tweak, break things, and learn. You just skip the part where you have to reverse-engineer someone’s 2012 blog post. Dream up something weird, throw it at an LLM, and see what happens. Your Spicy Pickle Army awaits.</p>
</div>
</div>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/modding-games-is-easier-than-ever-thanks-to-ai/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Building a Sci-Fi Web Experience in Babylon.js + WordPress</title>
		<link>https://www.derek.net.au/logs/building-a-sci-fi-web-experience-in-babylon-js-wordpress/</link>
					<comments>https://www.derek.net.au/logs/building-a-sci-fi-web-experience-in-babylon-js-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Mon, 30 Jun 2025 12:28:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://dereknet.local/?p=57</guid>

					<description><![CDATA[Role: UX Designer / Frontend DevTech Stack: Babylon.js, WordPress (AJAX), Custom Theme (CSS + JS)Goal: Create a seamless, immersive sci-fi themed site where page navigation feels like moving through space, not loading a new page. 📐 Concept &#38; UX Goals From the outset, the experience had to feel like operating a sci-fi viewscreen. Every interaction,...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/building-a-sci-fi-web-experience-in-babylon-js-wordpress/" title="Read Building a Sci-Fi Web Experience in Babylon.js + WordPress">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<p><strong>Role:</strong> UX Designer / Frontend Dev<br><strong>Tech Stack:</strong> Babylon.js, WordPress (AJAX), Custom Theme (CSS + JS)<br><strong>Goal:</strong> Create a seamless, immersive sci-fi themed site where page navigation feels like moving through space, not loading a new page.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">📐 Concept &amp; UX Goals</h3>



<p>From the outset, the experience had to feel like operating a <strong>sci-fi viewscreen</strong>. Every interaction, click, scroll and transition, should feel spatial and connected. We weren’t building a site, we were building a starship UI.</p>



<p>Our core UX goals:</p>



<ul class="wp-block-list">
<li><strong>Pages = Places</strong>: navigating to a new page would &#8220;move&#8221; the camera to a new area of the space scene</li>



<li><strong>Minimal UI</strong>: reduce visual clutter to improve immersion</li>



<li><strong>Asynchronous Loading</strong>: no full reloads, just transitions</li>



<li><strong>Scene-Integrated Navigation</strong>: content and environment exist in the same universe</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🌌 Babylon.js Scene</h3>



<p>I started by crafting a <strong>Babylon.js space environment</strong>:</p>



<ul class="wp-block-list">
<li>A static camera at <code>(0,0,0)</code></li>



<li>Distant stars, planets, nebulae</li>



<li>A configurable <code>offset</code> vector allowed us to simulate movement through the universe by shifting the <em>rendered positions</em> of celestial bodies</li>
</ul>



<p>Rather than move the camera itself (which could break large-scale visual fidelity), I updated each object&#8217;s render position based on the current offset, simulating “traveling” to content.</p>



<pre class="wp-block-preformatted">jsCopyEdit<code>let renderPosition = originPosition.subtract(offset);
mesh.position.copyFrom(renderPosition);
</code></pre>



<h3 class="wp-block-heading">🚀 Navigating with Offset</h3>



<p>Each WordPress page was mapped to a <strong>specific position in space</strong>. Navigating to <code>/about</code> might move the scene’s offset to <code>(5000, 0, -10000)</code>. I added smooth interpolation with easing so it felt like flying:</p>



<pre class="wp-block-preformatted">jsCopyEdit<code>offset = BABYLON.Vector3.Lerp(offset, targetOffset, speed);
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🔁 Asynchronous Content Loading</h3>



<p>Using AJAX (<code>wp_ajax</code> in PHP), I loaded pages dynamically without reloading the scene:</p>



<ul class="wp-block-list">
<li>All links intercepted via JavaScript</li>



<li>Pages loaded via <code>jQuery.ajax</code></li>



<li>The HTML content (usually <code>.entry-content</code>) was swapped into the DOM</li>



<li>Babylon&#8217;s update loop persisted across transitions</li>
</ul>



<p>Each request returned HTML fragments from WordPress templates (<code>get_template_part()</code>), not full pages.</p>



<pre class="wp-block-preformatted"><code>if ($query-&gt;have_posts()) {<br>  while ($query-&gt;have_posts()) {<br>    $query-&gt;the_post();<br>    get_template_part('template-parts/content', 'page');<br>  }<br>}<br></code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🧠 UX Considerations</h3>



<ul class="wp-block-list">
<li><strong>Minimal layout</strong>: No bulky header or footer. Just a soft HUD-styled logo and a subtle menu tucked in the corner.</li>



<li><strong>Focus on content</strong>: Each page block hovered in the scene like a projected panel, with thin neon borders and glowing text.</li>



<li><strong>Consistent frame</strong>: Scene stayed loaded at all times, which made transitions feel native, not like switching pages.</li>
</ul>



<h3 class="wp-block-heading">💫 Design System</h3>



<p>I defined reusable styles that mirrored <strong>Star Trek</strong> and <strong>Mass Effect</strong> interfaces:</p>



<ul class="wp-block-list">
<li><strong>Typography</strong>: <code>Orbitron</code>, <code>VT323</code>, and glowing letter shadows</li>



<li><strong>Menu</strong>: A semi-transparent, floating “command stack” with expanding tree-like submenus</li>



<li><strong>Page container</strong>: 3D-transformed <code>&lt;article&gt;</code> blocks that could rotate slightly with scroll to simulate perspective</li>



<li><strong>Animations</strong>: Fade-ins, pulse highlights on hover, glint effects on logos</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🔧 Challenges</h3>



<ul class="wp-block-list">
<li><strong>Camera vs. Offset</strong>: Avoiding actual camera movement helped prevent precision issues at astronomical scales.</li>



<li><strong>Dynamic Element Bindings</strong>: We had to re-bind event listeners and re-init transitions after each AJAX load.</li>



<li><strong>Performance</strong>: Particle systems (like nebulae) required LOD toggling and distance culling to keep the experience smooth.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🧩 Tying It All Together</h3>



<p>Every piece, navigation, animation, styling, and spatial layout feeds into one consistent UX metaphor:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p><em>You’re not browsing a website. You’re navigating a ship’s digital log interface.</em></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">✅ What’s Next</h3>



<ul class="wp-block-list">
<li>Saving scene position in URL hashes or browser state</li>



<li>Adding audio feedback and voice logs</li>



<li>Possibly: AI-powered ambient chatter using LLM output (see <a href="/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/">/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/</a>)</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/building-a-sci-fi-web-experience-in-babylon-js-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Building My First AI WordPress Agent: A Developer’s First Experiment with Local LLMs</title>
		<link>https://www.derek.net.au/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/</link>
					<comments>https://www.derek.net.au/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/#respond</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Sun, 29 Jun 2025 12:44:15 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://dereknet.local/?p=40</guid>

					<description><![CDATA[Tired of the same repetitive tasks? Could AI actually automate the boring stuff, or is it just another overhyped tool? I decided to build an AI-powered agent that could help manage my WordPress sites. Something that could understand context, take actions, and automate tedious dev/admin tasks I’d normally do by hand. I want it to:...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/" title="Read Building My First AI WordPress Agent: A Developer’s First Experiment with Local LLMs">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p>Tired of the same repetitive tasks? Could AI actually automate the boring stuff, or is it just another overhyped tool?</p>



<p>I decided to build an AI-powered agent that could help manage my WordPress sites. Something that could understand context, take actions, and automate tedious dev/admin tasks I’d normally do by hand.</p>



<p>I want it to:</p>



<ul class="wp-block-list">
<li>Receive natural language instructions (e.g. “clear all caches” or “create a blog post with these specs”)</li>



<li>Interpret what I meant, not just what I said</li>



<li>Trigger real-world actions via WordPress CLI or REST API</li>



<li>Run locally (no cloud dependencies, no vendor lock-in)</li>
</ul>



<p>Basically: <em>an intelligent shell script with a brain</em>.</p>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">🧰 Tools I Used</h3>



<ul class="wp-block-list">
<li>🧠 <strong><a>DeepSeek Coder 6.7b</a></strong> – A locally hosted language model running through <a class="" href="https://ollama.com">Ollama</a>, fast and responsive</li>



<li>🧩 <strong>Node.js backend</strong> – Simple REST interface for prompt sending and response parsing</li>



<li>⚙️ <strong>WordPress CLI / REST API</strong> – Execution layer for real actions</li>



<li>🛠️ <strong>Custom instruction layer</strong> – Wrapped the LLM output with a JSON validator/parser to ensure structured commands and retry if the model was off</li>
</ul>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">🧪 The Architecture</h3>



<ol class="wp-block-list">
<li><strong>Input</strong>: I send a prompt like <code>“Can you list the 10 latest draft posts and convert them to published?”</code></li>



<li><strong>LLM Response</strong>: DeepSeek parses that into a structured JSON plan: jsonCopy<code>{ "action": "update_posts", "params": { "status": "publish", "filter": "draft", "limit": 10 } }</code></li>



<li><strong>Validator</strong>: My wrapper checks it, retries if needed, or rejects unsafe commands</li>



<li><strong>Executor</strong>: Runs <code>wp post update</code> or REST equivalent and returns success/failure</li>
</ol>



<p>It’s modular, secure-ish (I’m still locking it down), and after a lot of trial and effort, it is beginning to <strong>feel like magic</strong>.</p>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">🧠 What Surprised Me</h3>



<ul class="wp-block-list">
<li><strong>Local LLMs can be a useful tool </strong>: With the right prompting, even a local 6.7b model is <em>incredibly capable</em>, however, getting the prompt format and composition right by filtering the input is most of the battle.</li>



<li><strong>They’re also fragile</strong>: Without strong validation, they’ll give you confident nonsense. Guardrails are critical.</li>



<li><strong>JSON output wrapping is your best friend</strong>: Teach the model to respond <em>as a tool, not a poet</em>, and you’ll eventually get consistent responses.</li>
</ul>
</div>
</div>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">🧱 What’s Next</h3>



<ul class="wp-block-list">
<li>Expand it to use the REST API, to increase capabilities</li>



<li>Integrate with <strong>server-side shell tasks</strong> (upgrades, backups, etc.)</li>



<li>Maybe even let it run <strong>scheduled audits</strong> and suggest updates before I need them</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<h3 class="wp-block-heading">🚀 Final Thoughts</h3>



<p>This project was my first dive into applying AI in a <strong>practical way</strong> right now, and learning how to develop LLM wrappers from the ground up, without relying on cloud services. Running an intelligent local agent that speaks <em>my</em> language and interfaces with <em>my</em> tools feels like the start of a new wave of devops automation.</p>



<p>If you&#8217;re a developer and haven’t played with local LLMs + CLI/API integration yet&#8230; it might be time to start.</p>



<p>Got questions or want to build something similar? <a class="" href="https://www.linkedin.com/in/vicwebsites">Reach out on LinkedIn</a> or check out the repo at <a class="" href="https://github.com/doctarock">github.com/doctarock</a>.</p>
</div>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/building-my-first-ai-wordpress-agent-a-developers-first-experiment-with-local-llms/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hey, I&#8217;m Derek – I Build Stuff</title>
		<link>https://www.derek.net.au/logs/hey-im-derek-i-build-stuff-that-works/</link>
					<comments>https://www.derek.net.au/logs/hey-im-derek-i-build-stuff-that-works/#comments</comments>
		
		<dc:creator><![CDATA[derek]]></dc:creator>
		<pubDate>Sat, 28 Jun 2025 13:23:33 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">http://dereknet.local/?p=14</guid>

					<description><![CDATA[Welcome to my corner of the internet. I’m Derek Robertson—developer, systems guy, occasional designer-wrangler, and all-around problem solver. I’ve been in the game for over 25 years, turning clunky, chaotic systems into smooth, scalable digital solutions. Right now, I’m part of the crew at Buildxact, working at the intersection of SaaS, construction tech, and real-world...  <a class="excerpt-read-more" href="https://www.derek.net.au/logs/hey-im-derek-i-build-stuff-that-works/" title="Read Hey, I&#8217;m Derek – I Build Stuff">Read more &#187;</a>]]></description>
										<content:encoded><![CDATA[
<p>Welcome to my corner of the internet.</p>



<p>I’m Derek Robertson—developer, systems guy, occasional designer-wrangler, and all-around problem solver. I’ve been in the game for over 25 years, turning clunky, chaotic systems into smooth, scalable digital solutions. Right now, I’m part of the crew at Buildxact, working at the intersection of SaaS, construction tech, and real-world usability.</p>



<h3 class="wp-block-heading">What I Actually Do</h3>



<p>My background spans full-stack development, content platforms, e-commerce, CMS architecture, integrations, UX optimization, DevOps, and a healthy dose of &#8220;how do we make this thing talk to that thing?&#8221; I’ve worked on cross-platform apps, internal tools, customer portals, and websites that handle millions of requests a day.</p>



<p>I’ve worn many hats: developer, team lead, systems designer, tech translator, bug hunter, and mentor. If you need someone who can build it, fix it, streamline it, or make sense of it — I’m your guy.</p>



<h3 class="wp-block-heading">Tools of the Trade</h3>



<p>Tech-wise, I work mostly with:</p>



<ul class="wp-block-list">
<li><strong>PHP, C#</strong></li>



<li><strong>JavaScript / Node.js (React)</strong></li>



<li><strong>SQL, GraphQL, REST APIs</strong></li>



<li><strong>Azure, Git, Copilot</strong></li>



<li><strong>Photoshop, Krita, GIMP</strong></li>



<li><strong>Virtualmin, CPanel</strong></li>
</ul>



<p>But honestly? I care more about <strong>why we’re building it</strong> than what stack it’s on.</p>



<h3 class="wp-block-heading">Why It Matters</h3>



<p>I like working on things that help real people do real work. Whether it&#8217;s helping builders quote jobs faster, making internal systems suck less, or improving onboarding flows that reduce support calls—I’m all about meaningful improvements. If we can cut steps, reduce errors, and give users more confidence in their tools, that’s a win.</p>



<h3 class="wp-block-heading">What You’ll Find Here</h3>



<p>This blog is a place for the stuff I wish more people talked about:</p>



<ul class="wp-block-list">
<li>Building smarter, not bigger</li>



<li>Lessons from the field (and the dev trenches)</li>



<li>Dev workflows that actually save time</li>



<li>UX decisions from a dev’s point of view</li>



<li>And probably a few war stories along the way</li>
</ul>



<p>Thanks for stopping by—feel free to reach out if you want to chat code, ideas, or the weird bugs that keep you up at night.</p>



<p>Catch you in the next post.<br><strong>– Derek</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.derek.net.au/logs/hey-im-derek-i-build-stuff-that-works/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
