<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Toshiaki Sakurai </title>
    <description>The latest articles on DEV Community by Toshiaki Sakurai  (@sakurai-kinako).</description>
    <link>https://dev.to/sakurai-kinako</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4031089%2Ffb625f67-4d2c-4db1-9ac8-c58c894cc3de.jpg</url>
      <title>DEV Community: Toshiaki Sakurai </title>
      <link>https://dev.to/sakurai-kinako</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sakurai-kinako"/>
    <language>en</language>
    <item>
      <title>kinako-llama-cpp : 2. Why Corporate Security Rules Kill Local LLMs, and How 'kinako' Saves Lonely IT Departments</title>
      <dc:creator>Toshiaki Sakurai </dc:creator>
      <pubDate>Mon, 20 Jul 2026 08:03:53 +0000</pubDate>
      <link>https://dev.to/sakurai-kinako/why-corporate-security-rules-kill-local-llms-and-how-kinako-llama-cpp-saves-lonely-it-departments-3ac8</link>
      <guid>https://dev.to/sakurai-kinako/why-corporate-security-rules-kill-local-llms-and-how-kinako-llama-cpp-saves-lonely-it-departments-3ac8</guid>
      <description>&lt;h3&gt;
  
  
  1. The Tragicomedy of Enterprise AI: The "Top-Down" Misunderstanding
&lt;/h3&gt;

&lt;p&gt;Imagine a quiet, yet common tension playing out in strict corporate environments today:&lt;/p&gt;

&lt;h4&gt;
  
  
  Phase 1: The CEO's Ideal
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CEO:&lt;/strong&gt; "I just read the tech news, and tools like &lt;strong&gt;Ollama&lt;/strong&gt; or &lt;strong&gt;LM Studio&lt;/strong&gt; are the absolute gold standards for local LLMs! They are brilliant software. Let's deploy them across our departments immediately so we can innovate without cloud data leaks!"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IT Director:&lt;/strong&gt; "They are indeed fantastic solutions for flexible environments, Sir. Let me verify how their architecture aligns with our specific Active Directory and endpoint asset management policies first."&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Phase 2: The Auditor's Wall
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IT Director:&lt;/strong&gt; "The management wants to adopt Ollama for local AI tasks. Architecturally, it runs as a permanent background service and communicates via a local network port on Windows client PCs."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal Auditor:&lt;/strong&gt; "From a strict governance perspective, we cannot approve that. Unsanctioned local network ports and unauthorized background daemons violate our established Active Directory baseline and endpoint compliance rules. We must restrict it."&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Phase 3: The Threat of Isolation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;IT Director:&lt;/strong&gt; "Sir, after consulting with Internal Audit, we cannot deploy those standard desktop tools. They conflict with our strict Windows infrastructure rules."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CEO (Sighs):&lt;/strong&gt; "Unbelievable. The AI told me it's the global standard, and you guys just hide behind bureaucracy. You are holding this company back from the future."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IT Director (Terrified of being branded as anti-innovation, but unable to break compliance):&lt;/strong&gt; "…We will form an internal task force to investigate alternative architectures, Sir."&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Phase 4: The Silenced Matrix of Corporate Governance
&lt;/h4&gt;

&lt;p&gt;Behind the scenes, nobody is a villain here. &lt;/p&gt;

&lt;p&gt;The CEO is passionate about driving innovation. The IT Director wants to empower the business safely. Even the Internal Auditor likely loves these modern, open-source AI tools for personal projects. &lt;/p&gt;

&lt;p&gt;However, when it comes to strict corporate governance, the architectural requirements of "standalone desktop sandbox tools" and "enterprise Active Directory fortresses" simply face a structural mismatch. &lt;/p&gt;

&lt;p&gt;The Internal Auditor already knows the technical reasons for this bottleneck. They can even visualize the compliance matrix clearly—but due to the "No Self-Proposal Rule" of independent auditing, they are legally barred from suggesting a solution.&lt;/p&gt;

&lt;p&gt;Here is how the alignment looks under strict enterprise requirements:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation Criteria&lt;/th&gt;
&lt;th&gt;Standard Desktop Tools (Ollama / AnythingLLM)&lt;/th&gt;
&lt;th&gt;In-Process Architecture (kinako-llama-cpp)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Network Footprint&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Permanent Background Service waiting on a Local Port. (Excellent for open developer environments)&lt;/td&gt;
&lt;td&gt;In-Process DLL / Embedded inside your runtime (FastAPI). (Zero new network ports required)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Process Lifecycle&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Continuous Daemon Process running in the background. (Great for system-wide availability)&lt;/td&gt;
&lt;td&gt;Ephemeral Lifecycle. Process terminates immediately when the main application stops.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enterprise AD Audit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires individual security exception approvals and asset policy modifications.&lt;/td&gt;
&lt;td&gt;Passes standard corporate baseline automatically as a standard library dependency.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  The Anatomy of the Solution: What is &lt;code&gt;kinako-llama-cpp&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;To break this corporate gridlock, we need to completely shift our architectural paradigm. If standalone background processes are banned by auditors, the AI engine must live inside the application itself.&lt;/p&gt;

&lt;p&gt;That is why I developed &lt;code&gt;kinako-llama-cpp&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;(For a deep dive into the raw source code and implementation, please check out my previous article: &lt;a href="https://dev.to/sakurai-kinako/kinako-llama-cpp-local-llm-for-strict-windows-active-directory-environments-zero-daemon-58mj"&gt;https://dev.to/sakurai-kinako/kinako-llama-cpp-local-llm-for-strict-windows-active-directory-environments-zero-daemon-58mj&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In short, it is a lightweight Python binding built directly on top of &lt;code&gt;llama.cpp&lt;/code&gt;. Instead of running a heavy local server or background daemon like Ollama, &lt;code&gt;kinako-llama-cpp&lt;/code&gt; compiles the heavy lifting into a native Windows DLL that runs &lt;strong&gt;in-process&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;When you boot up a standard Python backend framework like FastAPI to build your internal company tool, &lt;code&gt;kinako-llama-cpp&lt;/code&gt; is loaded directly into that exact same process memory. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No network loopbacks.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No hidden background services.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No system privilege escalations.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To the Windows Active Directory and endpoint asset management software, it looks like nothing more than a standard, compliant Python library—because that is exactly what it is. It executes entirely within the sandbox approved for your specific internal web app.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. The Genesis: Learning from the Ashes of a 30-Year History
&lt;/h3&gt;

&lt;p&gt;Thirty years ago, I was a salesman at one of Japan's oldest and most traditional trading conglomerates (Zaibatsu). We genuinely believed our long-standing tradition and prestige would protect us forever. However, in 1997, amid the devastating Asian Financial Crisis, our company suddenly collapsed. &lt;/p&gt;

&lt;p&gt;Overnight, I found myself unemployed for more than a year, carrying the heavy responsibility of a wife and children while facing a daunting apartment mortgage. When I finally managed to pivot my career into the IT industry, my salary was cut to a mere one-third of what it used to be.&lt;/p&gt;

&lt;p&gt;Since that painful turning point, I have spent decades constantly reflecting on fundamental questions: &lt;em&gt;What is the true purpose of a corporation? How should management genuinely operate?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;I continuously mastered both business administration and IT system development to find the answers. Today, my professional mission is to help companies leverage technology—not just for the sake of following modern trends, but to protect and unlock their true, intrinsic operational strengths.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;kinako-llama-cpp&lt;/code&gt; is just a tiny, simple DLL file. From the outside, it doesn't look like much compared to flashy desktop applications. However, I am immensely proud of this small piece of software. It was designed from the ground up to completely clear the Auditor’s matrix within strict Windows AD environments without demanding a single compromise from corporate compliance:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation Criteria&lt;/th&gt;
&lt;th&gt;In-Process Architecture (kinako-llama-cpp)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Network Footprint&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚪ &lt;strong&gt;None.&lt;/strong&gt; In-Process DLL / Embedded inside your runtime (FastAPI). (Zero new network ports required)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Process Lifecycle&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚪ &lt;strong&gt;None.&lt;/strong&gt; Ephemeral Lifecycle. The process terminates immediately when the main application stops. (Zero background daemons or temporary windows services)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Enterprise AD Audit&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚪ &lt;strong&gt;None.&lt;/strong&gt; Passes standard corporate baseline automatically as a standard library dependency.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;External Comm. Risk&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;⚪ &lt;strong&gt;None.&lt;/strong&gt; 100% air-gapped capability. Works completely offline with zero external communication.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  3. Going Concern: Passing the Torch to the Next Generation
&lt;/h3&gt;

&lt;p&gt;The fictional corporate tragedy I described in the introduction is the exact, unvarnished reality faced by many traditional, long-standing enterprises today. &lt;/p&gt;

&lt;p&gt;These companies have carved their long histories through strict compliance, rigorous governance, and careful risk management. They are the bedrock of our industry. When their management stalls in this new AI era, &lt;strong&gt;nobody is to blame.&lt;/strong&gt; The CEO is acting out of a responsibility to innovate. The IT Director is acting out of a responsibility to secure the infrastructure. The Auditor is acting out of a responsibility to uphold compliance. Everyone is trying to do their job perfectly. Yet, the sheer velocity of external technological changes can instantly paralyze a perfectly honest organization.&lt;/p&gt;

&lt;p&gt;But let's think about the core value of these enterprises: &lt;strong&gt;The more seriously a company has managed its business over the decades, the more highly valuable, confidential data it possesses—data that &lt;em&gt;cannot&lt;/em&gt; and &lt;em&gt;must not&lt;/em&gt; be uploaded to the public cloud.&lt;/strong&gt; This treasure trove of localized history, manufacturing expertise, and management knowledge is exactly what has sustained these companies for generations.&lt;/p&gt;

&lt;p&gt;In this new era of AI, the way we utilize internal information has shifted dramatically. If we fail to leverage these valuable historical assets simply because our tools don't fit our security rules, traditional companies will eventually lose their competitive edge. If they collapse, thousands of hardworking people will lose their livelihoods—just as I did 30 years ago. That is the ultimate tragedy we must prevent at all costs.&lt;/p&gt;

&lt;p&gt;Our predecessors spun a beautiful, long history of valuable corporate knowledge. How do we unlock it safely? How do we entrust that legacy to the next generation of workers? &lt;/p&gt;

&lt;p&gt;Ensuring this continuity and protecting our people is the ultimate duty of a corporation as a &lt;strong&gt;Going Concern (継続企業)&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;When you are ready to answer that question and unlock your enterprise's true potential, just open the terminal on your Windows PC, and type this single command:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
pip install kinako-llama-cpp

---

company: https://www.sora-sakurai.com/
 toshiaki sakurai

https://pypi.org/project/kinako-llama-cpp/ 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>management</category>
      <category>security</category>
    </item>
    <item>
      <title>kinako-llama-cpp : 1. local LLM for strict Windows &amp; Active Directory environments, Zero-daemon, DLL-style</title>
      <dc:creator>Toshiaki Sakurai </dc:creator>
      <pubDate>Sat, 18 Jul 2026 05:31:46 +0000</pubDate>
      <link>https://dev.to/sakurai-kinako/kinako-llama-cpp-local-llm-for-strict-windows-active-directory-environments-zero-daemon-58mj</link>
      <guid>https://dev.to/sakurai-kinako/kinako-llama-cpp-local-llm-for-strict-windows-active-directory-environments-zero-daemon-58mj</guid>
      <description>&lt;h3&gt;
  
  
  1. The Challenge: AI vs. Enterprise Reality
&lt;/h3&gt;

&lt;p&gt;Tools like Ollama drive the shift toward on-premise AI, but traditional enterprises are left behind. They cannot upload proprietary data to the cloud, yet they cannot use existing local AI tools either. Why? Because the corporate world runs on Windows and Active Directory (AD). &lt;/p&gt;

&lt;p&gt;Popular tools operate as background daemons binding to network ports (e.g., 11434). In a hardened corporate network, opening ports on client PCs is a major security violation blocked by firewalls and AppLocker.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The Solution: kinako-llama-cpp
&lt;/h3&gt;

&lt;p&gt;To bridge this gap, I created kinako-llama-cpp. It introduces a Zero-Daemon, In-Process (DLL-style) architecture designed for enterprise compliance.&lt;br&gt;
  &lt;a href="https://pypi.org/project/kinako-llama-cpp/" rel="noopener noreferrer"&gt;https://pypi.org/project/kinako-llama-cpp/&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Why not just use llama-cpp-python?&lt;br&gt;
Installing llama-cpp-python on Windows (especially with Intel CPUs in corporate environments) is notoriously painful, requiring complex C++ compilers (Visual Studio, CMake) that often fail or violate IT policies. kinako-llama-cpp delivers pre-compiled, optimized Windows binaries directly via pip. It acts as a drop-in replacement—you keep using "from llama_cpp import Llama" without changing your code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Key Features:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Zero-Port Binding: Opens no network ports, eliminating network-side security risks entirely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Native OS Control: The LLM runs within your app's memory space (e.g., a FastAPI instance). IT admins can enforce group policies and monitor logs natively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Zero Idle Memory: Releases heavy LLM weights from RAM when not in use.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[Example Code]&lt;br&gt;
  from llama_cpp import Llama&lt;br&gt;
  llm = Llama(model_path="./models/gemma-4.gguf")&lt;br&gt;
  response = llm("Analyze the manufacturing logs...")&lt;br&gt;
  print(response)&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Architectural Concept (RFC)
&lt;/h3&gt;

&lt;p&gt;Instead of centralizing the LLM on an expensive server that risks bottlenecks, my conceptual architecture distributes the workload while keeping central governance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Central Servers: Handles AD identity management, serves the FastAPI backend, and manages the RAG layer (e.g., Open WebUI).&lt;/li&gt;
&lt;li&gt;Edge Clients (Windows 11): Each PC runs the local LLM in-process via kinako-llama-cpp (Embedded DLL).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftidol9soklxtleo5tjcn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftidol9soklxtleo5tjcn.jpg" alt=" " width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call for Discussion:
This distributed model increases custom development costs (handling routing and orchestration manually). &lt;/li&gt;
&lt;li&gt;How can we implement this distributed DLL orchestration while minimizing custom development costs?&lt;/li&gt;
&lt;li&gt;Are there existing OSS frameworks that naturally bridge a central FastAPI hub and decentralized client DLLs?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Context Memory Management
&lt;/h3&gt;

&lt;p&gt;Long chats cause RAM bloating. Currently, I use a "Sliding Window with Summarization" approach: the app triggers the local LLM to summarize past chat history at intervals, discarding raw logs. &lt;/p&gt;

&lt;p&gt;While this prevents freezing, it still triggers local inference for the summary. What are your favorite design patterns to manage long-context memory without overloading local hardware?&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Giving Back to the Community
&lt;/h3&gt;

&lt;p&gt;My hope is that historical companies can use this architecture to safely pass down valuable corporate knowledge into the new era. &lt;/p&gt;

&lt;p&gt;Eight years ago, I began learning Python. I was deeply moved by the countless free, high-quality libraries built by developers worldwide. I held the highest respect for those who contributed with such noble intentions. What I built here is something anyone could have made. However, if this helps an enterprise unlock its legacy data, I will feel that I have successfully paid forward the kindness I received from the open-source community years ago.&lt;/p&gt;

&lt;p&gt;Company: &lt;a href="https://www.sora-sakurai.com/" rel="noopener noreferrer"&gt;https://www.sora-sakurai.com/&lt;/a&gt;&lt;br&gt;
          toshiaki sakurai from Japan&lt;/p&gt;

&lt;p&gt;PyPI: &lt;a href="https://pypi.org/project/kinako-llama-cpp/" rel="noopener noreferrer"&gt;https://pypi.org/project/kinako-llama-cpp/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
