<?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"><channel><title><![CDATA[Sofuu Engineering]]></title><description><![CDATA[Official engineering blog for Sofuu: the AI-native runtime for JavaScript & TypeScript. In-process vector memory, autonomous agents, and MCP in under 5.5 MB.]]></description><link>https://sofuu.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 01 Nov 2026 06:25:13 GMT</lastBuildDate><atom:link href="https://sofuu.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Meet Sofuu: The General-Purpose Runtime for AI That Collapses Your AI Stack Into One Binary]]></title><description><![CDATA[Sofuu is an AI-native JS/TS runtime under 5.5MB with in-process vector memory, autonomous agents, and native MCP. Run AI without external daemons.]]></description><link>https://sofuu.hashnode.dev/meet-sofuu-the-general-purpose-runtime-for-ai-that-collapses-your-ai-stack-into-one-binary</link><guid isPermaLink="true">https://sofuu.hashnode.dev/meet-sofuu-the-general-purpose-runtime-for-ai-that-collapses-your-ai-stack-into-one-binary</guid><category><![CDATA[AI]]></category><category><![CDATA[ai agents]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[TypeScript]]></category><category><![CDATA[Open Source]]></category><category><![CDATA[runtime]]></category><dc:creator><![CDATA[Haruhito]]></dc:creator><pubDate>Fri, 30 Oct 2026 02:19:22 GMT</pubDate><content:encoded><![CDATA[<p>Building AI applications in JavaScript or TypeScript today usually requires duct-taping a fragile multi-process stack:</p>
<ul>
<li><strong>Node.js or Python</strong> running the application logic.</li>
<li><strong>External vector databases</strong> (Chroma, Pinecone, Qdrant) running as separate network services.</li>
<li><strong>Background LLM daemons</strong> (Ollama, vLLM) communicating across localhost ports.</li>
<li><strong>The localhost IPC tax</strong> — every hop between app, vector database, and daemon serializes JSON over a socket.</li>
</ul>
<p>We built <a href="https://sofuu.xyz"><strong>Sofuu</strong></a> to collapse this entire architecture into <strong>one in-process runtime, a single ≤ 5.5 MiB binary</strong>.</p>
<hr />
<h2>What is Sofuu?</h2>
<p><strong>Sofuu is a general-purpose runtime for AI — built to run anywhere from servers to smart devices.</strong> It is not an npm framework or a wrapper around Node: it is a standalone native binary with a Rust/C systems core (QuickJS + libuv, zero JIT) that measures a <strong>22.5 ms median cold start</strong> (wall clock including process spawn, Apple M2 Pro — every number in this post is measured and published in the repo's BENCHMARKS.md).</p>
<p>TypeScript and JavaScript are the orchestration surface. The primitives live in the runtime core:</p>
<h3>1. In-Process Cognitive Vector Memory (QTSQ)</h3>
<p>Built-in encrypted <code>.qtsq</code> memory containers with hardware SIMD search — measured <strong>0.82 ms</strong> for top-K over 10,000 × 768-dim vectors on Apple Silicon, in-process, with no external database. And QTSQ itself is now open source under the Apache-2.0 license (<a href="https://github.com/haruhito2666/qtsq">github.com/haruhito2666/qtsq</a>).</p>
<h3>2. Autonomous Agent Loops &amp; Prompt Sovereignty</h3>
<p>Define multi-step agents with native tools, budget caps, cancel signals, and streaming observability. Sofuu guarantees <strong>prompt sovereignty</strong>: the runtime never injects hidden system prompts or biases.</p>
<h3>3. Native Model Context Protocol (MCP)</h3>
<p>First-class MCP <strong>client and server</strong> support is built into the standard library. Connect to existing tool ecosystems without installing adapter packages.</p>
<h3>4. Sandbox v2 &amp; 5-Shield Security</h3>
<p>Untrusted agent tools and third-party plugins cross five shields: schema validation, policy and network jailing, a circuit breaker, watchdog deadlines, and a panic guard — a throwing plugin becomes a typed error, never a dead process.</p>
<blockquote>
<p><strong>Honesty note:</strong> the built-in inference engine is <strong>experimental</strong>. For production workloads, point the built-in <code>llamacpp</code> provider at a llama.cpp server.</p>
</blockquote>
<hr />
<h2>Hello World in Sofuu</h2>
<p>Memory, an agent, and recall — one process, no <code>node_modules</code>:</p>
<pre><code class="language-typescript">// Memory + agent + tools in one process
const brain = sofuu.memory.open("./brain.qtsq", 768);
brain.remember(
  sofuu.ai.embedLocal("Deployment target: AWS us-east-1"),
  "Deployment target: AWS us-east-1"
);

sofuu.agent.define({
  name: "deploy-auditor",
  system: "Inspect the repository and summarize deployment requirements.",
  tools: ["web", "memory"],
  budget: { maxSteps: 12 },
});

const result = await sofuu.agent.run(
  "deploy-auditor",
  "Audit this repo for deployment requirements"
);
console.log(result.answer);

const [hit] = brain.recall(sofuu.ai.embedLocal("deployment target"), 1);
console.log("Recalled:", hit.text);
</code></pre>
<p>Run it immediately:</p>
<pre><code class="language-bash">sofuu run agent.ts
</code></pre>
<p><em>(No compilation step — TypeScript is stripped in-process. No <code>node_modules</code>. No background daemons.)</em></p>
<hr />
<h2>Runs Everywhere, Ships as an SDK</h2>
<p>The same binary runs on macOS and Linux (including Raspberry Pi 5), and the engine embeds into iOS and Android apps through the <code>libsofuu</code> C ABI — QuickJS has no JIT, so App Store policy holds by construction. The Android SDK publishes as a Gradle dependency:</p>
<pre><code class="language-gradle">implementation 'com.sofuu:sofuu-android:0.3.0'
</code></pre>
<hr />
<h2>Open Source — All of It</h2>
<p>The Sofuu runtime is MIT-licensed, and the QTSQ memory engine is open source under the Apache License 2.0.</p>
<ul>
<li><strong>Website &amp; Documentation:</strong> <a href="https://sofuu.xyz">https://sofuu.xyz</a></li>
<li><strong>GitHub Repository:</strong> <a href="https://github.com/sofuu-runtime/sofuu">https://github.com/sofuu-runtime/sofuu</a></li>
<li><strong>QTSQ Engine:</strong> <a href="https://github.com/haruhito2666/qtsq">https://github.com/haruhito2666/qtsq</a></li>
<li><strong>Official AI Skill:</strong> <a href="https://sofuu.xyz/SKILL.md">https://sofuu.xyz/SKILL.md</a></li>
</ul>
<h3>Try it in 10 seconds:</h3>
<pre><code class="language-bash"># macOS &amp; Linux (auto-detects architecture) — or: npm i -g sofuu
curl -fsSL https://sofuu.xyz/install | sh
</code></pre>
<p>Current release: <strong>v0.3.0-beta.2</strong>. We are actively developing Sofuu and would love your feedback, bug reports, and benchmark tests!</p>
]]></content:encoded></item></channel></rss>