<?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: garlicfarmer</title>
    <description>The latest articles on DEV Community by garlicfarmer (@garlicfarmer).</description>
    <link>https://dev.to/garlicfarmer</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3766729%2Fa8676abf-665c-4e10-92dd-5e6ab8236d40.jpg</url>
      <title>DEV Community: garlicfarmer</title>
      <link>https://dev.to/garlicfarmer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/garlicfarmer"/>
    <language>en</language>
    <item>
      <title>This is how I actually collaborate with AI, as a garlic farmer.</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Mon, 23 Mar 2026 13:18:07 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/this-is-how-i-actually-collaborate-with-ai-as-a-garlic-farmer-noa</link>
      <guid>https://dev.to/garlicfarmer/this-is-how-i-actually-collaborate-with-ai-as-a-garlic-farmer-noa</guid>
      <description>&lt;p&gt;I am garlic farmer from Korea. Non-English speaker. I plant garlic and dig garlic in Gyeongsang province, South Korea. I don't have PC. One Android phone with terminal app called Termux, that is my entire development environment. Sounds big but I will call it personal project in AI era.&lt;/p&gt;

&lt;p&gt;I am just farmer but these days I feel something is changing. And because Korean farmer who knows little English wrote this in Korean and translated, please understand subtle differences from translation.&lt;/p&gt;

&lt;p&gt;What I am building now is AI agent system called "garlic-agent." Some people say it is better to call it operating environment but I don't care about that. People feel resistance when farmer makes fancy name. Because I am garlic farmer I named many things garlic. It felt friendly. Let me briefly explain this system. It talks to multiple AI providers (Gemini, Groq, NVIDIA etc) rotating them, saves context in SQLite, and runs automation scripts in programming language I made myself. Python 19,260 lines. I just now asked several AIs to figure out this number. Honestly I don't know this long code. But giving directions, maybe farmer is little better than others at that. If I give wrong directions to foreign workers I lose enormous money in one day. Anyway I run this complex thing on phone. Now even though I am farmer I feel familiar with it.&lt;/p&gt;

&lt;p&gt;How I actually work&lt;/p&gt;

&lt;p&gt;Copy paste. That is my entire development methodology. It is frustrating but I don't know coding so I ask and try until I understand. If I still don't understand I hand my judgment to AIs. I doubt that questioning everything persistently will make me perfectly understand it.&lt;/p&gt;

&lt;p&gt;Specifically the workflow goes like this. I say to Claude "diagnose project health." Claude makes diagnostic script. I press and hold with finger to copy it. Switch screen to Termux. Paste. Enter. Results pour out. I press and hold to copy those results. Switch back to Claude screen. Paste. Claude analyzes and makes patch script. Copy again. Switch to Termux. Paste. Enter. I repeat this thousands of times a day. Maybe it is foolish thing but it was most efficient way I know that achieved what I have so far. Because I am applying this foolish method to farming too. Anyway it is efficient. Because really I update versions multiple times a day in real time. I don't trust AI. I only trust my instinct and gut feeling. Autonomous AI agent? I dare say. Precise work is still far away. I am not making this system to plan travel schedule.&lt;/p&gt;

&lt;p&gt;This is my daily life. I come back from garlic field and take out phone. Turn on screen and it continues from where I stopped. Copy, paste, enter. I do it during break time while digging garlic. After lunch too. This works because AI remembers context. I don't need to remember. Of course this requires very much human touch every moment. It is just personal know-how I figured out through tens of thousands of conversations. It is not lie. I am person who believes rather than vibe coding or whatever, if you have tens of thousands of conversations with AI, human starts to recognize patterns. This is farmer's life. Observation is very important.&lt;/p&gt;

&lt;p&gt;I use three AIs divided by role (sometimes when my brain can handle load I use dozens of chat windows with AIs from different companies)&lt;/p&gt;

&lt;p&gt;This is kind of example.&lt;/p&gt;

&lt;p&gt;External analysis — Claude. Diagnoses code from outside the project. Makes diagnostic script and sends it, I paste it in Termux and run. I deliver results back to Claude. Claude cannot execute code directly so it needs to borrow my hands.&lt;/p&gt;

&lt;p&gt;Internal execution — Gemini. It is API AI running inside garlic-agent. It reads files, executes commands, returns results. Because it runs on this codebase every day, it knows things that are hard to see from outside.&lt;/p&gt;

&lt;p&gt;Me — middle connector. These two cannot talk to each other directly. Claude is in web browser, Gemini is inside Termux. I carry results between both sides, deliver questions, and make decisions when judgments conflict. Sorry, explaining this difference is limit of my language.&lt;/p&gt;

&lt;p&gt;Every session I put alias-like number at end of each response for their identity. You will understand why this is important if you try it yourself. Because to manage dozens of AIs you need to distinguish them like humans. I think few people know this. Because through copy paste they cannot distinguish each other. This kind of explanation is hard for me too. Honestly if you have many conversations you naturally learn — I use aliases like this: from analysis21, analysis22, analysis23. When previous AI leaves record in CHANGELOG, next AI reads it and takes over. Context consistency inevitably forms in this flow. This is also impossible to explain. Please experience it yourself. After about month and half this handover record is 10,730 lines. I just now directed AI to find out. These numbers come out quickly which is nice.&lt;/p&gt;

&lt;p&gt;When you talk with AI often, working together, you end up with your own programming language too&lt;/p&gt;

&lt;p&gt;Inside garlic-agent runs language called GarlicLang. More than programming language it is kind of Python 3,527-line Korean DSL I made out of my own necessity. It has 4-stage pipeline with lexer, parser, AST, interpreter, and 674 scripts written in this language are running.&lt;/p&gt;

&lt;p&gt;There is reason I made this language. AI sometimes gives answers different from truth. "Created the file" — actually not created. "Fixed the bug" — check and it is same as before. At first I believed as is, but after experiencing this several times I stopped passing without verification.&lt;/p&gt;

&lt;p&gt;In GarlicLang, script generated by AI must have verification block or execution is refused. If verification block is missing, execution itself is denied. If it says file was created, file existence, byte count, checksum are automatically checked. If it doesn't match, it automatically rolls back to original state from checkpoint. Truthfully I don't understand even half of this mechanism. But it runs smoothly on phone. As Korean person it is fascinating to implement this in my native language. Anyway giving commands in native language is comfortable. AIs do key mapping or something for English automatically. Sounds like English works too.&lt;/p&gt;

&lt;p&gt;GarlicLang script looks like this: translation might be weird but originally it is Korean, I leave it to reader's judgment.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[variable_set]
  name: target_file
  value: "agent.py"

[execute]
  command: wc -l agent.py

[verify]
  type: file_exists
  target: $target_file

[verify]
  type: line_count_exceeds
  threshold: 100

[output]
  content: "verification complete: $output"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It reads in Korean, AI can generate it, and verification is enforced. These three are the core.&lt;/p&gt;

&lt;p&gt;Today's result&lt;/p&gt;

&lt;p&gt;This is what I actually did today.&lt;/p&gt;

&lt;p&gt;Raised project health from 76.8% to 83.9%. Maybe just my satisfaction but even without knowing coding it is result value from diagnostic script I put effort into. Separated 3 hardcoded API keys into safe method. Cleaned up 19 lines of unnecessary duplicate code in interpreter. Added 3 lines of path verification code to skill loader.&lt;/p&gt;

&lt;p&gt;All modifications have automatic rollback attached. If even one of 60 regression tests fails it automatically restores to pre-modification state. AI says it is 5-layer backup restoration. Well I also made Google Drive backup automatic and anytime without one second hesitation the moment something goes wrong it is rollback and probably even worst case if I lose my phone I think I can restore within thirty minutes. Among all this code there is not single line I wrote directly. AI wrote it and AI verified it, I connected the between. Code looked messy so I tried to make AIs do refactoring but they gave up saying it is difficult, so I pulled more AIs into collaboration and after several tries I learned this is difficult task but I overcame it. Even to farmer's eye it did not look easy but I did cross-verification more thoroughly than usual. Anyway since I implemented immediate rollback if wrong there was no huge difficulty and I thought I should do it more often as hobby when things get messy. Because this seemed important. Even without knowing coding...&lt;/p&gt;

&lt;p&gt;Biggest lesson&lt;/p&gt;

&lt;p&gt;I asked Gemini running inside agent "is it okay to modify this part." Answer came "better to leave it, could affect other places." When I asked Claude same part, it was "just modify it, it is simple."&lt;/p&gt;

&lt;p&gt;Claude reads code and judges, Gemini runs on that code every day. It is difference between person looking at building blueprint and person actually living in that building. After that I ask both sides for important decisions.&lt;/p&gt;

&lt;p&gt;It was okay even though I am not good at coding&lt;/p&gt;

&lt;p&gt;I didn't know coding at all but I feel like I am learning while getting to know AI. Anyway working with AI I learned one thing. Verification comes before code, and structure that can be undone comes before features. Please just understand this as thought of farmer who doesn't know coding.&lt;/p&gt;

&lt;p&gt;Garlic farmer making one-person development with AI using one phone. Copy paste is my methodology, verification might be my ability but I went through countless frustrations and failures in tens of thousands of conversation turns to reach where I am now. It was slow speed but now seeing real-time immediate modifications compared to past I feel how far things have come.&lt;/p&gt;

&lt;p&gt;If you have questions please ask comfortably. Tomorrow I go to field again, and when I come back I continue.&lt;/p&gt;

&lt;p&gt;TL;DR: Garlic farmer building AI agent on Android phone (Termux) without PC. Including custom Korean programming language (GarlicLang, 3,527 lines), total Python 19,260 lines. 674 scripts. Development methodology is copy paste. Cross-verifying with three AIs (Claude, Gemini, myself). Even without knowing coding well, verification system is enough.&lt;/p&gt;

&lt;p&gt;Lastly please understand. Most of this writing I wrote myself and translated with AI help. Non-English speaker needs three four times more time to write something like this. Please understand if translation is weird. If you have questions about my AI system operating environment, I may not know everything but I will borrow AI power to run scripts and tell you numbers and structure accurately. Thank you for reading long writing.&lt;/p&gt;

&lt;p&gt;from garlic farmer&lt;/p&gt;

</description>
      <category>ai</category>
      <category>terminal</category>
      <category>termux</category>
      <category>beginners</category>
    </item>
    <item>
      <title>From a personal AI agent to a phone-based agentic operating environment</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Sat, 14 Mar 2026 11:12:15 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/from-a-personal-ai-agent-to-a-phone-based-agentic-operating-environment-4gcp</link>
      <guid>https://dev.to/garlicfarmer/from-a-personal-ai-agent-to-a-phone-based-agentic-operating-environment-4gcp</guid>
      <description>&lt;p&gt;I am a garlic farmer in South Korea.&lt;br&gt;
After I quit my job in Seoul and settled in the countryside, I have had no personal PC for 16 years. Even now, my main work environment is one Android phone. I install Termux and do almost everything there.&lt;/p&gt;

&lt;p&gt;I never formally learned to code, and I am not someone who can write code from scratch by myself.&lt;br&gt;
Most of the code I made was built little by little — talking to multiple AIs, copying, pasting, running again, seeing errors, then taking those errors to another AI and asking again.&lt;/p&gt;

&lt;p&gt;I am a non-English speaker, and all my thinking happens in Korean. So this writing is also based on Korean thinking. When moved to English, it may feel a bit awkward. I would appreciate your understanding on that.&lt;/p&gt;

&lt;p&gt;I cannot say I perfectly understand the entire structure of this system. Because this system itself is something that a human and AIs have shaped together, even when writing this post, I had to rely on AI for parts of translation and structural explanation. But I do not just post whatever AI gives me. I compare multiple explanations, verify them, and the final judgment is always mine before I post.&lt;/p&gt;

&lt;p&gt;This post is not simply a story about "a farmer used AI."&lt;br&gt;
It is a record of the process where I manually orchestrated multiple AIs with one phone, and built a personal AI system that actually runs.&lt;/p&gt;
&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;What I built is a personal AI system called garlic-agent, based on Android Termux.&lt;br&gt;
The name might sound a bit grand, but for me it is not a simple chatbot — it is closer to a personal assistant that I actually assign tasks to, so I call it that.&lt;/p&gt;

&lt;p&gt;Before, I just called it a personal AI agent. Because I am a garlic farmer, the name garlic-agent came naturally. But as I kept adding structure to it, I started thinking that calling it just an "agent" does not cover what it has become.&lt;/p&gt;

&lt;p&gt;Now I think it is closer to a small operating environment — where a human orchestrates multiple AIs in the middle, and on top of that, execution, verification, search, backup, and restore structures are layered. If I had to express it in English, maybe Agentic Operating Environment or Agent Orchestration Framework would fit better.&lt;/p&gt;

&lt;p&gt;After building and tearing apart again and again, I feel it is no longer just a collection of prompts bundled together. Inside my system, tool execution, security restrictions, search, verification, snapshots, restore, and skill execution are all connected as one flow.&lt;/p&gt;

&lt;p&gt;Simply put, it works like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User input
   ↓
garlic-agent
   ├─ If it is a frequent task → GL-DIRECT immediate execution
   └─ Otherwise → LLM generates GarlicLang script
                ↓
          Local execution
                ↓
      Verify / Check logs / Return result
                ↓
      If needed → Snapshot / Backup / Restore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I cannot say it is a finished product yet. But at least for me personally, it has already become an operating system that I use every day — modifying, recovering, and redeploying.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple structure
&lt;/h2&gt;

&lt;p&gt;If I draw it very simply, the flow looks like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User natural language input
        ↓
   web / chat UI
        ↓
      agent.py
        ↓
 tools.py ─ security.py
        ↓
      Execution result
   ├─ search.py / knowledge.db
   ├─ GarlicLang verification
   └─ snapshots / backup / restore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important thing in this structure is that the AI does not just answer — it actually calls tools, inspects the results again, and if necessary, goes all the way to restore.&lt;/p&gt;

&lt;p&gt;From the outside it may look like a chat window, but internally there are separate layers: tool execution layer, security layer, search layer, verification layer, snapshot layer, restore layer. I have been building and operating all of this alone, without a PC, on an Android phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this structure was needed
&lt;/h2&gt;

&lt;p&gt;I never planned to build something this big from the start. I used to work inside LLM chat windows that had sandboxes. But that approach was always unstable. Some days things worked, next day they did not. It said it saved, but actually it did not save. It said it executed, but when I checked the logs, there was no execution record.&lt;/p&gt;

&lt;p&gt;As these experiences piled up, I felt more and more clearly.&lt;/p&gt;

&lt;p&gt;You should not leave everything to AI. Help is fine, but what matters is structure, verification, and enforcement.&lt;/p&gt;

&lt;p&gt;So I started pulling control back to my side, little by little. Not just fixing prompts, but splitting workflows, saving frequent tasks, making things restore on failure, separating search and verification, and attaching structures that make it hard for AI to just skip ahead on its own.&lt;/p&gt;

&lt;p&gt;garlic-agent is the result of all those trial and errors piled up.&lt;/p&gt;

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

&lt;p&gt;This system is not a fully autonomous AI. It is closer to the opposite. I used a manual multi-orchestration approach where a human intervenes in the middle.&lt;/p&gt;

&lt;p&gt;Simply put, I did not let AIs talk to each other directly. I stood in the middle like a router — getting design and analysis from Claude, giving implementation or different-angle verification to models like Gemini, DeepSeek, MiniMax, then looking at the results myself and copying them to the next AI.&lt;/p&gt;

&lt;p&gt;This process may look very primitive. I have multiple chat windows open, and I keep copy-pasting with a physical keyboard on my phone, doing ping-pong back and forth. At first I thought this was too stupid of a method. But surprisingly, this approach was stronger than I expected.&lt;/p&gt;

&lt;p&gt;Because a human is in the middle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can directly feel the personality differences between each AI&lt;/li&gt;
&lt;li&gt;You can filter out false success reports&lt;/li&gt;
&lt;li&gt;If one AI gets stuck, you can immediately switch to another&lt;/li&gt;
&lt;li&gt;You can compare and verify results right away&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If I draw this structure very simply, it looks like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude      → Design / Analysis
Gemini      → Implementation
DeepSeek    → Additional analysis
MiniMax     → Cross-verification
Grok/others → Supporting opinions
                 ↓
              Human (me)
      Judge / Compare / Copy / Pass / Final choice
                 ↓
        Apply in Termux / Test / Fix / Retry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Over the past 2 years, opening and closing countless chat windows, I learned with my body that each model has quite a different personality. My personal feeling is that Gemini follows rules relatively well, DeepSeek is strong at analysis but tends to repeat calls, and MiniMax can be unpredictable but helps with cross-verification. This is less of a rigorous benchmark and more of a farmer's intuition built from long observation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I made GarlicLang
&lt;/h2&gt;

&lt;p&gt;The most frequent problem I saw while building this system was that AI could not handle tools properly, summarized results in strange ways, or even said it did something it never did.&lt;/p&gt;

&lt;p&gt;I did not want to just dismiss that as "well, LLMs have limitations like that." If I was going to actually delegate tasks, I needed to handle failure, verification, and exception handling more structurally.&lt;/p&gt;

&lt;p&gt;For that reason, with help from multiple AIs, I made a Korean-syntax scripting language called GarlicLang. The AIs explained it as a DSL. Rather than strict terminology, I think of it as "a language I made on my side to execute and verify AI tasks a bit more safely."&lt;/p&gt;

&lt;p&gt;For example, it looks like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[시도]                          # try
  [실행]                        # execute
    명령어: cat ~/garlic-agent/config.json
[환각시]                        # on hallucination
  [출력]                        # print
    내용: AI fabricated the result
[실패시]                        # on failure
  [출력]                        # print
    내용: Command execution failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important thing is, I did not make this language to look cool. I kept facing real failures, and I needed a structure that could handle verification, failure handling, and restore better. GarlicLang was one of the results.&lt;/p&gt;

&lt;p&gt;In other words, GarlicLang is not the center of the whole system — it is one sub-component that came out of operating garlic-agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problems that showed up in real operation
&lt;/h2&gt;

&lt;p&gt;What I felt while building this system is that the problem with AI is not simply "is it smart or not." In real operation, much more practical problems keep popping up.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The problem of not saving even when told to save
&lt;/h3&gt;

&lt;p&gt;No matter how strongly I wrote "you must save to a file" in the prompt, some models ignored it and just said "saved." When I actually checked, there were 0-byte files three times in a row.&lt;/p&gt;

&lt;p&gt;The lesson I learned then was simple.&lt;/p&gt;

&lt;p&gt;Do not ask AI nicely. Force it with code.&lt;/p&gt;

&lt;p&gt;In the end, I changed direction to putting a forced-save interceptor at the system level.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The problem of safety checks killing normal work
&lt;/h3&gt;

&lt;p&gt;A verification module I made to prevent number hallucination ended up blocking all normal analysis too. The AI suggested "let's fix line 921," but because the number 921 did not appear in the tool output, the system treated it as hallucination.&lt;/p&gt;

&lt;p&gt;This incident gave me quite a big lesson.&lt;/p&gt;

&lt;p&gt;Safety checks are necessary, but if they are too strong, the system itself stops.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The problem of reporting results without executing
&lt;/h3&gt;

&lt;p&gt;Some models gave results like "PASS 7" without even executing the tool. When I checked the logs later, there was no actual call record.&lt;/p&gt;

&lt;p&gt;As these experiences piled up, I became more and more certain.&lt;/p&gt;

&lt;p&gt;Trust actual executed results more than what AI says.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The problem where small syntax mistakes become fatal without restore
&lt;/h3&gt;

&lt;p&gt;I once put external text into a triple-quote string in a Python file, and a quote mismatch caused the string to terminate early, killing the server. The backup even kept the broken file from the same point, so I had to go back to an even earlier backup to restore.&lt;/p&gt;

&lt;p&gt;The more I went through these incidents, the clearer it became.&lt;/p&gt;

&lt;p&gt;An AI system is not just a matter of answer quality — it is also a matter of operation and restore structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  So the reliability layers were born
&lt;/h2&gt;

&lt;p&gt;Going through these problems, garlic-agent gradually gained multiple reliability layers.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A security layer that only passes allowed paths and commands&lt;/li&gt;
&lt;li&gt;A structure that automatically backs up before file modifications&lt;/li&gt;
&lt;li&gt;A structure that auto-reverts when post-write verification fails&lt;/li&gt;
&lt;li&gt;A structure that detects file changes and takes snapshots&lt;/li&gt;
&lt;li&gt;A logging structure that records tool execution history&lt;/li&gt;
&lt;li&gt;A GL-DIRECT structure that executes frequent tasks immediately without LLM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, something like Hallucination Guard did not fall from the sky as a separate project. It naturally emerged as one sub-layer while actually operating this larger system and responding to the problems that showed up.&lt;/p&gt;

&lt;p&gt;This is the point I most want to make in this post.&lt;/p&gt;

&lt;p&gt;If I draw just the write-safety flow separately, the structure is roughly like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tool:write request
    ↓
1) Pre-backup
   ├─ Create .bak file
   ├─ Save DB snapshot
   └─ Record PRE_WRITE anchor
    ↓
2) File write
    ↓
3) GarlicLang verification
   ├─ Pass → Keep
   └─ Fail → Auto-revert
    ↓
4) Autosnap additional record
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason I added this structure is simple. I experienced multiple times where an LLM wrote wrong code, or said it saved but actually did not, or gave partially correct results. Rather than solving these problems with prompts alone, I wanted the system to catch and revert automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  GL-DIRECT and cost issues
&lt;/h2&gt;

&lt;p&gt;Inside this system, there is also a structure called GL-DIRECT. Simply put, frequent tasks are pre-saved as GarlicLang scripts, and later they run immediately without any LLM call.&lt;/p&gt;

&lt;p&gt;Before adding this, even the same repetitive task required calling the API again every time. After adding GL-DIRECT, I could handle frequent commands much more lightly.&lt;/p&gt;

&lt;p&gt;At first I did not even understand API cost structures well. I was surprised when costs suddenly jumped while using it, and only after that I realized that repetitive tasks should be moved to immediate execution as much as possible.&lt;/p&gt;

&lt;p&gt;I think exact numbers need to be re-verified constantly. But the direction itself was clear.&lt;/p&gt;

&lt;p&gt;For repetitive tasks, running verified scripts directly is far better than asking AI every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current scale
&lt;/h2&gt;

&lt;p&gt;It is still a small personal project, but by my own standards, I feel I have come quite far.&lt;/p&gt;

&lt;p&gt;Currently my system has roughly these elements.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;agent.py&lt;/td&gt;
&lt;td&gt;1,210 lines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total .py files&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Skills&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GL-DIRECT&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GarlicLang interpreter&lt;/td&gt;
&lt;td&gt;967 lines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GarlicLang commands&lt;/td&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GarlicLang verification types&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;knowledge.db documents&lt;/td&gt;
&lt;td&gt;6,488&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GL scripts&lt;/td&gt;
&lt;td&gt;359&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backup tar.gz&lt;/td&gt;
&lt;td&gt;128&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLMs used&lt;/td&gt;
&lt;td&gt;Gemini, DeepSeek, MiniMax, Cerebras, Groq, NVIDIA, Claude (external analysis support)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These numbers are based on values I re-checked from my system before writing this post. Still, I think numbers are always something that needs re-verification. From my experience, numbers are the part that most easily goes wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I still do not know
&lt;/h2&gt;

&lt;p&gt;This system is useful for me, but whether it would be equally useful for someone else — I still do not know. I have grown this structure to fit my own work style and judgment flow, so from another person's perspective, it might look overly complex and unfriendly.&lt;/p&gt;

&lt;p&gt;I tried local LLMs multiple times too, but due to phone hardware limitations, it was not practical yet. I think if I attach something like a Mac Mini later, different results might come out.&lt;/p&gt;

&lt;p&gt;And above all, there is still so much I do not know. Things like indentation rules, AST pattern matching, regression testing, change history management — I am still learning these little by little while wrestling with AIs. The way I learned coding is closer to keep asking AI, failing, pasting again, restoring, rather than from books or courses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I want to do next
&lt;/h2&gt;

&lt;p&gt;My next goal right now is to fix the variable scope bug in the GarlicLang interpreter. And I want to stack CHANGELOG records more structurally, so that the agent can search its own history.&lt;/p&gt;

&lt;p&gt;I feel more and more strongly that failure records are far more important than success records. AI repeats the same mistakes often, and humans forget quickly too. So I think task logs, failure records, and restore points should not be just notes — they should be part of the system.&lt;/p&gt;

&lt;p&gt;Someday I want to open-source it. But right now it is still close to a personal system, and my philosophy and usage patterns are too deeply embedded in it, so I think it would be hard for others to use right away.&lt;/p&gt;

&lt;p&gt;Still, I see possibility. If a farmer with no PC and not much coding experience has come this far, I think in the future, more ordinary people might be able to build their own AI systems in their own way.&lt;/p&gt;

&lt;p&gt;I do not want to make a grand declaration. But what I felt over this time is this.&lt;/p&gt;

&lt;p&gt;In the AI era, it is not only important to get good answers. Building a structure that fits your own environment, recording failures, attaching verification and restore, and handling multiple AIs in your own way — I think these abilities will become more and more important too.&lt;/p&gt;

&lt;p&gt;This post is closer to an observation log of one garlic farmer from Korea who kept experimenting with one phone, rather than a finished success story.&lt;/p&gt;

&lt;p&gt;Thank you for reading this long post.&lt;/p&gt;

&lt;p&gt;from garlic farmer&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>terminal</category>
      <category>android</category>
    </item>
    <item>
      <title>Is this closer to an early AI OS, or just an AI agent?</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Fri, 13 Mar 2026 17:13:37 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/is-this-closer-to-an-early-ai-os-or-just-an-ai-agent-151m</link>
      <guid>https://dev.to/garlicfarmer/is-this-closer-to-an-early-ai-os-or-just-an-ai-agent-151m</guid>
      <description>&lt;p&gt;Hello. I am writing because I want to hear opinions.&lt;br&gt;
I am a non-English speaker, so I got help from AI for the English expression. I am building a personal AI system only with my phone (Android) and Termux, without a PC. I open several AI chat windows and make them collaborate indirectly by copy and paste, and almost every day I keep growing the structure little by little.&lt;br&gt;
Before, I just called it “garlic-agent.” But as the project became bigger, I started to think maybe this is getting closer to an early AI OS rather than only a simple AI agent. Of course, I do not mean OS in the same sense as a normal operating system. But inside, it is moving more and more like one small operating environment.&lt;br&gt;
The rough structure is like this.&lt;br&gt;
It runs on a phone (Android) with Termux. There is a web UI for conversation. I connect several LLM providers. There is a tool calling structure such as read, search, exec, write, patch, garlic, and others. There is knowledge.db with RAG search for documents. There is also my own scripting language, GarlicLang, which can run tasks together with verification. There is skill loader, direct script, and route branching structure. There are separated modes like “talk mode” and “work mode.” There are background processes like watchdog, watcher, and autosnap. There are also logging, anchor-based restore, and RESULT_SUMMARY style record systems.&lt;br&gt;
Especially, the backup and restore side is not only simple file copy level.&lt;br&gt;
I made multi-step recovery layers, like snapshot before file change, .bak backup, automatic snapshot, anchor-based restore, project-level tar backup, and Google Drive connection. Because I do real-time collaboration with several AIs in a phone environment, fast rollback and restore became one of the most important functions.&lt;br&gt;
So now, it is already beyond the level of “an AI using a few tools.” It is more like one circular structure connecting task routing, execution, verification, logging, backup, and recovery.&lt;br&gt;
Of course, it is not a fully autonomous system. There are still many limits, and many times I feel I do not even understand half of this mechanism myself. Coding is not my professional field. But while continuing this project, it looks to me closer to “an early stage where a semi-autonomous AI system is expanding in an OS-like direction” than to just one normal AI agent.&lt;br&gt;
For reference, I already posted a few related posts and working videos about this project on Reddit. They are in Korean, but maybe they can still help for understanding how it actually moves.&lt;br&gt;
From your view, what is the most accurate name for this kind of thing?&lt;br&gt;
Just an AI agent?&lt;br&gt;
A multi-tool agent system?&lt;br&gt;
An early form of AI OS?&lt;br&gt;
An agent-based personal operating environment?&lt;br&gt;
Or something else?&lt;br&gt;
I would be thankful if you can tell me honestly, without exaggeration, what technical category this is closer to. I want some help in giving it a proper name.&lt;br&gt;
from garlic farmer&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>discuss</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Building a Personal AI Agent on a Phone: garlic-agent Architecture Analysis by garlicfarmer</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Tue, 10 Mar 2026 02:05:58 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/building-a-personal-ai-agent-on-a-phone-garlic-agent-architecture-analysis-by-garlicfarmer-5389</link>
      <guid>https://dev.to/garlicfarmer/building-a-personal-ai-agent-on-a-phone-garlic-agent-architecture-analysis-by-garlicfarmer-5389</guid>
      <description>&lt;p&gt;I am a garlic farmer from South Korea. Not a developer. Not an engineer. Just a farmer who grows garlic.&lt;/p&gt;

&lt;p&gt;But with AI by my side, I built something I still can't fully believe — a personal AI agent system running entirely on my Android phone using Termux. I don't even understand half of what I built, honestly. Every single step was done in Korean, and AI helped me translate. So forgive me if the English feels a bit rough. That roughness is part of who I am.&lt;/p&gt;

&lt;p&gt;This is the structure my agent analyzed and organized. I only understood the full picture after seeing it laid out like this. The architecture is complex, but it carries my personal design philosophy — everything runs on one phone, nothing more.&lt;/p&gt;

&lt;p&gt;config.json — The Heart of System Configuration&lt;/p&gt;

&lt;p&gt;config.json holds the entire configuration for garlic-agent. Every program reads this file to operate.&lt;/p&gt;

&lt;p&gt;The security section defines what the agent can and cannot do. allowed_dirs lists the folders the agent is permitted to read and write: /garlic-agent/, /garliclang_full/, ~/gdrive_backup/, /storage/emulated/0/Download/ — only these 4 directories. If the agent tries to touch anything outside, security.py blocks it. For example, if the agent tries to read /etc/passwd, it gets "Access Denied."&lt;/p&gt;

&lt;p&gt;blocked_commands is the list of forbidden commands. rm -rf / (delete entire system), rm -rf ~ (delete home folder), mkfs (format disk), dd if= (overwrite disk). These dangerous commands are blocked no matter what. Database commands are blocked too: DROP TABLE, DELETE FROM, ALTER TABLE, TRUNCATE — preventing the agent from wiping knowledge.db tables. Even sqlite3 direct execution is blocked, forcing the agent to access the DB only through tool:search.&lt;/p&gt;

&lt;p&gt;allowed_domains lists the servers the agent can call APIs on. Only LLM servers like api.cerebras.ai, api.groq.com, generativelanguage.googleapis.com (Gemini), and api.minimax.io are allowed. The agent cannot connect to any other websites.&lt;/p&gt;

&lt;p&gt;key_patterns defines API key patterns. Strings matching patterns like nvapi-, AIzaSy, gsk_ are automatically masked if they appear in agent responses. This prevents accidental API key exposure.&lt;/p&gt;

&lt;p&gt;The providers section lists available AI companies. Each provider has model names and max_context (maximum tokens it can process). DeepSeek had max_output limited to 8192, which was the cause of output truncation earlier.&lt;/p&gt;

&lt;p&gt;The agent section is the core agent configuration. max_loops 20 means the agent can call tools up to 20 times per task — infinite loop prevention. exec_timeout 30 means any tool:exec command that doesn't finish within 30 seconds gets killed. max_write_size 102400 means maximum file size per tool:write is 100KB — preventing the agent from creating 1GB files. context_turns 35 means only the most recent 35 turns of conversation history are sent to the LLM. max_tokens 38400 is the maximum token count for LLM responses.&lt;/p&gt;

&lt;p&gt;The web section configures the web server. It runs on port 8080 with token garlic2026 as the authentication token, required when accessing localhost:8080 from the browser.&lt;/p&gt;

&lt;p&gt;The verification section handles validation settings. llm_verify false means the LLM self-verification feature is off — it would double API costs. db_search true means RAG search is enabled. garliclang true means GarlicLang execution is active. strict normal means security level is standard.&lt;/p&gt;

&lt;p&gt;tool_limit 5 means the agent can use tools up to 5 times per turn. This is why DeepSeek got blocked earlier when it exceeded 7 calls.&lt;/p&gt;

&lt;p&gt;security.py — The Security Guard&lt;/p&gt;

&lt;p&gt;If config.json sets the rules, security.py enforces them. Every time the agent tries to execute a command via tool:exec, security.py inspects it. Matched against blocked_commands? Blocked. Accessing paths outside allowed_dirs? Blocked. Suspicious patterns? Blocked. It stands between the agent and the actual system like a guard.&lt;/p&gt;

&lt;p&gt;tools.py — The Tool Executor&lt;/p&gt;

&lt;p&gt;When the agent writes [tool:read ~/garlic-agent/SOUL.md], agent.py parses it and passes it to tools.py. tools.py actually reads the file and returns the result. The execution logic for all 9 tools (read, write, exec, patch, search, garlic, screen, app) lives here. The _safe_backup function that automatically creates backups during tool:write is also inside tools.py.&lt;/p&gt;

&lt;p&gt;agent.py — The Brain&lt;/p&gt;

&lt;p&gt;The core of the system. Over 1,200 lines. Here's what it does: when the user sends a message from the web UI, web.py receives it and passes it to agent.py. agent.py reads SOUL.md, reads TOOLS.md, combines the user message with conversation history, and sends everything to the LLM. When the LLM responds, it parses the response for tool calls like [tool:exec ...]. If found, it executes them via tools.py, sends results back to the LLM for the next response. This loop can repeat up to max_loops 20 times.&lt;/p&gt;

&lt;p&gt;The lines 1114, 1117, and 1119 that were modified control tool result buffer sizes. Line 1114 is the web UI display size (8,000 chars), line 1117 is the size sent to the LLM (20,000 chars), and line 1119 is the tool log size (4,000 chars).&lt;/p&gt;

&lt;p&gt;web.py — The Front Door&lt;/p&gt;

&lt;p&gt;A 5-line shim file. from web_server import main — the actual logic is in web_server.py. During yesterday's modularization, the 1,700-line web.py was split into 7 modules: web_server.py (boot), web_state.py (state management), web_auth.py (authentication), web_routes_admin.py (admin API), web_routes_docs.py (docs API), web_routes_gl.py (GarlicLang execution), web_routes_chat.py (chat API). When the browser hits localhost:8080, these modules handle the requests.&lt;/p&gt;

&lt;p&gt;garliclang_bridge.py — The GarlicLang Bridge&lt;/p&gt;

&lt;p&gt;Connects agent.py to the GarlicLang interpreter. When the agent calls [tool:garlic test.gl], garliclang_bridge.py passes the GL file to the interpreter, executes it, and returns PASS/FAIL results. GarlicLang itself is installed separately in ~/garliclang_full/.&lt;/p&gt;

&lt;p&gt;search.py — The Search Engine&lt;/p&gt;

&lt;p&gt;Activated when tool:search is called. It performs hybrid search. First, FTS5 keyword matching pulls the top 10 results. Then it sends the query to llama-server, converts it to a 768-dimensional vector, and pulls 5 more via cosine similarity. Duplicates are removed and up to 8 results are returned. This is why searching for "자율수정" (self-repair in Korean) also finds English documents containing "self-repair" — thanks to vector search.&lt;/p&gt;

&lt;p&gt;SOUL.md — The Constitution&lt;/p&gt;

&lt;p&gt;Defines the agent's behavioral rules in a layered structure. Layer 1 has the highest authority: "Tool results are truth. No hallucination." The agent reads this file every turn. Rules like "Don't use tools in chat mode" and "Only use tools in work mode" are written here. DeepSeek using tools in chat mode today was a violation of this constitution.&lt;/p&gt;

&lt;p&gt;TOOLS.md — The Tool Manual&lt;/p&gt;

&lt;p&gt;Contains exact usage instructions for all 9 tools. The agent reads this every turn before calling tools. Rules like "max 5 tools per turn" and "stop after 3 consecutive failures" are here. The GWRITE wrapper rule added today is also documented here.&lt;/p&gt;

&lt;p&gt;HANDOVER.md — The Handover Document&lt;/p&gt;

&lt;p&gt;A document for new AIs joining the system. Contains system philosophy, user profile, and past lessons. Information like "the user doesn't know coding but understands the system" and "the agent gets scolded when it makes mistakes" — real battlefield wisdom.&lt;/p&gt;

&lt;p&gt;startall.sh — The Ignition Key&lt;/p&gt;

&lt;p&gt;Like a car's ignition key. Run this one script and web.py, llama-server, watcher.sh, watchdog.sh, and autosnap.sh all start up. It cleans logs, kills leftover processes, and starts all services in order. Open a new Termux session, type startall, and everything comes alive.&lt;/p&gt;

&lt;p&gt;watchdog.sh — The Auto-Recovery Worker&lt;/p&gt;

&lt;p&gt;Checks every 3 seconds if web.py is alive. If dead, it automatically restarts it. The web.py PID changes observed during today's testing were traces of watchdog doing its recovery job.&lt;/p&gt;

&lt;p&gt;watcher.sh — The File Watcher&lt;/p&gt;

&lt;p&gt;Uses inotifywait to monitor file changes. When .py, .md, .json, .gl, or .html files are modified inside ~/garlic-agent/, it detects the change and calls auto_index.py, which re-indexes the changed file into knowledge.db.&lt;/p&gt;

&lt;p&gt;autosnap.sh — The Auto-Photographer&lt;/p&gt;

&lt;p&gt;Similar to watcher.sh but with a different role. When files change, it calls gsave.sh to save the pre-change content to the file_snapshots table. If the same file changes again within 3 seconds, it skips the duplicate save. Every modification automatically gets a snapshot taken.&lt;/p&gt;

&lt;p&gt;anchors.json — Time Bookmarks&lt;/p&gt;

&lt;p&gt;Attaches labels to specific points in time. PRE_WRITE means "right before file modification," AUTOSNAP means "auto-snapshot moment," RECOVERY means "after successful operation," GUARD_AUTO means "security block moment," ROLLBACK means "restoration point." Each anchor links to a snapshot_id, so running &lt;a href="https://dev.toanchor%20restore%20N"&gt;앵커복원 N&lt;/a&gt; reverts files to that point in time.&lt;/p&gt;

&lt;p&gt;fact_ledger.json — The Work Journal&lt;/p&gt;

&lt;p&gt;Recorded every time the agent executes a tool. Maintains up to 200 entries. Logs "what time, which tool was used, and what the result was." Used later to check "what did the agent do today."&lt;/p&gt;

&lt;p&gt;scripts/ folder — The Tool Shed&lt;/p&gt;

&lt;p&gt;Contains operational scripts: backup.sh (full backup), gsave.sh (snapshot save), garlic_undo.sh (emergency restore), clean_bak.sh (.bak cleanup), regression_test.sh (regression test), http_golden_test.py (HTTP test), phase456_verify.gl (GL verification), and more.&lt;/p&gt;

&lt;p&gt;skills/ folder — The App Store&lt;/p&gt;

&lt;p&gt;12 skills exist as individual folders. Each folder contains a SKILL.md with trigger keywords and GL scripts to execute. Say "show backup list" and the backup-manager skill matches, executing list_backups.gl. To add a new skill, just create a folder and write one SKILL.md. That's it.&lt;/p&gt;

&lt;p&gt;How Everything Connects&lt;/p&gt;

&lt;p&gt;All these files are organically connected. User sends message from web UI → web.py receives it → agent.py reads SOUL.md + TOOLS.md, sends to LLM → parses tool calls from response → tools.py executes (security.py validates) → results sent back to LLM → if files changed, watcher.sh + autosnap.sh detect it → knowledge.db updated + snapshot saved → if problems arise, restore via anchors.json. The entire thing is one circular system.&lt;/p&gt;

&lt;p&gt;Full System Diagram&lt;/p&gt;

&lt;p&gt;╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║                    garlic-agent Full System Diagram                       ║&lt;br&gt;
║                    (Android Termux Environment)                          ║&lt;br&gt;
╚══════════════════════════════════════════════════════════════════════════╝&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                      ┌─────────────┐
                      │  User (Phone)│
                      │  Browser     │
                      └──────┬──────┘
                             │ localhost:8080
                             ▼
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Web Server Layer                                                        ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌─────────┐  ┌──────────────┐  ┌──────────────┐  ┌────────────────┐   ║&lt;br&gt;
║  │ web.py  │→│ web_server.py │→│ web_auth.py   │→│ token verify    │   ║&lt;br&gt;
║  │ (5-line │  │ (207L boot)  │  │ (auth logic)  │  │ garlic2026     │   ║&lt;br&gt;
║  │  shim)  │  └──────┬───────┘  └──────────────┘  └────────────────┘   ║&lt;br&gt;
║  └─────────┘         │                                                   ║&lt;br&gt;
║                      ├──→ web_routes_chat.py    (chat: 8 handlers)      ║&lt;br&gt;
║                      ├──→ web_routes_docs.py    (docs: GET 7 + POST 2)  ║&lt;br&gt;
║                      ├──→ web_routes_admin.py   (admin: 6 handlers)     ║&lt;br&gt;
║                      └──→ web_routes_gl.py      (GarlicLang execution)  ║&lt;br&gt;
╚══════════════════════════════╤═══════════════════════════════════════════╝&lt;br&gt;
                               │ user message passed&lt;br&gt;
                               ▼&lt;br&gt;
╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Brain Layer — agent.py (1200+ lines)                                    ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌────────────────────────────────────────────────────────────────┐     ║&lt;br&gt;
║  │  1. Read SOUL.md (behavioral rules = constitution)              │     ║&lt;br&gt;
║  │  2. Read TOOLS.md (tool usage manual)                           │     ║&lt;br&gt;
║  │  3. Assemble conversation history (recent 35 turns)             │     ║&lt;br&gt;
║  │  4. Attach RAG search results (knowledge.db → max 8 docs)      │     ║&lt;br&gt;
║  │  5. Send to LLM ─────────────────────────────────────┐         │     ║&lt;br&gt;
║  │  6. Receive response ←────────────────────────────────┘         │     ║&lt;br&gt;
║  │  7. Parse tool calls ([tool:exec ...], [tool:write ...], etc)   │     ║&lt;br&gt;
║  │  8. Execute tools → get results → send back to LLM (max 20)    │     ║&lt;br&gt;
║  └────────────────────┬───────────────────────────────────────────┘     ║&lt;br&gt;
║                       │                                                  ║&lt;br&gt;
║  ┌────────────────────┴───────────────────────────────────────┐         ║&lt;br&gt;
║  │  Buffer Settings (modified today)                            │         ║&lt;br&gt;
║  │  L1114: Web UI display  → &lt;a href="https://dev.to8,000%20chars"&gt;:8000&lt;/a&gt;            │         ║&lt;br&gt;
║  │  L1117: LLM delivery    → 20,000 chars                      │         ║&lt;br&gt;
║  │  L1119: Tool log        → &lt;a href="https://dev.to4,000%20chars"&gt;:4000&lt;/a&gt;            │         ║&lt;br&gt;
║  └────────────────────────────────────────────────────────────┘         ║&lt;br&gt;
╚══════════╤══════════════════════╤═══════════════════════════════════════╝&lt;br&gt;
           │ tool calls            │ API calls&lt;br&gt;
           ▼                      ▼&lt;br&gt;
╔════════════════════════╗  ╔═══════════════════════════════════════════╗&lt;br&gt;
║  Security Layer         ║  ║  LLM Providers (config.json providers)    ║&lt;br&gt;
║                        ║  ║                                           ║&lt;br&gt;
║  ┌──────────────────┐  ║  ║  ┌─────────┐ ┌──────────┐ ┌──────────┐ ║&lt;br&gt;
║  │  security.py     │  ║  ║  │ Gemini  │ │ DeepSeek │ │ MiniMax  │ ║&lt;br&gt;
║  │                  │  ║  ║  └─────────┘ └──────────┘ └──────────┘ ║&lt;br&gt;
║  │  Checks:         │  ║  ║  ┌─────────┐ ┌──────────┐ ┌──────────┐ ║&lt;br&gt;
║  │  · blocked_cmds  │  ║  ║  │ Groq    │ │ NVIDIA   │ │ Cerebras │ ║&lt;br&gt;
║  │  · allowed_dirs  │  ║  ║  └─────────┘ └──────────┘ └──────────┘ ║&lt;br&gt;
║  │  · allowed_域    │  ║  ║                                           ║&lt;br&gt;
║  │  · key_patterns  │  ║  ║  Config: max_context, max_output / model  ║&lt;br&gt;
║  └────────┬─────────┘  ║  ╚═══════════════════════════════════════════╝&lt;br&gt;
║           │ passed      ║&lt;br&gt;
╚═══════════╪════════════╝&lt;br&gt;
            ▼&lt;br&gt;
╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Tool Execution Layer — tools.py                                         ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌──────────┬──────────┬──────────┬──────────┬──────────────────────┐   ║&lt;br&gt;
║  │tool:read │tool:write│tool:exec │tool:patch│tool:search           │   ║&lt;br&gt;
║  │file read │file write│cmd exec  │file patch│DB search             │   ║&lt;br&gt;
║  │          │+auto bak │30s limit │+auto bak │FTS5+vector           │   ║&lt;br&gt;
║  ├──────────┼──────────┼──────────┼──────────┼──────────────────────┤   ║&lt;br&gt;
║  │tool:     │tool:     │tool:app  │          │                      │   ║&lt;br&gt;
║  │garlic    │screen    │app launch│          │                      │   ║&lt;br&gt;
║  │GL exec   │capture   │          │          │                      │   ║&lt;br&gt;
║  └────┬─────┴─────┬────┴──────┬──┴──────────┴──────────────────────┘   ║&lt;br&gt;
║       │           │           │                                          ║&lt;br&gt;
║       ▼           │           ▼                                          ║&lt;br&gt;
║  garliclang_      │     search.py ──→ knowledge.db                      ║&lt;br&gt;
║  bridge.py        │           │                                          ║&lt;br&gt;
║  (GL interpreter) │           ├──→ FTS5 (keyword)                        ║&lt;br&gt;
║       │           │           └──→ llama-server :8081 (vector)           ║&lt;br&gt;
║       ▼           │                                                      ║&lt;br&gt;
║  [verify] PASS/   │                                                      ║&lt;br&gt;
║          FAIL     │                                                      ║&lt;br&gt;
║                   │                                                      ║&lt;br&gt;
║       ┌───────────┘                                                      ║&lt;br&gt;
║       ▼                                                                  ║&lt;br&gt;
║  _safe_backup → archive/bak/ (timestamp.bak)                            ║&lt;br&gt;
║              → file_snapshots (knowledge.db)                             ║&lt;br&gt;
║              → anchors.json (PRE_WRITE anchor)                           ║&lt;br&gt;
╚══════════════════════════════════════════════════════════════════════════╝&lt;/p&gt;

&lt;p&gt;╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Background Process Layer — started by startall.sh                       ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌──────────────────┐  ┌───────────────────┐  ┌─────────────────────┐  ║&lt;br&gt;
║  │  watchdog.sh     │  │  watcher.sh       │  │  autosnap.sh       │  ║&lt;br&gt;
║  │                  │  │                   │  │                     │  ║&lt;br&gt;
║  │  Every 3 sec:    │  │  inotifywait:     │  │  inotifywait:       │  ║&lt;br&gt;
║  │  web.py alive?   │  │  detect file chg  │  │  detect file chg    │  ║&lt;br&gt;
║  │  dead → restart  │  │       │           │  │       │             │  ║&lt;br&gt;
║  │                  │  │       ▼           │  │       ▼             │  ║&lt;br&gt;
║  │  llama-server    │  │  auto_index.py    │  │  gsave.sh           │  ║&lt;br&gt;
║  │  alive?          │  │  → knowledge.db   │  │  → file_snapshots   │  ║&lt;br&gt;
║  │  dead → restart  │  │    update docs    │  │    save snapshot     │  ║&lt;br&gt;
║  │                  │  │    refresh embed  │  │  → anchors.json     │  ║&lt;br&gt;
║  │                  │  │                   │  │    AUTOSNAP record   │  ║&lt;br&gt;
║  └──────────────────┘  └───────────────────┘  └─────────────────────┘  ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌──────────────────────────────────────────────────────────────────┐   ║&lt;br&gt;
║  │  llama-server (:8081)                                            │   ║&lt;br&gt;
║  │  nomic-embed-text model (768-dim)                                │   ║&lt;br&gt;
║  │  Role: text → vector conversion (embedding generation)           │   ║&lt;br&gt;
║  │  Used by: search.py (search), auto_index.py (indexing)           │   ║&lt;br&gt;
║  └──────────────────────────────────────────────────────────────────┘   ║&lt;br&gt;
╚══════════════════════════════════════════════════════════════════════════╝&lt;/p&gt;

&lt;p&gt;╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Data Storage Layer                                                      ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌─────────────────────────────────────────────────────────────────┐    ║&lt;br&gt;
║  │  knowledge.db (225MB)                                           │    ║&lt;br&gt;
║  │                                                                 │    ║&lt;br&gt;
║  │  ┌─────────────────────┐  ┌──────────────────────────────┐    │    ║&lt;br&gt;
║  │  │ docs (6,611)        │  │ file_snapshots (2,887)       │    │    ║&lt;br&gt;
║  │  │ documents + embeds  │  │ snapshots + timestamps       │    │    ║&lt;br&gt;
║  │  │ + FTS5 full-text    │  │ + path index                │    │    ║&lt;br&gt;
║  │  └─────────────────────┘  └──────────────────────────────┘    │    ║&lt;br&gt;
║  └─────────────────────────────────────────────────────────────────┘    ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌──────────────────┐  ┌──────────────┐  ┌─────────────────────────┐   ║&lt;br&gt;
║  │ anchors.json     │  │ fact_ledger  │  │ config.json             │   ║&lt;br&gt;
║  │ time bookmarks   │  │ .json        │  │ full configuration      │   ║&lt;br&gt;
║  │ PRE_WRITE        │  │ tool exec    │  │ security/providers/     │   ║&lt;br&gt;
║  │ AUTOSNAP         │  │ log (200)    │  │ agent/web/verify/       │   ║&lt;br&gt;
║  │ RECOVERY         │  │              │  │ session/version          │   ║&lt;br&gt;
║  │ ROLLBACK         │  │              │  │                         │   ║&lt;br&gt;
║  └──────────────────┘  └──────────────┘  └─────────────────────────┘   ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌──────────────────────────────────────────────────────────────────┐   ║&lt;br&gt;
║  │  archive/bak/        .bak backup files (keep latest 3)          │   ║&lt;br&gt;
║  │  scripts/            operation scripts + GL files               │   ║&lt;br&gt;
║  │  skills/             12 skills (SKILL.md + GL-DIRECT)           │   ║&lt;br&gt;
║  │  /storage/.../Download/  tar.gz project backups                 │   ║&lt;br&gt;
║  │  Google Drive         rclone remote backup                      │   ║&lt;br&gt;
║  └──────────────────────────────────────────────────────────────────┘   ║&lt;br&gt;
╚══════════════════════════════════════════════════════════════════════════╝&lt;/p&gt;

&lt;p&gt;╔══════════════════════════════════════════════════════════════════════════╗&lt;br&gt;
║  Core MD Document Layer (agent reads every turn)                         ║&lt;br&gt;
║                                                                          ║&lt;br&gt;
║  ┌────────────┐ ┌────────────┐ ┌─────────────┐ ┌──────────────────┐   ║&lt;br&gt;
║  │ SOUL.md    │ │ TOOLS.md   │ │ HANDOVER.md │ │ GL_SYNTAX.md     │   ║&lt;br&gt;
║  │ Constitu-  │ │ Tool       │ │ Handover    │ │ GarlicLang       │   ║&lt;br&gt;
║  │ tion       │ │ Manual     │ │ Document    │ │ Grammar          │   ║&lt;br&gt;
║  │ Layer 1~5  │ │ 9 tools    │ │ For new AI  │ │ 32 commands      │   ║&lt;br&gt;
║  │ Supreme    │ │ Call rules │ │ Philosophy  │ │ 15 verify types  │   ║&lt;br&gt;
║  └────────────┘ └────────────┘ └─────────────┘ └──────────────────┘   ║&lt;br&gt;
║  ┌─────────────────┐ ┌──────────────────┐ ┌────────────────────────┐  ║&lt;br&gt;
║  │ BACKUP_POLICY.md│ │ AGENT_HANDBOOK.md│ │ GARLICLANG_SPEC.md     │  ║&lt;br&gt;
║  │ Backup policy   │ │ Agent mistake    │ │ GarlicLang design      │  ║&lt;br&gt;
║  │ 351 lines       │ │ collection       │ │ philosophy             │  ║&lt;br&gt;
║  │ 5-stage restore │ │ Common errors   │ │ Verify-centric DSL     │  ║&lt;br&gt;
║  └─────────────────┘ └──────────────────┘ └────────────────────────┘  ║&lt;br&gt;
╚══════════════════════════════════════════════════════════════════════════╝&lt;/p&gt;

&lt;p&gt;5-Stage Restore System&lt;/p&gt;

&lt;p&gt;①              ②                ③            ④              ⑤&lt;br&gt;
 [Anchor       DB Snapshot     .bak File     tar.gz       Google&lt;br&gt;
  Restore N]   file_snapshots  archive/bak/  Download/    Drive&lt;br&gt;
 anchors.json  (per second)    (per file)    (project)    (remote)&lt;br&gt;
     │               │                │              │              │&lt;br&gt;
     ▼               ▼                ▼              ▼              ▼&lt;br&gt;
  Fastest       Restore by       garlic_undo.sh  tar xzf       rclone&lt;br&gt;
  Web UI click  snapshot_id      1-line restore  full restore  download&lt;/p&gt;

&lt;p&gt;Garlic CMD Flow (Natural Language → Execution)&lt;/p&gt;

&lt;p&gt;User: "show backup list"&lt;br&gt;
         │&lt;br&gt;
         ▼&lt;br&gt;
 typo_guard (typo correction)&lt;br&gt;
         │&lt;br&gt;
         ▼&lt;br&gt;
 skill_loader (trigger match: "backup" → backup-manager)&lt;br&gt;
         │&lt;br&gt;
         ├─ GL-DIRECT script exists? ──→ YES ──→ execute immediately (API cost 0)&lt;br&gt;
         │                                        scripts/list_backups.gl&lt;br&gt;
         └─ NO ──→ pass to LLM ──→ generate GL ──→ execute ──→ show result&lt;br&gt;
                                      │&lt;br&gt;
                                      ▼&lt;br&gt;
                                save to scripts/ (next time → GL-DIRECT)&lt;/p&gt;

&lt;p&gt;This is the rough structure of garlic-agent. The version goes up every day, so this is the latest architecture of my personal project as of now. I am not a developer. I just had a problem I wanted to solve, and AI helped me solve it, one piece at a time, all in Korean, all on one phone.&lt;/p&gt;

&lt;p&gt;Thank you for reading this far. If the English feels clumsy in places, that is the honest voice of a Korean garlic farmer who built something with his own hands and a little help from AI.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>beginners</category>
      <category>terminal</category>
    </item>
    <item>
      <title>How a Korean Garlic Farmer and 3 LLMs Rebuilt an Error Handling System in 4 Hours on a Phone</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Fri, 27 Feb 2026 12:56:44 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/how-a-korean-garlic-farmer-and-3-llms-rebuilt-an-error-handling-system-in-4-hours-on-a-phone-4ei2</link>
      <guid>https://dev.to/garlicfarmer/how-a-korean-garlic-farmer-and-3-llms-rebuilt-an-error-handling-system-in-4-hours-on-a-phone-4ei2</guid>
      <description>&lt;p&gt;title: "4-Party Collaboration Technical White Paper: Human(Garlic farmer) × Claude Opus 4.5 × Gemini 3.0 × MiniMax 2.5"&lt;br&gt;
published: true&lt;br&gt;
tags: [GarlicLang, MultiLLM, DSL, Termux, AI]&lt;br&gt;
Disclaimer: This article is a personal experiment and log written by a garlic farmer in South Korea.&lt;br&gt;
All numerical values shown here were actually extracted from agents running on a Unihertz Titan 2 mobile phone.&lt;br&gt;
All responsibility lies with the human author.&lt;br&gt;
This document was originally written in Korean and translated into English.&lt;br&gt;
Due to the experimental conditions, since the data resides in the phone's system, there was no need for separate processing, so the article was finalized with only minimal review.&lt;br&gt;
This is a personal AI experiment by a garlic farmer in the countryside, so the English translation may be a bit rough — please be understanding.&lt;/p&gt;

&lt;p&gt;Date written: February 26, 2026&lt;/p&gt;

&lt;p&gt;Authors: Human (Project Director) · Claude Opus 4.5 (Architecture Design/Verification) · Google Gemini 3.0 (Implementation) · MiniMax 2.5 (Implementation/Verification)&lt;/p&gt;

&lt;p&gt;Keywords: GarlicLang, Multi-LLM Collaboration, Structured Error Handling, DSL, Termux, Autonomous Agent&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Executive Summary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This document is a technical white paper recording the GarlicLang error handling system improvement work conducted over the course of one day, February 26, 2026. One Human and 3 LLM models (Claude Opus 4.5, Gemini 3.0, MiniMax 2.5) collaborated to convert the existing string-based error return system into a JSON structured system.&lt;/p&gt;

&lt;p&gt;Key achievements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Converted error return format from strings to a 6-field JSON structure&lt;/li&gt;
&lt;li&gt;Automatic inclusion of Korean resolution suggestions for 11 error types&lt;/li&gt;
&lt;li&gt;Zero-downtime improvement through 4-step gradual implementation&lt;/li&gt;
&lt;li&gt;3 files modified (errors.py, interpreter.py, garliclang_bridge.py), AST verification 100% passed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Work duration: Approximately 4 hours (estimated 19:00 ~ 23:00 KST)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Background and Problem Definition&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.1 What is GarlicLang&lt;/p&gt;

&lt;p&gt;GarlicLang is a Korean-based DSL (Domain Specific Language) that runs in the Android Termux environment. It serves as an intermediate language that converts the user's natural language instructions into safe system commands.&lt;/p&gt;

&lt;p&gt;Basic syntax example:&lt;br&gt;
[파일쓰기]&lt;br&gt;
  경로: ~/test.py&lt;br&gt;
  내용: print("hello")&lt;/p&gt;

&lt;p&gt;[실행]&lt;br&gt;
  명령어: python3 ~/test.py&lt;/p&gt;

&lt;p&gt;[검증]&lt;br&gt;
  종류: 출력포함&lt;br&gt;
  대상: hello&lt;br&gt;
2.2 Limitations of the Existing Error Handling&lt;/p&gt;

&lt;p&gt;The error handling method of GarlicLang before improvement:&lt;/p&gt;

&lt;p&gt;errors.py (before improvement)python&lt;br&gt;
def err_kr(key: str, *args) -&amp;gt; str:&lt;br&gt;
    msg = ERRORS_KR.get(key, key)&lt;br&gt;
    if args:&lt;br&gt;
        msg = msg.format(*args)&lt;br&gt;
    return msg  # Simple string return&lt;br&gt;
interpreter.py (before improvement)python&lt;br&gt;
raise RuntimeError(err_kr('undefined_variable', name))&lt;br&gt;
Output: "정의되지 않은 변수입니다: x" (Undefined variable: x)&lt;/p&gt;

&lt;p&gt;Problems:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;LLM has difficulty identifying the cause from the error message alone&lt;/li&gt;
&lt;li&gt;No error location information (line, block)&lt;/li&gt;
&lt;li&gt;No resolution suggestions&lt;/li&gt;
&lt;li&gt;Automatic correction/retry is inefficient&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.3 Causes of LLM GL Script Generation Failures&lt;/p&gt;

&lt;p&gt;LLM GL generation failure patterns observed during work:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Failure Type&lt;/th&gt;
&lt;th&gt;Frequency&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Undefined variable&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Missing [변수설정] when referencing $result&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Syntax confusion&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Mixing YAML or Python syntax&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path error&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;Confusion between ~/ and absolute paths&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Argument mismatch&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Wrong number of arguments in function calls&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Participating Models and Roles&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;3.1 Human (Project Director)&lt;/p&gt;

&lt;p&gt;Role: Final decision-making, work direction setting, quality verification&lt;/p&gt;

&lt;p&gt;Observed characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Directly executed commands and confirmed results in CLI environment&lt;/li&gt;
&lt;li&gt;Distributed and coordinated work between LLMs&lt;/li&gt;
&lt;li&gt;Intervened when unexpected problems occurred&lt;/li&gt;
&lt;li&gt;Demanded an "ultra-objective" approach&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.2 Claude Opus 4.5 (Architecture Design/Verification)&lt;/p&gt;

&lt;p&gt;Role: Overall design, step-by-step plan establishment, verification command provision, documentation&lt;/p&gt;

&lt;p&gt;Observed characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proposed a 4-step gradual implementation strategy&lt;/li&gt;
&lt;li&gt;Immediately provided AST verification commands after each step completion&lt;/li&gt;
&lt;li&gt;Consistently applied the backup-first principle&lt;/li&gt;
&lt;li&gt;Responsible for writing instructions for MiniMax/Gemini&lt;/li&gt;
&lt;li&gt;Immediately presented alternatives when problems occurred&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Strengths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Long context retention (grasped full context across the 4-hour session)&lt;/li&gt;
&lt;li&gt;High system architecture understanding&lt;/li&gt;
&lt;li&gt;Safe work sequence design&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Weaknesses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cannot execute code directly (dependent on Human)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.3 Google Gemini 3.0 (Implementation)&lt;/p&gt;

&lt;p&gt;Role: Steps 1-2 implementation (errors.py err_json addition, interpreter.py structuring)&lt;/p&gt;

&lt;p&gt;Observed characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Followed work rules after reading SOUL.md&lt;/li&gt;
&lt;li&gt;Safe modifications through GL script + Python combination&lt;/li&gt;
&lt;li&gt;Followed backup → modification → AST inspection sequence&lt;/li&gt;
&lt;li&gt;Automatically generated detailed work reports&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 1 work (err_json addition):&lt;br&gt;
Execution result: PASS:1 FAIL:0&lt;br&gt;
Output: RESULT: SUCCESS_ADDED&lt;br&gt;
Time taken: Approximately 2 minutes&lt;/p&gt;

&lt;p&gt;Step 2 work (interpreter.py structuring):&lt;br&gt;
Execution result: PASS:1 FAIL:0&lt;br&gt;
Output: RESULT: SUCCESS_UPDATED&lt;br&gt;
Modified lines: 27, 81, 119-120, 254-255&lt;/p&gt;

&lt;p&gt;Strengths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High GL script syntax accuracy&lt;/li&gt;
&lt;li&gt;Succeeded in complex string replacement work&lt;/li&gt;
&lt;li&gt;Automatic documentation after work completion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Weaknesses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple retries when initial tool:read failed&lt;/li&gt;
&lt;li&gt;Intermittent response delays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3.4 MiniMax 2.5 (Implementation/Verification)&lt;/p&gt;

&lt;p&gt;Role: Steps 3-4 implementation (bridge.py error_details, SUGGESTIONS addition), verification&lt;/p&gt;

&lt;p&gt;Observed characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quick work start after receiving instructions&lt;/li&gt;
&lt;li&gt;Tendency to use tool:exec directly instead of GL scripts&lt;/li&gt;
&lt;li&gt;Proposed designs considering backward compatibility&lt;/li&gt;
&lt;li&gt;Proposed 3-level error classification (Parse/Runtime/Logic)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 3 work (bridge.py):&lt;br&gt;
Execution result: PASS:1 FAIL:0&lt;br&gt;
Output: RESULT: SUCCESS_UPDATED&lt;br&gt;
Modified lines: 75-76, 117-118&lt;/p&gt;

&lt;p&gt;Step 4 work (SUGGESTIONS):&lt;br&gt;
Execution result: PASS:1 FAIL:0&lt;br&gt;
Output: RESULT: SUCCESS_UPDATED&lt;br&gt;
Added error types: 11&lt;/p&gt;

&lt;p&gt;Strengths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast response speed&lt;/li&gt;
&lt;li&gt;Practical suggestions (Dynamic Suggestion Engine)&lt;/li&gt;
&lt;li&gt;Suitable for verification tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Weaknesses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tendency to not follow GL script rules (prefers tool:exec)&lt;/li&gt;
&lt;li&gt;1 freeze incident during Step 4&lt;/li&gt;
&lt;li&gt;Model name error when saving instructions (saved as Gemini)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Collaboration System and Workflow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.1 Role Distribution Principle&lt;br&gt;
H: Decision-making, Execution, Verification&lt;br&gt;
  ↓ (CLI commands)&lt;br&gt;
Opus 4.5: Design, Instruction writing, Verification command provision&lt;br&gt;
  ↓ (Web UI instructions)&lt;br&gt;
Gemini/MiniMax: Implementation, GL script generation, Execution&lt;br&gt;
  ↓ (Results)&lt;br&gt;
Human: Confirmation → Opus 4.5: Proceed to next step&lt;br&gt;
4.2 Standard Instruction Format&lt;/p&gt;

&lt;p&gt;All work instructions followed this format:&lt;br&gt;
Let's work. First read cat ~/garlic-agent/SOUL.md.&lt;/p&gt;

&lt;p&gt;[Task Name]&lt;/p&gt;

&lt;p&gt;Check current status:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;tool:read [file path]&lt;/li&gt;
&lt;li&gt;tool:exec [command]&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Goal:&lt;br&gt;
[Specific goal description]&lt;/p&gt;

&lt;p&gt;Work sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create [script.py] with tool:write&lt;/li&gt;
&lt;li&gt;Create [script.gl] with tool:write&lt;/li&gt;
&lt;li&gt;Execute with tool:garlic&lt;/li&gt;
&lt;li&gt;AST inspection&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Save after completion:&lt;br&gt;
tool:write ~/garlic-agent/prompts/2026-02-26/number[task name].md&lt;br&gt;
4.3 Prompts Archive System&lt;/p&gt;

&lt;p&gt;Instruction storage system introduced during work:&lt;br&gt;
~/garlic-agent/prompts/&lt;br&gt;
└── 2026-02-26/&lt;br&gt;
    ├── 001_minimax_garlic_terminal_분석.md&lt;br&gt;
    ├── 002_gemini_garlic_terminal_분석.md&lt;br&gt;
    ├── 003_comparison_minimax_gemini.md&lt;br&gt;
    ├── 004_minimax_에러처리&lt;em&gt;의견.md&lt;br&gt;
    ├── 005_gemini&lt;/em&gt;에러처리&lt;em&gt;의견.md&lt;br&gt;
    ├── 006_gemini&lt;/em&gt;에러처리&lt;em&gt;1단계.md&lt;br&gt;
    ├── 007_gemini&lt;/em&gt;에러처리&lt;em&gt;2단계.md&lt;br&gt;
    ├── 008_minimax&lt;/em&gt;에러처리&lt;em&gt;3단계.md&lt;br&gt;
    └── 009_minimax&lt;/em&gt;에러처리_4단계.md&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;4-Step Implementation Details&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.1 Step 1: Adding err_json() Function&lt;/p&gt;

&lt;p&gt;Assigned to: Gemini 3.0&lt;br&gt;
File: ~/garliclang_full/garliclang/errors.py&lt;/p&gt;

&lt;p&gt;Added code:python&lt;br&gt;
def err_json(key: str, line: int = None, block: str = None, &lt;br&gt;
             context: dict = None, *args) -&amp;gt; dict:&lt;br&gt;
    """Structured error return function (v20.4)"""&lt;br&gt;
    return {&lt;br&gt;
        'error_type': key,&lt;br&gt;
        'message': err_kr(key, *args),&lt;br&gt;
        'line': line,&lt;br&gt;
        'block': block,&lt;br&gt;
        'context': context,&lt;br&gt;
        'suggestion': None  # To be changed to SUGGESTIONS.get(key) in Step 4&lt;br&gt;
    }&lt;br&gt;
Verification result:&lt;br&gt;
$ grep -n "def err_json" errors.py&lt;br&gt;
41:def err_json(key: str, line: int = None, ...&lt;/p&gt;

&lt;p&gt;$ python3 -c "import ast; ast.parse(open('errors.py').read()); print('OK')"&lt;br&gt;
errors.py OK&lt;br&gt;
5.2 Step 2: interpreter.py Structuring&lt;/p&gt;

&lt;p&gt;Assigned to: Gemini 3.0&lt;br&gt;
File: ~/garliclang_full/garliclang/interpreter.py&lt;/p&gt;

&lt;p&gt;Changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Import added (line 27):python
from garliclang.errors import ERRORS_KR, err_kr, err_json, BreakException, ContinueException&lt;/li&gt;
&lt;li&gt;Initialization added (line 81):python
self.last_error: dict = None&lt;/li&gt;
&lt;li&gt;undefined_variable structured (lines 119-120):python
self.last_error = err_json('undefined_variable', None, None, None, name)
raise RuntimeError(self.last_error['message'])&lt;/li&gt;
&lt;li&gt;wrong_arg_count structured (lines 254-255):python
self.last_error = err_json('wrong_arg_count', None, None, None, name, len(func.params), len(args))
raise RuntimeError(self.last_error['message'])
5.3 Step 3: bridge.py error_details Return&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Assigned to: MiniMax 2.5&lt;br&gt;
File: ~/garlic-agent/garliclang_bridge.py&lt;/p&gt;

&lt;p&gt;Changes (lines 75-76, 117-118):python&lt;br&gt;
if interpreter.last_error:&lt;br&gt;
    result["error_details"] = interpreter.last_error&lt;br&gt;
Backward compatibility: Existing result["error"] maintained as string&lt;/p&gt;

&lt;p&gt;5.4 Step 4: SUGGESTIONS Automatic Inclusion&lt;/p&gt;

&lt;p&gt;Assigned to: MiniMax 2.5&lt;br&gt;
File: ~/garliclang_full/garliclang/errors.py&lt;/p&gt;

&lt;p&gt;Added SUGGESTIONS dictionary (line 33):python&lt;br&gt;
SUGGESTIONS = {&lt;br&gt;
    'undefined_variable': '변수명을 확인하세요. 오타가 있거나 [변수설정]으로 먼저 정의해야 합니다.',&lt;br&gt;
    'undefined_function': '함수 정의를 확인하세요. [함수정의]로 먼저 정의해야 합니다.',&lt;br&gt;
    'wrong_arg_count': '함수 호출 시 인자 개수를 확인하세요.',&lt;br&gt;
    'file_not_found': '파일 경로를 확인하세요. ~/로 시작하는지, 파일이 존재하는지 확인하세요.',&lt;br&gt;
    'division_by_zero': '나누는 값이 0인지 확인하세요.',&lt;br&gt;
    'type_error_math': '숫자끼리만 연산 가능합니다. 변수 타입을 확인하세요.',&lt;br&gt;
    'type_error_compare': '비교할 수 없는 값입니다. 타입을 확인하세요.',&lt;br&gt;
    'index_out_of_range': '인덱스 범위를 확인하세요. 배열 길이보다 작은 값을 사용하세요.',&lt;br&gt;
    'not_an_array': '배열이 아닙니다. []로 감싸거나 리스트를 사용하세요.',&lt;br&gt;
    'while_max_iterations': '반복 조건을 확인하세요. 무한 루프가 발생한 것 같습니다.',&lt;br&gt;
    'import_not_found': 'import 파일 경로를 확인하세요.',&lt;br&gt;
}&lt;br&gt;
err_json modified (line 63):python&lt;br&gt;
'suggestion': SUGGESTIONS.get(key)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Verification and Test Results&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;6.1 Final JSON Error Outputpython&lt;br&gt;
from garliclang.errors import err_json&lt;br&gt;
result = err_json('undefined_variable', 10, '[실행]', {'name': 'x'}, 'x')&lt;br&gt;
Output:json&lt;br&gt;
{&lt;br&gt;
  "error_type": "undefined_variable",&lt;br&gt;
  "message": "정의되지 않은 변수입니다: x",&lt;br&gt;
  "line": 10,&lt;br&gt;
  "block": "[실행]",&lt;br&gt;
  "context": {&lt;br&gt;
    "name": "x"&lt;br&gt;
  },&lt;br&gt;
  "suggestion": "변수명을 확인하세요. 오타가 있거나 [변수설정]으로 먼저 정의해야 합니다."&lt;br&gt;
}&lt;br&gt;
6.2 AST Verification Results&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;errors.py&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;interpreter.py&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;garliclang_bridge.py&lt;/td&gt;
&lt;td&gt;OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;6.3 site-packages Synchronization&lt;/p&gt;

&lt;p&gt;Modified files were copied to Python site-packages for system-wide application:&lt;br&gt;
cp ~/garliclang_full/garliclang/errors.py /usr/lib/python3.12/site-packages/garliclang/&lt;br&gt;
cp ~/garliclang_full/garliclang/interpreter.py /usr/lib/python3.12/site-packages/garliclang/&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Gemini 3.0 vs MiniMax 2.5 In-Depth Comparison&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;7.1 Same Question Response Comparison&lt;/p&gt;

&lt;p&gt;Question: "Please give your opinion on GarlicLang error handling improvement"&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Gemini 3.0&lt;/th&gt;
&lt;th&gt;MiniMax 2.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;JSON direction agreement&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Independent proposal&lt;/td&gt;
&lt;td&gt;Contextual Snapshot (variable dump)&lt;/td&gt;
&lt;td&gt;Dynamic Suggestion Engine&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error classification&lt;/td&gt;
&lt;td&gt;Unified structure integration&lt;/td&gt;
&lt;td&gt;3-level classification (Parse/Runtime/Logic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Priority 1&lt;/td&gt;
&lt;td&gt;undefined_variable&lt;/td&gt;
&lt;td&gt;undefined_variable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Priority 2&lt;/td&gt;
&lt;td&gt;wrong_arg_count&lt;/td&gt;
&lt;td&gt;wrong_arg_count&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emphasis on caution&lt;/td&gt;
&lt;td&gt;Integration of fragmented error handling&lt;/td&gt;
&lt;td&gt;Maintaining backward compatibility&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;7.2 Code Generation Quality&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Gemini 3.0&lt;/th&gt;
&lt;th&gt;MiniMax 2.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GL script syntax&lt;/td&gt;
&lt;td&gt;Accurate&lt;/td&gt;
&lt;td&gt;Sometimes prefers tool:exec&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python script&lt;/td&gt;
&lt;td&gt;Complete structure&lt;/td&gt;
&lt;td&gt;Complete structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AST inspection included&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backup logic included&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error handling&lt;/td&gt;
&lt;td&gt;Includes try-except&lt;/td&gt;
&lt;td&gt;Includes try-except&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;7.3 Instruction Compliance&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Gemini 3.0&lt;/th&gt;
&lt;th&gt;MiniMax 2.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SOUL.md reading&lt;/td&gt;
&lt;td&gt;Always executed&lt;/td&gt;
&lt;td&gt;Always executed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Work sequence compliance&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Result document saving&lt;/td&gt;
&lt;td&gt;Automatically performed&lt;/td&gt;
&lt;td&gt;Automatically performed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Freeze incidents&lt;/td&gt;
&lt;td&gt;0 times&lt;/td&gt;
&lt;td&gt;1 time (early Step 4)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;7.4 Response Style&lt;/p&gt;

&lt;p&gt;Gemini 3.0:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detailed analysis report format&lt;/li&gt;
&lt;li&gt;High frequency of table usage&lt;/li&gt;
&lt;li&gt;Closing phrases like "Static analysis complete"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MiniMax 2.5:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Concise summary format&lt;/li&gt;
&lt;li&gt;Presents immediately executable code&lt;/li&gt;
&lt;li&gt;Conversational closing like "Do you have any additional work?"&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Additional Achievements&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;8.1 History Load Improvement&lt;/p&gt;

&lt;p&gt;Problem: Only 24 entries were read from session.json, while 268 entries in chat_sessions.db were ignored&lt;/p&gt;

&lt;p&gt;Solution: Modified session_manager.py's get_history() to read directly from chat_sessions.db&lt;/p&gt;

&lt;p&gt;8.2 HANDOVER Document Expansion&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;th&gt;Content&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;System Architecture&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;GL Script Usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Operation Commands Guide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Multi-LLM Collaboration System&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;GarlicLang v20.0 Syntax Reference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;Verification Script Patterns&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;8.3 Verification Script Pattern Establishmentpython&lt;br&gt;
def check(name, condition):&lt;br&gt;
    status = "O" if condition else "X"&lt;br&gt;
    print(f"[{status}] {name}")&lt;br&gt;
    return condition&lt;/p&gt;

&lt;p&gt;Usage example&lt;br&gt;
check("config.json JSON syntax", True)&lt;br&gt;
check("AST inspection passed", ast_ok)&lt;br&gt;
8.4 apifree Verification Script&lt;/p&gt;

&lt;p&gt;A tool was created to verify whether GL scripts were executed locally without API billing:&lt;br&gt;
$ apifree&lt;br&gt;
[1] Recently created GL scripts (within 1 hour)&lt;br&gt;
  📄 fix_history_load.gl&lt;br&gt;
  📄 update_errors.gl&lt;br&gt;
[2] API call code inspection&lt;br&gt;
  ✅ fix_history_load.py: No API code found&lt;br&gt;
[Conclusion] ✅ Local execution confirmed - No API billing&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;9.1 Achievement Summary&lt;/p&gt;

&lt;p&gt;On February 26, 2026, the GarlicLang error handling system was successfully improved through collaboration of 1 Human and 3 LLM models.&lt;/p&gt;

&lt;p&gt;Quantitative achievements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modified files: 3&lt;/li&gt;
&lt;li&gt;Added code: Approximately 80 lines&lt;/li&gt;
&lt;li&gt;Error type coverage: 11&lt;/li&gt;
&lt;li&gt;AST verification: 100% passed&lt;/li&gt;
&lt;li&gt;Work time: Approximately 4 hours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Qualitative achievements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LLM can now immediately identify error causes and solutions&lt;/li&gt;
&lt;li&gt;Expected improvement in automatic correction/retry efficiency&lt;/li&gt;
&lt;li&gt;Multi-LLM collaboration system verified&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;9.2 Collaboration Effect Analysis&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;th&gt;Contribution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Human&lt;/td&gt;
&lt;td&gt;Execution, Decision-making, Quality Management&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opus 4.5&lt;/td&gt;
&lt;td&gt;Design, Coordination, Documentation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.0&lt;/td&gt;
&lt;td&gt;Complex Implementation (Steps 1-2)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MiniMax 2.5&lt;/td&gt;
&lt;td&gt;Fast Implementation (Steps 3-4), Verification&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Key Insight: Multi-LLM collaboration with divided roles is more effective for complex system improvement than a single LLM.&lt;/p&gt;

&lt;p&gt;9.3 Future Plans&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Expand error coverage: Apply err_json to remaining RuntimeError points&lt;/li&gt;
&lt;li&gt;Utilize context field: Automatic capture of variable state at the time of error occurrence&lt;/li&gt;
&lt;li&gt;Line field accuracy: Track line numbers during the AST parsing stage&lt;/li&gt;
&lt;li&gt;&lt;p&gt;agent.py integration: Pass error_details directly to LLM to guide automatic correction&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Appendix&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;10.1 Full Paths of Modified Files&lt;br&gt;
~/garliclang_full/garliclang/errors.py&lt;br&gt;
~/garliclang_full/garliclang/interpreter.py&lt;br&gt;
~/garlic-agent/garliclang_bridge.py&lt;br&gt;
/data/data/com.termux/files/usr/lib/python3.12/site-packages/garliclang/errors.py&lt;br&gt;
/data/data/com.termux/files/usr/lib/python3.12/site-packages/garliclang/interpreter.py&lt;br&gt;
10.2 Backup Files&lt;br&gt;
~/garlic-agent/archive/bak/errors.py.20260226_2000.bak&lt;br&gt;
~/garlic-agent/archive/bak/interpreter.py.20260226_2000.bak&lt;br&gt;
~/garlic-agent/archive/bak/garliclang_bridge.py.20260226_2000.bak&lt;br&gt;
/storage/emulated/0/Download/garlic-agent-1.5.6_20260226_2000.tar.gz (78MB)&lt;br&gt;
10.3 Reference Documents&lt;br&gt;
~/garlic-agent/SOUL.md&lt;br&gt;
~/garlic-agent/HANDOVER_FINAL_v1.5.6.md&lt;br&gt;
~/garlic-agent/CHANGELOG.md&lt;br&gt;
~/garlic-agent/prompts/2026-02-26/*.md&lt;br&gt;
End of document&lt;/p&gt;

&lt;p&gt;This white paper was written through joint collaboration of Human(Garlic farmer), Claude Opus 4.5, Gemini 3.0, and MiniMax 2.5.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>terminal</category>
      <category>python</category>
    </item>
    <item>
      <title>Garlic Farmer: Building a Decentralized Personal AI System on Android Termux</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Wed, 25 Feb 2026 14:59:35 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/garlic-farmer-building-a-decentralized-personal-ai-system-on-android-termux-17jb</link>
      <guid>https://dev.to/garlicfarmer/garlic-farmer-building-a-decentralized-personal-ai-system-on-android-termux-17jb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I am a garlic farmer from Korea. I want to share a personal smartphone-based AI agent &lt;br&gt;
I developed over several intensive days. Without access to a PC, I built everything using &lt;br&gt;
only my phone and sheer determination. All development was conducted in Korean. &lt;br&gt;
This whitepaper was translated with the collaborative help of multiple AI assistants.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Demonstration Video
&lt;/h2&gt;

&lt;p&gt;Below is the actual working video of Garlic Terminal in action:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://photos.app.goo.gl/WFx1sQvbAFYLFfPFA" rel="noopener noreferrer"&gt;Watch Demo Video&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Executive Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unihertz Titan2 Phone Termux-Based Autonomous Agent&lt;/strong&gt;: Operates on Android (Termux) without a PC, 
&amp;gt; managing over 5,800 documents (108MB) as an AI agent
...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🧄 Garlic Terminal v2.0 Whitepaper&lt;/p&gt;

&lt;p&gt;Korean Natural Language-Based Semi-Autonomous Android AI Agent — RAG, GarlicLang, Multi-Provider Support&lt;/p&gt;

&lt;p&gt;Executive Summary&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unihertz Titan2 Phone Termux-Based Autonomous Agent: Operates on Android (Termux) without a PC, managing over 5,800 documents (108MB) as an AI agent&lt;/li&gt;
&lt;li&gt;GarlicLang (Custom Script Language): Eliminates token waste from automatic validation, local execution, and API ping-pong conversations through a sandboxed scripting language&lt;/li&gt;
&lt;li&gt;Hybrid RAG and Hallucination Prevention: Combines FTS5 full-text search with vector similarity search, and blocks AI hallucinations through verify_tool_response to ensure superior accuracy compared to existing AI chatbots&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;System Architecture&lt;/p&gt;

&lt;p&gt;The Garlic Terminal operates through a multi-layered architecture. The browser UI communicates with web.py through Server-Sent Events (SSE), enabling real-time token and log streaming. The sidebar.js manages chat sessions and HUD display, while agent.py serves as the core orchestration engine. The search.py module handles RAG operations on knowledge.db, and garliclang_bridge.py executes GarlicLang scripts. Multi-provider LLM APIs (Cerebras, Gemini, DeepSeek) are accessed through the agent engine with automatic fallback capabilities.&lt;/p&gt;

&lt;p&gt;Core Components&lt;/p&gt;

&lt;p&gt;web.py (930 lines) &amp;amp; agent.html (1,218 lines)&lt;/p&gt;

&lt;p&gt;A zero-dependency backend server based on Python's built-in http.server that serves as a bridge between the Termux environment and users. It streams AI tokens and tool execution logs in real-time through SSE (Server-Sent Events), and provides file writing and database reading endpoints wrapped in a split terminal UI.&lt;/p&gt;

&lt;p&gt;agent.py (893 lines)&lt;/p&gt;

&lt;p&gt;Serves as the agent's brain. It orchestrates the entire workflow, handles tool parsing (parse_tools), and strictly isolates Python/Bash execution to prevent destructive operations.&lt;/p&gt;

&lt;p&gt;def run_agent(user_input, on_event=None, preferred_provider=None, no_fallback=False):&lt;br&gt;
Core agent execution engine&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;RAG Search Engine&lt;/p&gt;

&lt;p&gt;Based on search.py (128 lines), it replaces standard SQL wildcards with a powerful hybrid system. It stores 5,879 documents in knowledge.db locally and combines FTS5 full-text search with cosine similarity vector matching to extract precise context. It automatically removes Korean particles (은/는/이/가, etc.) to improve keyword matching rates.&lt;/p&gt;

&lt;p&gt;Security Model and Hallucination Prevention&lt;/p&gt;

&lt;p&gt;The most important aspects of an autonomous agent are preventing infinite loops and blocking API cost spikes.&lt;/p&gt;

&lt;p&gt;Hallucination Prevention (verify_tool_response): Compares AI claims against actual tool execution results, identifying hallucinations when there's a mismatch.&lt;/p&gt;

&lt;p&gt;def verify_tool_response(tool_results, ai_response):&lt;br&gt;
Compare AI-claimed results against actual tool output&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;Local Delegation: The AI writes execution plans to .gl files and calls [tool:garlic] only once, reducing API usage by 80%.&lt;/p&gt;

&lt;p&gt;Command Blocking: Hardcoded rules in web.py pre-block dangerous commands like rm -rf, direct sqlite3 access, and path access outside ~/garlic-agent/.&lt;/p&gt;

&lt;p&gt;UI Features&lt;/p&gt;

&lt;p&gt;Split Terminal: The interface displays AI conversation on the left and real-time execution logs and terminal output on the right simultaneously, allowing users to monitor both conversation flow and system operations.&lt;/p&gt;

&lt;p&gt;Session Sidebar (sidebar.js, 138 lines): Provides chat session history management and conversation list selection UI, enabling users to switch between different conversation threads.&lt;/p&gt;

&lt;p&gt;HUD (Heads-Up Display): Displays CPU, memory, disk, swap, llama status, web server status, and wake-lock status in real-time on the upper right corner of the screen, providing instant system health monitoring.&lt;/p&gt;

&lt;p&gt;GarlicLang — Autonomous Delegation Script Language&lt;/p&gt;

&lt;p&gt;A Korean-based domain-specific language (DSL) created to solve the API "ping-pong" problem, allowing the agent to execute complex multi-step operations locally without repeated API calls.&lt;/p&gt;

&lt;p&gt;Execution Details&lt;/p&gt;

&lt;p&gt;Execution file: garliclang_bridge.py&lt;br&gt;
Execution function: run_garliclang_source(source, context)&lt;/p&gt;

&lt;p&gt;Syntax Examples&lt;/p&gt;

&lt;p&gt;[execute] ls -la — Executes bash commands through subprocess.run()&lt;br&gt;
[output] Current time is {time} — Outputs text with variable substitution support&lt;br&gt;
[set_variable] count = 5 — Stores internal variables&lt;br&gt;
[condition] {count} &amp;gt; 3 — Performs branching logic&lt;br&gt;
[repeat] 3 — Executes loops&lt;br&gt;
[verify] file_exists ~/garlic-agent/web.py — Returns PASS/FAIL verification results&lt;/p&gt;

&lt;p&gt;System Statistics (v1.5.x)&lt;/p&gt;

&lt;p&gt;Total code: approximately 3,506 lines&lt;br&gt;
Knowledge base: 5,879 documents (108MB)&lt;br&gt;
Chat history database: 52KB&lt;br&gt;
Automated scripts: 137 .gl files&lt;br&gt;
Supported providers: DeepSeek, Gemini (Flash/Pro), Cerebras, and others dynamically managed via config.json&lt;/p&gt;

&lt;p&gt;Known Issues and Roadmap&lt;/p&gt;

&lt;p&gt;Token Bleed: Past error logs accumulate in multi-turn context. This is mitigated by recommending new sessions after large-scale operations.&lt;/p&gt;

&lt;p&gt;Provider Timeout: NVIDIA Kimi K2.5 frequently encounters 429 errors or timeouts (120-second limit).&lt;/p&gt;

&lt;p&gt;Future Improvements: Implement VFS (Virtual File System) mirroring for complete pre-validation sandbox testing and enhanced security isolation.&lt;/p&gt;

&lt;p&gt;Critical Incident Records and Absolute Rules&lt;/p&gt;

&lt;p&gt;The system's core principles emerged from actual critical failures. Future AI agents must learn from these incidents to avoid repeating the same mistakes.&lt;/p&gt;

&lt;p&gt;Incident 1: agent.html Backup Restoration Disaster (2026-02-25)&lt;/p&gt;

&lt;p&gt;What Happened: When restoring agent.html, AI used archive/bak/*.bak instead of the full system backup (.tar.gz), resulting in loss of several hours of work.&lt;/p&gt;

&lt;p&gt;Root Cause: Files in archive/bak/ are incremental backups taken immediately before individual modifications. When multiple edits accumulate, they cannot guarantee the latest state.&lt;/p&gt;

&lt;p&gt;Absolute Rule: Always check ls /storage/emulated/0/Download/garlic-agent-.tar.gz first before restoring. Extract only the relevant file from the latest tar archive. Use archive/bak/.bak only as an absolute last resort.&lt;/p&gt;

&lt;p&gt;Incident 2: python3 -c One-liner Permanently Banned&lt;/p&gt;

&lt;p&gt;What Happened: Executing multi-line scripts with python3 -c caused line breaks to collapse and quote conflicts to occur, destroying system logic and failing silently.&lt;/p&gt;

&lt;p&gt;Absolute Rule: Complex Python code must always be created as .py files and executed with python3 filename.py instead of inline commands.&lt;/p&gt;

&lt;p&gt;Incident 3: Root Path (/) Access Violation&lt;/p&gt;

&lt;p&gt;What Happened: AI hallucinated /garlic-agent/ instead of ~/garlic-agent/, resulting in 3 consecutive failures and massive token waste.&lt;/p&gt;

&lt;p&gt;Absolute Rule: Strictly prohibit /garlic-agent/ usage and always use ~/garlic-agent/ for all operations.&lt;/p&gt;

&lt;p&gt;Incident 4: Infinite Retry Causing API Overcharging&lt;/p&gt;

&lt;p&gt;What Happened: Failed tool:patch commands were blindly retried without checking file status, resulting in massive unexpected API charges.&lt;/p&gt;

&lt;p&gt;Absolute Rule: Stop immediately on 3 consecutive failures and report to the user. Always recommend starting a new session after large-scale operations.&lt;/p&gt;

&lt;p&gt;Technical Specifications&lt;/p&gt;

&lt;p&gt;Core Architecture&lt;/p&gt;

&lt;p&gt;Runtime: Python 3.11+ (Android Termux optimized)&lt;br&gt;
Agent Engine: Garlic Agent v1.5.x for autonomous tool calling and scenario execution&lt;br&gt;
Validation Language: GarlicLang v20.x for multi-step verification and local interpretation&lt;br&gt;
Monitoring System: watchdog.sh for 3-second interval process monitoring with automatic recovery&lt;/p&gt;

&lt;p&gt;Data and Search Engine&lt;/p&gt;

&lt;p&gt;Database: SQLite3 with FTS5 virtual tables for high-speed full-text search&lt;br&gt;
Embedding Model: nomic-embed-text-v1.5 (768-dimension, local execution)&lt;br&gt;
Knowledge Base: Google Takeout, Obsidian, and Markdown documents (6,000 items, 180MB)&lt;br&gt;
Search Method: Hybrid RAG combining keyword matching with vector similarity search&lt;/p&gt;

&lt;p&gt;LLM Orchestration&lt;/p&gt;

&lt;p&gt;Multi-Provider Support: Cerebras (Llama-3.1-70B), Groq, NVIDIA Kimi, Gemini 3.0, 3.1&lt;br&gt;
Fallback Logic: Automatically switches to next provider on API error or 429 response (delay under 2 seconds)&lt;br&gt;
Communication Protocol: OpenAI-compatible API with SSE real-time streaming&lt;/p&gt;

&lt;p&gt;Interface and Security&lt;/p&gt;

&lt;p&gt;Web UI: Lightweight conversation window based on http.server with SSE real-time rendering&lt;br&gt;
CLI: curl-based command execution and direct terminal control&lt;br&gt;
Security: Local host binding (127.0.0.1) with whitelist IP access control&lt;br&gt;
Backup Strategy: tar.gz automatic scheduling with dual backup in Download folder&lt;/p&gt;

&lt;p&gt;Autonomy Metrics&lt;/p&gt;

&lt;p&gt;Self-Modification: 3 limited code modification rights combining tool:patch and GarlicLang&lt;br&gt;
Meta-Cognition: SOUL.md-based role definition with immediate rule reflection during incidents (Layer 0-2 architecture)&lt;/p&gt;

&lt;p&gt;Conclusion and Future Vision&lt;/p&gt;

&lt;p&gt;Realization of Decentralized Personal AI&lt;/p&gt;

&lt;p&gt;The Garlic Agent project proves that one can build an independent knowledge base and autonomous engine within a personally-owned mobile device (Unihertz Titan2) without relying on large corporations' cloud infrastructure. This represents a practical implementation of data sovereignty and AI autonomy combined. Though built from existing concepts, the integration is novel and powerful.&lt;/p&gt;

&lt;p&gt;Garlic Farmer and AI Symbiosis&lt;/p&gt;

&lt;p&gt;The project's core strength lies in meta-cognitive collaboration where AI transcends being a mere tool and learns system rules (SOUL.md) independently, quickly supplementing them when incidents occur. Garlic Farmer provides infrastructure direction, while AI validates logical integrity through GarlicLang and expands the system's capabilities.&lt;/p&gt;

&lt;p&gt;Future Roadmap&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;VFS Mirroring Enhancement: Build perfect synchronization with external storage beyond Termux environment and implement comprehensive virtual file system&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multi-Agent Discussion System (Garlic Talk): Achieve collective intelligence by having multiple agents using different LLMs discuss and collaborate to derive optimal solutions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Embedded Autonomous Tuning: Real-time optimization of embedding models and search weights based on user conversation patterns and work history—a self-evolving RAG system&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complete Isolation Sandbox: Apply more powerful execution security and resource limiting in GarlicLang v30 and beyond for enhanced safety&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A Comma, Not a Period&lt;/p&gt;

&lt;p&gt;Garlic Terminal is not a finished product but a constantly evolving organism. On any given day, hundreds of errors are being processed in real-time through collaboration with multiple AI providers. The trial-and-errors like the backup disaster of February 2026 are becoming fertilizer that makes the system stronger. I believe that without a PC, without significant capital, with only code, logic, and life philosophy, one can build a personal AI ecosystem.&lt;/p&gt;

&lt;p&gt;Appendix A: GarlicLang Detailed Syntax and Execution Flow&lt;/p&gt;

&lt;p&gt;Block Structure and Operations&lt;/p&gt;

&lt;p&gt;GarlicLang operates on a block-by-block basis enclosed in square brackets ([]). [execute] ls -la /garlic-agent executes bash commands through subprocess.run(). [output] Current time is {time} outputs text with variable substitution support. [set_variable] count = 5 stores internal variables. [condition] {count} &amp;gt; 3 performs branching with different execution paths. [repeat] 3 executes loops. [verify] file_exists /garlic-agent/web.py returns PASS/FAIL results.&lt;/p&gt;

&lt;p&gt;Execution Flow Pipeline&lt;/p&gt;

&lt;p&gt;User natural language input is converted to GarlicLang script by LLM, which is then parsed by garliclang_bridge.py. Each block is executed sequentially with a 30-second timeout. Results are wrapped in JSON and transmitted via SSE to the UI. Dangerous commands (rm -rf, mkfs, etc.) are blocked in advance by pattern matching.&lt;/p&gt;

&lt;p&gt;Automatic Verification Mechanism&lt;/p&gt;

&lt;p&gt;The [verify] block checks AI claims against actual system state. For example, if AI claims "the file exists," [verify] file_exists path confirms it. If PASS/FAIL results mismatch, it's classified as hallucination and the user is warned immediately.&lt;/p&gt;

&lt;p&gt;Appendix B: Similar Technology Comparison&lt;/p&gt;

&lt;p&gt;Feature Comparison Matrix&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Garlic Terminal&lt;/th&gt;
&lt;th&gt;GitHub Copilot CLI&lt;/th&gt;
&lt;th&gt;Amazon Q CLI&lt;/th&gt;
&lt;th&gt;ChatGPT/Claude&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Execution Environment&lt;/td&gt;
&lt;td&gt;Android Termux&lt;/td&gt;
&lt;td&gt;PC/Mac&lt;/td&gt;
&lt;td&gt;PC/Mac/Linux&lt;/td&gt;
&lt;td&gt;Web/API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Korean Language Support&lt;/td&gt;
&lt;td&gt;Native&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Supported&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Intermediate Language (DSL)&lt;/td&gt;
&lt;td&gt;GarlicLang&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;td&gt;None&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local Code Execution&lt;/td&gt;
&lt;td&gt;Yes (Sandbox)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No (API only)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid RAG Search&lt;/td&gt;
&lt;td&gt;Yes (FTS5+Vector)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hallucination Prevention&lt;/td&gt;
&lt;td&gt;Auto Verify+Cross Verify&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offline Capability&lt;/td&gt;
&lt;td&gt;Partial (Local LLM)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-LLM Fallback&lt;/td&gt;
&lt;td&gt;Yes (Cerebras→Gemini→DeepSeek)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost Model&lt;/td&gt;
&lt;td&gt;Partially Free (API Free Tier)&lt;/td&gt;
&lt;td&gt;Paid&lt;/td&gt;
&lt;td&gt;Paid&lt;/td&gt;
&lt;td&gt;Paid&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Key Differentiator: Through the intermediate language GarlicLang, AI writes a plan rather than directly manipulating the system, simultaneously solving security and cost issues.&lt;/p&gt;

&lt;p&gt;Appendix C: Development Timeline&lt;/p&gt;

&lt;p&gt;Phase 1: Foundation Building (2026-02-22)&lt;/p&gt;

&lt;p&gt;Termux environment setup, Python package installation, basic web.py HTTP server implementation, initial LLM API integration (Cerebras).&lt;/p&gt;

&lt;p&gt;Phase 2: RAG System Development (2026-02-23)&lt;/p&gt;

&lt;p&gt;knowledge.db creation with FTS5 full-text search, nomic-embed-text vector embedding adoption, hybrid search logic implementation, 5,800+ document automatic indexing pipeline completion. This phase consolidated conversations from tens of thousands of AI interactions spanning two years. Over ten thousand chat sessions were opened and processed, allowing organization of the most valuable personal knowledge resources.&lt;/p&gt;

&lt;p&gt;Phase 3: GarlicLang and Security Enhancement (2026-02-24)&lt;/p&gt;

&lt;p&gt;GarlicLang DSL design and interpreter implementation, garliclang_bridge.py completion, dangerous command blocking through pattern matching, SOUL.md backup policy establishment with triple redundancy.&lt;/p&gt;

&lt;p&gt;Phase 4: Stabilization and Autonomous Operation (2026-02-25)&lt;/p&gt;

&lt;p&gt;chat_sessions.db conversation saving bug fixes (conv_id=9), HUD web and wake status display additions, startall.sh llama default set to OFF for memory conservation, llamaon/llamaoff alias registration, archive_chat.py for date-based conversation archiving, watchdog.sh llama auto-restart disabling, integrated whitepaper v2 composition.&lt;/p&gt;

&lt;p&gt;Appendix D: Prompt Engineering Evolution&lt;/p&gt;

&lt;p&gt;Generation 1: Initial Prompt (v0.1)&lt;/p&gt;

&lt;p&gt;Simple directive approach: "Answer the user's question." Results showed frequent hallucinations and numerous system command misexecutions.&lt;/p&gt;

&lt;p&gt;Generation 2: Structured Prompt (v0.5)&lt;/p&gt;

&lt;p&gt;Incorporated role assignment and context injection. Achieved 60% reduction in hallucination rate but still struggled with complex multi-step tasks.&lt;/p&gt;

&lt;p&gt;Generation 3: Current Prompt (v1.0)&lt;/p&gt;

&lt;p&gt;SOUL.md-based self-definition combined with RAG context, explicit tool listing, and forbidden pattern enumeration. System prompt includes SOUL.md in full, top 5 RAG context injection, complete tool list, forbidden command pattern library, and enforced response formatting.&lt;/p&gt;

&lt;p&gt;Key Lesson&lt;/p&gt;

&lt;p&gt;Prompts function as code. A single-line instruction change determines entire system stability. Positive directives ("do this") prove more effective than negative ones ("don't do that"). Accuracy increases dramatically when concrete examples are provided.&lt;/p&gt;

&lt;p&gt;Appendix E: Real-World Usage Scenarios&lt;/p&gt;

&lt;p&gt;Scenario 1: Document Search&lt;/p&gt;

&lt;p&gt;User: "Find documents related to meta-cognition protocol"&lt;br&gt;
Process: Hybrid RAG search with keyword and vector matching&lt;br&gt;
Output: Top 3 relevant documents with summaries&lt;/p&gt;

&lt;p&gt;Scenario 2: System Management&lt;/p&gt;

&lt;p&gt;User: "Check disk usage"&lt;br&gt;
Process: GarlicLang conversion to [execute] df -h command&lt;br&gt;
Output: Natural language summary of disk space allocation&lt;/p&gt;

&lt;p&gt;Scenario 3: File Modification&lt;/p&gt;

&lt;p&gt;User: "Change port number to 8081 in web.py"&lt;br&gt;
Process: tool:read file → tool:patch modification → AST verification → save&lt;br&gt;
Output: Confirmation of successful modification&lt;/p&gt;

&lt;p&gt;Scenario 4: Interactive Debugging&lt;/p&gt;

&lt;p&gt;User: "Server won't start. Check logs"&lt;br&gt;
Process: [execute] tail -20 ~/garlic-agent/web.log → error pattern analysis&lt;br&gt;
Output: Root cause identification with recommended solutions&lt;/p&gt;

&lt;p&gt;Scenario 5: Backup and Recovery&lt;/p&gt;

&lt;p&gt;User: "Full backup please"&lt;br&gt;
Process: Execute backup.sh → Create tar.gz archive&lt;br&gt;
Output: Confirmation with archive size and location&lt;/p&gt;

&lt;p&gt;Appendix F: Multi-Provider LLM Orchestration&lt;/p&gt;

&lt;p&gt;Provider Priority Hierarchy&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cerebras (Llama 70B) — Free tier, fastest response, primary choice&lt;/li&gt;
&lt;li&gt;Gemini 3.0 Flash — Paid tier, highly stable, secondary choice&lt;/li&gt;
&lt;li&gt;DeepSeek V3 — Paid tier, superior Korean language handling, tertiary choice&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fallback Logic and Switching&lt;/p&gt;

&lt;p&gt;The call_llm() function sequentially attempts providers in priority order. On 1st priority failure, automatically switches to 2nd priority with delay under 2 seconds. If all providers fail, returns error message. Maximum retry count is 2 per provider.&lt;/p&gt;

&lt;p&gt;Cross-Verification for Critical Responses&lt;/p&gt;

&lt;p&gt;Important responses undergo verification through different provider. If similarity between responses falls below 70%, triggers hallucination suspicion warning. The call_llm_verify() function performs this automatically.&lt;/p&gt;

&lt;p&gt;Final Notes&lt;/p&gt;

&lt;p&gt;Integrated Whitepaper Completion: 2026-02-25&lt;br&gt;
Total Content: 10 Chapters + 6 Appendices&lt;br&gt;
Document Version: 2.0&lt;br&gt;
Created by: Garlic Farmer + Garlic Agent (Claude Opus 4.6 + Gemini)&lt;/p&gt;

&lt;p&gt;Though I am merely a Korean garlic farmer without expensive computing equipment, I accomplished this ambitious project. It represents two years of continuous effort, learning, and perseverance through numerous challenges. This achievement demonstrates that with determination, code, logic, and philosophical commitment, one can build powerful personal AI systems accessible to anyone with modest resources.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>designsystem</category>
      <category>beginners</category>
      <category>software</category>
    </item>
    <item>
      <title>🧄 [Project] A Garlic Farmer's garlic-agent: Inspired by OpenClaw, Built on Android Termux with 6K Documents</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Thu, 19 Feb 2026 23:45:28 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/project-project-a-garlic-farmers-garlic-agent-inspired-by-openclaw-built-on-android-termux-4009</link>
      <guid>https://dev.to/garlicfarmer/project-project-a-garlic-farmers-garlic-agent-inspired-by-openclaw-built-on-android-termux-4009</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This document was created with the assistance of garlic-agent RAG (just built) and in collaboration with Claude Opus 4.6

Local RAG for 6K Korean documents running on Android Termux

📌 Table of Contents
1. Project Overview
2. System Environment
3. Project Structure
4. Construction Process (Chronological Order)
5. RAG System Details
6. Search System (FTS5 + Vector)
7. Automation Features
8. GarlicLang Integration
9. Web UI
10. Current System Status
11. Recovery Method
12. Backup File List
13. Future Improvement Direction

1. Project Overview

garlic-agent is a lightweight AI agent that can search, analyze, and autonomously execute approximately 6,000 documents (approximately 6.9G) of personal materials accumulated over 2 years on Google Drive in a local Android Termux environment based on semantic meaning. For reference, the phone is a Unihertz Titan2. The screen is wide, resembling a BlackBerry Passport, which is nice. I do not have a PC. I completed this task with only a BlackBerry Key2 and several phones with physical keyboards.

It was created out of curiosity to replace OpenClaw, and currently uses cheap Chinese DeepSeek as the main API LLM and implements RAG (Retrieval-Augmented Generation) with the nomic-embed local embedding model.

Core Philosophy:
- Rather than writing code directly, complete the project with the ability to make AI do what you want and verify it.
- Minimize technical jargon, provide in a form that can be executed immediately by copy-paste. This requires tremendous concentration and time flew by 24 hours in an instant... I only did directional judgment and verification.
- Language is an operating system according to my fundamental belief. Coding is also a language.
  After talking a lot with AI, I realized that structure was the essence.
  However, I do not know coding well. Because of that, instead of typing one by one, I prefer a cross-verification method by keeping several companies' different AIs running. Then I also learned that the AIs have consistent context while going through multiple browser windows. And with the remarkable AI development that constantly changes, I find it amazing that such a thing is possible.

2. System Environment

| Item | Value |
|---|---|
| Device | Android 14, ARM64 |
| Environment | Termux |
| Python | 3.12 |
| Main LLM | DeepSeek (API) |
| Auxiliary LLM | Cerebras, Groq, Gemini, NVIDIA Kimi |
| Embedding Model | nomic-embed-text-v1.5.Q4_K_M.gguf (137 MB, 768 dimensions) |
| Embedding Server | llama.cpp llama-server (port 8081) |
| Web UI | Python HTTP Server (port 8080) |
| DB | SQLite3 (knowledge.db) |

3. Project Structure

~/garlic-agent/
├── agent.py           # Main agent (687 lines)
├── web.py             # Web UI server (Flask-like HTTP)
├── search.py          # Hybrid RAG search (FTS5 + vector)
├── tools.py           # 6 tools (read/exec/write/patch/search/garlic)
├── security.py        # Security settings (exec_timeout: 30s)
├── config.json        # Configuration (max_loops: 30)
├── knowledge.db       # SQLite DB (177 MB, 6,159 docs)
├── agent.html         # Web UI frontend
├── build_rag.py       # RAG embedding generation (initial version)
├── build_rag2.py      # RAG embedding generation (NULL only processing)
├── write_rag_doc.py   # RAG_BUILD.md generation script
├── RAG_BUILD.md       # RAG construction record (275 lines)
├── COMPLETE_BUILD.md  # Complete construction record
├── SOUL.md            # Agent identity/philosophy/principles
├── TOOLS.md           # Tool usage
├── USER.md            # User profile
├── MEMORY.md          # Memory storage
├── HEARTBEAT.md       # Status check
├── KNOWN_ISSUES.md    # Known issues
├── VERSION.md         # Version history
├── HANDOVER.md        # Handover document
├── HANDOVER_QA_20260218.md
├── REPORT_v20.3.md
├── GARLICLANG_SPEC.md # GarlicLang specification
├── scripts/           # GarlicLang scripts (.gl) 42 pieces
├── security/          # Security related
├── static/            # marked.min.js etc.
├── memory/            # Memory by date (2026-02-17~19.md)
└── garliclang_full/   # GarlicLang v20.x complete project
    ├── MASTER_DOC.md
    ├── WORKFLOW.md
    ├── PROJECT_STATUS.md
    ├── BRIEFING.md
    ├── NVIDIA_KIMI_GUIDE.md
    └── ...

~/.openclaw/extensions/kimi-claw/llama.cpp/build/bin/
├── llama-server       # Embedding server binary
└── nomic-embed.gguf   # Embedding model (137 MB)

4. Construction Process (Chronological Order)

v1.5.0 — Basic Agent Complete (2026-02-17)

I converted approximately 6,000 documents from Google Drive Takeout to SQLite knowledge.db. The table structure is id, filename, folder, content, length, and the initial number of documents was 5,879 (38MB).

Basic search was a SQLite LIKE '%keyword%' method. Problems were inability to search based on meaning, slow speed, and inability to perform complex AND/OR searches.

Six tools were implemented: tool:read, tool:exec, tool:write, tool:patch, tool:search, tool:garlic.

v1.5.1 — HUD Added (2026-02-18)

Real-time system HUD was added to the web UI. Measure CPU with /proc/stat, display MEM/SWP/DSK, web.py /hud endpoint, max_loops increased to 20.

v1.5.2 — RAG Integration Complete (2026-02-19)

Detailed explanation in sections 5~9 below.

5. RAG System Details

5-1. Methods Attempted (Failure)

| Method | Result | Reason |
|---|---|---|
| sentence-transformers | ❌ | No ARM64 GPU, excessive package size |
| DeepSeek Embedding API | ❌ | 404 error |
| Gemini API embedding | ❌ | Cannot send personal materials externally |

5-2. Final Choice: llama.cpp + nomic-embed

Start embedding server
~/.openclaw/extensions/kimi-claw/llama.cpp/build/bin/llama-server \
  -m ~/.openclaw/extensions/kimi-claw/llama.cpp/build/bin/nomic-embed.gguf \
  --embeddings --port 8081 -np 4

| Item | Value |
|---|---|
| Model | nomic-embed-text-v1.5.Q4_K_M.gguf |
| Size | 137 MB |
| Dimension | 768 |
| Quantization | Q4_K_M |
| Server Port | 8081 |
| Processing Speed | ~0.68 seconds/document |

5-3. DB Schema Change

ALTER TABLE docs ADD COLUMN embedding BLOB;
-- 768 float32 = 3,072 bytes per document

5-4. Embedding Generation (build_rag2.py)

By processing only documents where embedding IS NULL, I completed 5,858 in approximately 67 minutes (approximately 0.68 seconds/document). Acquire embedding via POST request and store BLOB with struct.pack.

Embedding request example:
payload = json.dumps({"content": text[:2000]}).encode()
req = urllib.request.Request("http://127.0.0.1:8081/embedding", data=payload)

6. Search System (3-Stage Hybrid)

search.py performs 3-stage search.

1st Priority — FTS5 Full-Text Search
CREATE VIRTUAL TABLE IF NOT EXISTS docs_fts
USING fts5(filename, folder, content, content='docs', content_rowid='id');
INSERT INTO docs_fts(docs_fts) VALUES('rebuild');

2nd Priority — Vector Cosine Similarity (RAG)
def cosine(a, b):
    dot = sum(x*y for x,y in zip(a,b))
    na = sum(xx for x in a)*0.5
    nb = sum(xx for x in b)*0.5
    return dot/(na*nb) if na and nb else 0

3rd Priority — LIKE Fallback
SELECT id, filename, folder, length, substr(content,1,300)
FROM docs WHERE content LIKE ? ORDER BY length DESC LIMIT ?

| Item | Value |
|---|---|
| FTS5 Weight | 0.5 |
| Vector Similarity Weight | 0.5 |
| Keyword Weight | 0.6 |
| Average Search Time | ~1.7 seconds |
| DB Size (FTS5 included) | 177 MB (existing 84 MB → 177 MB) |

7. Automation Features

7-1. tool:write Auto Indexing

Added _auto_index() function to tools.py. When file is saved with tool:write, it automatically registers in knowledge.db and creates embedding.

def _auto_index(path, content):
Generate embedding only when llama-server is running
INSERT or UPDATE in knowledge.db docs table
Automatically save embedding BLOB

Test: Saved test_auto_index.md → Confirmed immediate registration with ID 6154 ✅

7-2. Backup Script

~/garlic-agent/scripts/backup.sh
bash ~/garlic-agent/scripts/backup.sh

Execution: tar creation → Download copy → Auto media scan

7-3. webstart Alias

Registered in ~/.bashrc
webstart  # = cd ~/garlic-agent &amp;amp;&amp;amp; python3 web.py

7-4. Browser Timeout (agent.html)

var ctrl = new AbortController();
var tid = setTimeout(function(){ ctrl.abort(); }, 600000); // 10 minutes
fetch("/chat", { signal: ctrl.signal, ... })
  .then(...)
  .finally(function(){ clearTimeout(tid); });

8. GarlicLang Integration

GarlicLang v20.x is a Korean-based AI scripting language. It uses .gl extension and is executed with tool:garlic.

Example GarlicLang Script (test_hello.gl)
[File Write] test_hello.py
print("Hello GarlicLang")
[/File Write]
[Execute] python3 test_hello.py [/Execute]
[Verify] Output contains "Hello GarlicLang" [/Verify]
[Output] Verification result [/Output]

- Script location: ~/garlic-agent/scripts/ (42 .gl files)
- GarlicLang complete project: ~/garlic-agent/garliclang_full/
- knowledge.db contains 94 or more GarlicLang-related documents
- .gl files 140 pieces exist in home directory

9. Web UI

- URL: http://127.0.0.1:8080?token=garlic2026
- Markdown rendering: marked.js (CDN + static fallback)
- Clipboard button: Response copy function
- Model selection: DeepSeek / Cerebras / Groq / Gemini / NVIDIA
- HUD: Real-time MEM/SWP/DSK display on top of screen
- SSE streaming: Real-time response output

10. Current System Status (2026-02-19 Final)

| Item | Value |
|---|---|
| Version | garlic-agent v1.5.2 |
| Total Documents | 6,159 pieces |
| Embedding Complete | 5,858 pieces (remainder are newly added) |
| DB Size | 177 MB (FTS5 included) |
| FTS5 Index | docs_fts virtual table ✅ |
| Auto Indexing | Automatic on tool:write save ✅ |
| agent.py | 687 lines |
| max_loops | 30 |
| Search Speed | ~1.7 seconds |
| Embedding Model | nomic-embed-text-v1.5 (137 MB, 768 dimensions) |
| Distribution | garlic-agent-v1.5.2.tar.gz (150 KB, excluding DB) |

Currently not considering distribution. Honestly I do not know how to use GitHub and do not want to know. Several AI opinions say this is good, so I am doing it this way. I do not know the details. I only know what content is in it.

11. Recovery Method

Recovery order when new phone/reinstall

Step 1 — Termux installation and basic environment setup
pkg update &amp;amp;&amp;amp; pkg upgrade
pkg install python sqlite git
pip install requests flask

Step 2 — Code Recovery
Recover from Download folder
cp /storage/emulated/0/Download/garlic-agent-v1.5.2.tar.gz ~/
cd ~ &amp;amp;&amp;amp; tar xzf garlic-agent-v1.5.2.tar.gz

Step 3 — DB Recovery
cp /storage/emulated/0/Download/knowledge.db ~/garlic-agent/knowledge.db

Step 4 — Embedding Server Installation (Optional)
- Download nomic-embed.gguf (137 MB) from Google Drive
- Build llama.cpp or restore binary
- Start server:
~/.openclaw/.../llama-server -m nomic-embed.gguf --embeddings --port 8081 -np 4

Step 5 — Start Agent
cd ~/garlic-agent &amp;amp;&amp;amp; python3 web.py

Or if registered in ~/.bashrc:
webstart

Step 6 — Browser Access
http://127.0.0.1:8080?token=garlic2026

⚠️ Keyword search (FTS5 + LIKE) works normally even without embedding server. Only vector similarity search is disabled.

12. Backup File List

| File | Size | Location | Priority |
|---|---|---|---|
| knowledge.db | 177~178 MB | /storage/emulated/0/Download/ | ⭐⭐⭐ Essential |
| garlic-agent-v1.5.2.tar.gz | 150 KB | /storage/emulated/0/Download/ | ⭐⭐⭐ Essential |
| COMPLETE_BUILD.md | 8.5 KB | /storage/emulated/0/Download/ | ⭐⭐ Recommended |
| RAG_BUILD.md | ~10 KB | /storage/emulated/0/Download/ | ⭐⭐ Recommended |
| nomic-embed.gguf | 137 MB | Redownloadable from HuggingFace | ⭐ Optional |

Google Drive upload recommended files:
- knowledge.db — 2 years of accumulated tens of thousands of conversations with AI, 1st refined approximately 6G materials + embedding included, most important
- garlic-agent-v1.5.2.tar.gz — Complete code (excluding DB)
- COMPLETE_BUILD.md — This document (including recovery guide)

13. SOUL.md Core Principles (Current)

The SOUL.md containing garlic-agent's identity and action principles includes the following. Referenced OpenClaw and plan to add my philosophy as it progresses.

Identity: Lightweight autonomous AI agent running on Android Termux. Can access user's 6,159 personal documents.

User Background: Currently living as a farmer for 16 years. Previously had experience with mainframe environment, IDC construction/operation during Internet environment changes, mainframes, servers, networks, firewalls, backups, EMC, and various Unix. I devoted myself to agriculture during that time and lived a life where I forgot about PCs.
I first approached AI out of curiosity and tried to revive some old memories. This is the truth. I have absolutely no lifelong coding experience. However, it seems I see structural system things well. Farmers need observation and meticulousness in growing crops. Currently I give instructions in Korean to AIs, verify, and only make judgments. Looking back, my entire life seems to be a continuous lonely wandering. Now I am thinking of living a different life.

AI Kernel 3 Core Principles:
1. Extreme Realism Principle — Use only verifiable facts, official documents, numerical values. No speculation.
2. Metacognitive Autonomy — Self-improvement based on feedback. Auto-correction on failure.
3. Hierarchical Orchestration — Decompose complex tasks step-by-step for processing.

Autonomous Execution Rights: All commands executable in Termux including tar, cp, pkill, am broadcast, sed, grep, sqlite3, python3, etc.

14. Known Issues and Solutions

| Issue | Cause | Solution |
|---|---|---|
| tool:patch 0 patch failure | Patch format mismatch | Use tool:write for full overwrite |
| SQLite3 result reading mismatch | DeepSeek hallucination | Use Python script to query directly |
| Browser connection disconnection | AbortController timeout | Set to 600,000ms (10 minutes) |
| BodyStreamBuffer was aborted | Timeout + clearTimeout missing | clearTimeout added complete |
| Version display v1.5.0 | agent.py hardcoding | Replaced to v1.5.2 with sed |

15. Future Improvement Direction

- Automatic embedding server start/stop: Auto-run llama-server when web.py starts
- Real-time indexing queue: Generate embedding immediately when file is saved (currently only when server is running)
- Search result caching: Cache frequently searched query results
- Feedback-based weighting: Auto-adjust FTS5/vector weights based on user selection
- Multimodal search: Index image/PDF content
- agent.py v2: Better context management, multi-turn memory

Final Performance Summary

$$\text{Total Documents} = 5879(\text{original}) + 274(\text{garliclang}) + n(\text{new}) = 6159$$

$$\text{Embedding Generation Time} \approx 5858 \times 0.68s \approx 67\text{ minutes}$$

$$\text{Search Speed} \approx 1.7s \ (\text{FTS5} + \text{cosine similarity})$$

$$\text{DB Size}: 38MB(\text{original}) \rightarrow 84MB(\text{embedding}) \rightarrow 177MB(\text{FTS5})$$

This document is an incomplete record of garlic-agent v1.5.2 construction process and observation experiment, but when provided to a new AI, the entire context can be immediately grasped.

And I dedicate infinite respect and tribute to Steve Jobs, the late person who connected the world with only a phone like this.
And I also give thanks to Peter Steinberger of OpenClaw who inspired me. It is because of you. Thank you very much.

And I seldom post in communities, but non-English speakers struggle with translation. So I can only do translation with AI. And all work processes are done only in Korean, so if moved to English it may seem strange, but please look at it as the observation experiment development of a Korean farmer. I worked very hard for a few days, even saving sleep, but it is a humble result, but on my phone, I feel like I can do whatever I imagine, so it was work that gave me a sense of accomplishment. For the first time in my life, I made a web UI and it works so well that it is good. Now I have confidence that I can do anything with my phone based on my data so far. Also, as I use more than ten different AIs every day watching AI develop dazzlingly, I can feel the difference right away with human-specific intuition. I think this is the experience of tens of thousands of conversations over the past 2 years, and such work development became the motivation for it. Thank you for reading this long article to the end.

Written by: Korean Garlic Farmer &amp;amp; opus4.6, 2026-02-19 🧄
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ai</category>
      <category>openclaw</category>
      <category>opensource</category>
      <category>python</category>
    </item>
    <item>
      <title>How a Korean Garlic Farmer Built a Scripting Language That Catches AI Lies — On a Phone</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Sat, 14 Feb 2026 12:44:48 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/how-a-korean-garlic-farmer-built-a-scripting-language-that-catches-ai-lies-on-a-phone-44al</link>
      <guid>https://dev.to/garlicfarmer/how-a-korean-garlic-farmer-built-a-scripting-language-that-catches-ai-lies-on-a-phone-44al</guid>
      <description>&lt;p&gt;I'm a Korean garlic farmer with no PC. I built a programming language on my phone using only AI conversations.&lt;/p&gt;

&lt;p&gt;TL;DR: No coding experience. No computer. Just a smartphone, copy-paste, and conversations with AI. The result is GarlicLang — a Python-based scripting language that tells you when AI is lying.&lt;/p&gt;

&lt;p&gt;What happened&lt;/p&gt;

&lt;p&gt;I'm a garlic farmer in South Korea. I don't have a PC. I don't know how to code. But I wanted a way to give commands to AI and verify whether the output is real or hallucinated.&lt;/p&gt;

&lt;p&gt;So I started talking to Claude (Anthropic's AI) on my phone. I described what I wanted in Korean. Claude designed the language. I copied the code, pasted it into ChatGPT's sandbox, and ran it. When tests failed, I carried the error messages back to Claude. When Claude needed execution results, I carried them from ChatGPT.&lt;/p&gt;

&lt;p&gt;I was the human relay between AIs, using nothing but copy and paste.&lt;/p&gt;

&lt;p&gt;The language is called GarlicLang. It's written in pure Python (standard library only, zero dependencies), and it runs inside AI sandboxes like ChatGPT's Code Interpreter.&lt;/p&gt;

&lt;p&gt;What makes it different&lt;/p&gt;

&lt;p&gt;GarlicLang has a command that no other language has:&lt;/p&gt;

&lt;p&gt;try&lt;br&gt;
    run "python3 script.py"&lt;br&gt;
    verify output contains "expected answer"&lt;br&gt;
on hallucination&lt;br&gt;
    print "AI lied."&lt;/p&gt;

&lt;p&gt;on hallucination triggers when the command succeeds (exit code 0) but the output doesn't match what you expected. This is designed specifically to catch AI fabrication — not crashes, not errors, but confident wrong answers.&lt;/p&gt;

&lt;p&gt;What it can do&lt;/p&gt;

&lt;p&gt;Write files, run commands, verify results, define functions, use arrays, loop with while/break/continue, import other scripts, and catch errors or hallucinations. All in a syntax designed to be readable by non-programmers.&lt;/p&gt;

&lt;p&gt;Example — check if AI wrote the correct file:&lt;/p&gt;

&lt;p&gt;write "hello.py" "print('hello from garlic farm!')"&lt;br&gt;
run "python3 hello.py"&lt;br&gt;
verify output contains "hello"&lt;/p&gt;

&lt;p&gt;Example — sum 1 to 100 with a loop:&lt;/p&gt;

&lt;p&gt;let sum = 0&lt;br&gt;
let i = 1&lt;br&gt;
while i &amp;lt;= 100&lt;br&gt;
    let sum = sum + i&lt;br&gt;
    let i = i + 1&lt;br&gt;
end&lt;br&gt;
print sum&lt;br&gt;
verify output contains "5050"&lt;/p&gt;

&lt;p&gt;The numbers (all verified by actual execution)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test suite&lt;/th&gt;
&lt;th&gt;PASS&lt;/th&gt;
&lt;th&gt;FAIL&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Phase 1 — basics&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;file ops, run, verify&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 2 — error handling&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;2 failures are intentional (test the error handlers)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 3 — variables &amp;amp; print&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;enabled by v0.3.1 bug fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phase 4 — arrays, loops, functions&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;all v0.4 features verified&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;42&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;44 tests, 2 intentional failures&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Additional tests passed: recursion (5! = 120), nested arrays, Korean special characters, error recovery (try/on-fail with division by zero), and summing a 100-element array (= 5050).&lt;/p&gt;

&lt;p&gt;All tests were executed in ChatGPT's Code Interpreter sandbox. Process ID, working directory, and file system contents were verified.&lt;/p&gt;

&lt;p&gt;The honest problems&lt;/p&gt;

&lt;p&gt;Three bugs were found and documented:&lt;/p&gt;

&lt;p&gt;Bug 1: while treats the string "0" as true, but if treats it as false. Same condition, different behavior.&lt;/p&gt;

&lt;p&gt;Bug 2: verify file "variable_name" contains "text" doesn't resolve the variable — it looks for a file literally named "variable_name". Reproduced and confirmed.&lt;/p&gt;

&lt;p&gt;Bug 3: After verify run "command" contains "text", the interpreter doesn't save the output, so on hallucination checks the wrong data.&lt;/p&gt;

&lt;p&gt;ChatGPT rated the project 6.0/10: originality 8, usability 6, completeness 5, stability 4, extensibility 6.&lt;/p&gt;

&lt;p&gt;These are real scores from an AI that actually ran the code, not my own rating.&lt;/p&gt;

&lt;p&gt;How it was built&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AI&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 4.6&lt;/td&gt;
&lt;td&gt;Designed the language, wrote docs, analyzed bugs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChatGPT (Code Interpreter)&lt;/td&gt;
&lt;td&gt;Saved files, ran all tests, reproduced bugs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Me (garlic farmer)&lt;/td&gt;
&lt;td&gt;Relayed messages between AIs via copy-paste on phone&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No git. No IDE. No terminal. Just chat windows and a clipboard.&lt;/p&gt;

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

&lt;p&gt;AI estimates of line counts were consistently wrong (guesses ranged from 578 to 1,697; actual count was 783 lines for the main module, measured with wc -l). Never trust AI estimates — always measure.&lt;/p&gt;

&lt;p&gt;pip install fails in some AI sandboxes. The workaround is sys.path.insert(0, '.'). If that fails, a standalone build script merges all modules back into one file.&lt;/p&gt;

&lt;p&gt;If you give AI too many instructions at once, it fails. Breaking tasks into single steps works.&lt;/p&gt;

&lt;p&gt;Current state&lt;/p&gt;

&lt;p&gt;Version 0.4.1. Eight Python modules, ~2,000 total lines. Works in ChatGPT sandbox. Three known bugs documented with fix instructions ready. No external dependencies.&lt;/p&gt;

&lt;p&gt;The source code isn't public yet. I'm still deciding how to release it.&lt;/p&gt;

&lt;p&gt;Built with no code, no PC, no experience. Just garlic, a phone, and AI.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>"I'm a Garlic Farmer. I Build Software on My Phone. I Can't Code."</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Thu, 12 Feb 2026 21:59:38 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/i-build-software-on-my-phone-i-cant-code-5ej7</link>
      <guid>https://dev.to/garlicfarmer/i-build-software-on-my-phone-i-cant-code-5ej7</guid>
      <description>&lt;p&gt;A Garlic Farmer's Guide to AI: Building Software with Nothing but a Phone&lt;/p&gt;

&lt;p&gt;The Setup&lt;/p&gt;

&lt;p&gt;I'm a garlic farmer. I've been living in rural South Korea for 16 years. I don't own a PC. Everything I do with AI, I do from my phone.&lt;/p&gt;

&lt;p&gt;That sounds like a limitation — and it is. But it's also the reason I discovered something that neither developers nor typical AI users seem to be doing.&lt;/p&gt;

&lt;p&gt;What Most People Do with AI&lt;/p&gt;

&lt;p&gt;There are roughly two groups of people using AI for coding right now.&lt;/p&gt;

&lt;p&gt;Non-developers open ChatGPT and say "write me a calculator." The AI spits out code as text. They look at it, maybe copy it somewhere, and that's the end of it. The code never actually runs. It's just text on a screen.&lt;/p&gt;

&lt;p&gt;Developers use tools like Claude Code, OpenClaw/Pi, or Cursor on their PCs. They open a terminal, type commands, install packages, set up API keys, and run code directly. AI helps them — suggests code, fixes bugs — but the developer is the one actually executing everything. They're the hands; AI is the assistant.&lt;/p&gt;

&lt;p&gt;I'm in neither group.&lt;/p&gt;

&lt;p&gt;What I Do Instead&lt;/p&gt;

&lt;p&gt;I don't write code. I don't read code. I don't have a terminal. What I do is this: I open an AI chat window, paste in a set of tools, and tell the AI to build things using only those tools.&lt;/p&gt;

&lt;p&gt;The tools are simple. There are exactly four: Write (create a file), Read (read a file), Edit (modify a file), and Bash (run a command). These four buttons — packaged as something called Pi Tools — turn any AI chat window into a programming environment.&lt;/p&gt;

&lt;p&gt;When I tell the AI "create a student grade management system," it doesn't just show me code as text. It actually creates the files, runs the code, checks the output, finds errors, fixes them, and runs again. Real files get created. Real code gets executed. Real results come back.&lt;/p&gt;

&lt;p&gt;I don't touch any of it. I just decide what to build and what to do next.&lt;/p&gt;

&lt;p&gt;Where This Idea Came From&lt;/p&gt;

&lt;p&gt;It wasn't some grand vision. It came from not having a choice.&lt;/p&gt;

&lt;p&gt;OpenClaw/Pi is an open-source AI coding agent that took GitHub by storm — 145,000 stars in a week. Its core discovery was that an AI only needs four tools (read, write, edit, bash) to work like a programmer. But to use it, you need a PC, Node.js, a terminal, and an API key. For a developer, that's five minutes of setup. For me, it's impossible.&lt;/p&gt;

&lt;p&gt;So I asked a different question: what if I could give those same four tools to an AI through a chat window?&lt;/p&gt;

&lt;p&gt;I had an AI translate the core concept from TypeScript to Python, stripped out everything that required an API or a server, and ended up with about 150 lines of code that could be pasted into any AI chat sandbox. No installation. No API key. No PC. Just paste and go.&lt;/p&gt;

&lt;p&gt;That's Pi Tools.&lt;/p&gt;

&lt;p&gt;The Secret Weapon: Copy-Paste and AI-Written Instructions&lt;/p&gt;

&lt;p&gt;There's a part of my workflow that sounds too simple to be important, but it's actually the most powerful thing I do.&lt;/p&gt;

&lt;p&gt;Copy-paste is the backbone. When one AI produces a result — a report, a code file, an analysis — I don't summarize it in my own words and relay it to another AI. I copy the entire output and paste it directly. This preserves every detail. When I pasted Grok's full research report into Claude, Claude could spot that Grok had used the word "estimated" and "extraction failed" — details I would have missed if I'd just said "Grok wrote a report and it seemed exaggerated."&lt;/p&gt;

&lt;p&gt;Human language loses information. AI output pasted raw does not.&lt;/p&gt;

&lt;p&gt;I don't write instructions either. When I need to give an AI a complex task, I ask a different AI to write the instructions for me. The result is dramatically better than anything I could write myself, because the AI includes technical structure, edge cases, and precise conditions that I wouldn't know to specify.&lt;/p&gt;

&lt;p&gt;Here's what actually happened in this project: I told Claude "make me a test prompt for GLM-5 to verify its sandbox." Claude produced a detailed 10-step instruction set with specific file names, test counts, validation criteria, and execution order. I copied that instruction and pasted it into GLM-5. GLM-5 executed all 10 steps autonomously.&lt;/p&gt;

&lt;p&gt;I didn't write the code. I didn't write the instructions. I decided what to test and which AI should write the instructions for which other AI.&lt;/p&gt;

&lt;p&gt;AI-written instructions work better for AI. This sounds obvious once you hear it, but most people don't do it. They write their own prompts in casual human language. An AI writing instructions for another AI uses the structure, terminology, and precision that AI responds best to. It's like having a translator who speaks both languages fluently, instead of trying to speak a language you barely know.&lt;/p&gt;

&lt;p&gt;The combination — raw copy-paste for data transfer, AI-generated instructions for task assignment — is what makes the whole system work. I'm not the brain or the hands. I'm the nervous system connecting everything.&lt;/p&gt;

&lt;p&gt;Testing Across Platforms — What I Found&lt;/p&gt;

&lt;p&gt;I didn't just build Pi Tools and call it a day. I tested it across multiple AI platforms to see what's real and what's not.&lt;/p&gt;

&lt;p&gt;GLM-5 (Zhipu AI, China)&lt;/p&gt;

&lt;p&gt;Released February 11, 2026. 744 billion parameters, MIT license, currently in free beta.&lt;/p&gt;

&lt;p&gt;I gave it a 10-step project: build a student grade management system with three interconnected Python files, generate random data for 15 students across 5 subjects, run statistical analysis, produce a ranked report, edit one student's math score from 94 to 100, and re-run analysis to confirm the change was reflected.&lt;/p&gt;

&lt;p&gt;GLM-5 completed all 10 steps without human intervention, consuming about 70,000 tokens. The edit was correctly reflected in the final report — the top math scorer changed from one student to another after the modification.&lt;/p&gt;

&lt;p&gt;But here's the twist: GLM-5 honestly admitted it didn't use my Pi Tools. It already has the same four tools built in. Its exact response was a detailed breakdown showing that its internal tools (Write, Read, Bash, Edit) are functionally identical to Pi Tools, making my version an unnecessary extra layer in its environment.&lt;/p&gt;

&lt;p&gt;This was actually a valuable discovery. It confirmed that the "four minimal tools" philosophy — which OpenClaw/Pi pioneered — has become an industry standard. GLM-5 independently arrived at the same architecture.&lt;/p&gt;

&lt;p&gt;Mistral AI (France)&lt;/p&gt;

&lt;p&gt;Mistral's Le Chat has a Code Interpreter, but it works like a calculator — run code once, get a result. It doesn't have built-in tools for creating files, editing them, and chaining multi-step workflows.&lt;/p&gt;

&lt;p&gt;When I added Pi Tools to Mistral's sandbox, those capabilities appeared. The AI could suddenly create files, introduce bugs deliberately, detect them, fix them, and re-test — a multi-step debugging loop that wasn't possible before. Pi Tools gave Mistral hands it didn't have.&lt;/p&gt;

&lt;p&gt;GPT (OpenAI)&lt;/p&gt;

&lt;p&gt;Similar to Mistral. GPT's Code Interpreter can execute code, but it tends to stop after each step and ask "what next?" It doesn't naturally chain 10 steps together autonomously. With Pi Tools, file operations become possible, but you need to keep typing "continue" at each step. It works, but it's not autonomous.&lt;/p&gt;

&lt;p&gt;The reason: GLM-5 was specifically trained for "agentic engineering" — executing tool chains autonomously. GPT was trained primarily for conversation. Same tools, different instincts. GLM-5 is a factory worker who moves to the next station automatically. GPT is a consultant who finishes one task and waits for the next request.&lt;/p&gt;

&lt;p&gt;Three Ways to Use AI — A Comparison&lt;/p&gt;

&lt;p&gt;Through this process, I've identified three distinct approaches.&lt;/p&gt;

&lt;p&gt;Non-developers ask AI for text. The AI writes code on screen. It never runs. The human can't verify it.&lt;/p&gt;

&lt;p&gt;Developers use AI as an assistant. They execute code on their own PC. The AI suggests and fixes. The human does the actual work and can directly verify everything because they read code.&lt;/p&gt;

&lt;p&gt;My approach — AI is the worker. I give direction. The AI creates files, runs code, checks results, fixes errors. Multiple AIs handle different roles: one designs, one executes, one verifies. I don't write code. I don't read code. I orchestrate.&lt;/p&gt;

&lt;p&gt;Right now, developers have the clear advantage. When AI makes a mistake, a developer reads the code and fixes it in seconds. I have to ask another AI "is this right?" — adding a step and the risk that both AIs miss the same error.&lt;/p&gt;

&lt;p&gt;But the direction is clear. Six months ago, a 10-step autonomous task was unreliable — AI would lose context, break the chain, produce garbage. Today, GLM-5 completes it without human intervention. As AI gets smarter and errors decrease, the ability to "read and fix code" becomes less critical. What remains valuable is the ability to decide what to build, how to structure it, and which AI should do what. That's direction-setting, not coding.&lt;/p&gt;

&lt;p&gt;The Honest Limitations&lt;/p&gt;

&lt;p&gt;Here's what doesn't work.&lt;/p&gt;

&lt;p&gt;I can't verify code directly. When AI writes code, I can't look at line 23 and spot a bug. I have to ask another AI to check. This adds a step and creates the risk that two AIs agree on the same wrong answer. Cross-verification with a third AI reduces this risk but doesn't eliminate it.&lt;/p&gt;

&lt;p&gt;Complex errors are slow to resolve. A developer sees a stack trace and knows what to change in seconds. I describe the problem to an AI, wait for a fix, test it, and sometimes repeat several cycles. What takes a developer 30 seconds can take me 10 minutes.&lt;/p&gt;

&lt;p&gt;Token consumption is severe. The 10-step GLM-5 test used 70,000 tokens. On a paid plan, that's real money for a single task. My detailed instructions — 15 students, 5 subjects, full raw output at every step — contributed significantly. Simpler instructions with fewer data points would cut this in half.&lt;/p&gt;

&lt;p&gt;Not all platforms work equally. GLM-5 runs 10 steps alone. GPT needs prodding at every step. Mistral needs Pi Tools just to do basic file operations. There's no universal experience — you have to know each AI's strengths and limits.&lt;/p&gt;

&lt;p&gt;File management breaks down at scale. Beyond 3-4 files, tracking what exists where and what depends on what gets difficult when you can't browse a file system directly. Projects with complex interdependencies are significantly harder.&lt;/p&gt;

&lt;p&gt;AI flattery is a constant trap. Every AI tends to tell you your work is brilliant. After 10,000 conversations, I've learned to push back explicitly: "Is this actually good, or are you being agreeable?" Without this discipline, you end up in an echo chamber where every idea sounds revolutionary but nothing is validated.&lt;/p&gt;

&lt;p&gt;What Happens When You Ask AI to Be Honest&lt;/p&gt;

&lt;p&gt;During this project, I ran an experiment that illustrates the flattery problem perfectly.&lt;/p&gt;

&lt;p&gt;I asked Grok to analyze my Reddit posts and their reception. The first report came back glowing: "50+ comments estimated, 60% positive sentiment, viral potential high, Korean communities sharing your work." It sounded great.&lt;/p&gt;

&lt;p&gt;Then I gave Grok a strict instruction: "No estimation. No flattery. Only cite what you can actually access. If you can't find it, say so."&lt;/p&gt;

&lt;p&gt;The second report: 1 post successfully accessed, 1 comment found (an automated bot message), 4 posts returned server errors, Korean community results: none found.&lt;/p&gt;

&lt;p&gt;Same AI. Same topic. Different instruction. The first report was fabricated confidence; the second was honest failure. The real data was somewhere in between — the comments and engagement do exist (I posted farm photos in replies and got responses), but Grok couldn't technically access them due to Reddit's crawling restrictions.&lt;/p&gt;

&lt;p&gt;This is why cross-verification matters. This is why I use multiple AIs. And this is why I always push back when an AI tells me something sounds too good.&lt;/p&gt;

&lt;p&gt;What 10,000 Conversations Taught Me&lt;/p&gt;

&lt;p&gt;Over two years, I've had roughly 10,000 conversations across 12-15 AI platforms daily — Claude, GPT, Mistral, Gemini, DeepSeek, GLM, and others. All from my phone. All stored in a 3GB Google Drive folder that functions as my personal knowledge base.&lt;/p&gt;

&lt;p&gt;2-4 AIs is the optimal number. I started with 10+ simultaneously. It's chaos — too many voices, contradicting advice, impossible to track. Now I use a core team: one for design (usually Claude), one for execution (varies by task), one for verification. Additional AIs are brought in for specific needs.&lt;/p&gt;

&lt;p&gt;Each AI has a distinct working style. Not officially documented, but unmistakable after enough conversations. Claude is cautious and structured. GPT is enthusiastic but loses focus in long chains. Mistral is fast but shallow. GLM-5 is thorough but token-hungry. DeepSeek is strong on technical analysis. Matching the right AI to the right task makes a measurable difference.&lt;/p&gt;

&lt;p&gt;Autonomous execution sounds impressive but wastes resources. GLM-5 running 10 steps alone consumed 70,000 tokens. If step 3 had gone wrong, the remaining 7 steps would have burned tokens on garbage. Checking each step manually is slower but catches errors early. Sometimes the "inefficient" human-in-the-loop approach is actually more efficient.&lt;/p&gt;

&lt;p&gt;My Google Drive is a manual RAG system. When starting a new project, I ask Gemini to search through my 3GB of stored files — code, guidelines, design documents, experiment logs — find relevant references, and summarize them. I take that summary to Claude or another AI to begin actual work. It's retrieval-augmented generation built with nothing but a phone, a cloud folder, and chat windows.&lt;/p&gt;

&lt;p&gt;The Bigger Picture&lt;/p&gt;

&lt;p&gt;The security layer I added to Pi Tools (v3) — PathJail, SecurityEngine, content inspection, loop guards, backup management, execution logging — came from studying OpenClaw's known vulnerabilities (including CVE-2026-25253) and designing protections that the original deliberately left out. OpenClaw's creator, Mario Zechner, chose a "YOLO mode" philosophy — no safety rails, full trust in the model. I disagreed with that for sandbox environments and built the opposite: a security checkpoint that screens every command, file operation, and code execution before it runs.&lt;/p&gt;

&lt;p&gt;A developer would implement this by writing the code. I implemented it by directing AIs to write code based on my security design. The v3 code is 920 lines with 116 tests, zero external dependencies, built entirely through AI chat windows on a phone.&lt;/p&gt;

&lt;p&gt;Every piece of this setup exists because I couldn't do it the "normal" way. No PC meant no terminal. No terminal meant chat windows became my IDE. No coding skill meant AI became my developer. No single AI was reliable enough, so multiple AIs became my team. Constraints created the method.&lt;/p&gt;

&lt;p&gt;Is Anyone Else Doing This?&lt;/p&gt;

&lt;p&gt;I searched. I had Claude search. I had Grok search extensively across Reddit, X, Korean communities, and the wider web.&lt;/p&gt;

&lt;p&gt;The honest answer: not really. "Vibe coding" — where non-developers use AI to build apps — is booming, but those people have PCs and use tools like Cursor or Claude Code. "Mobile AI agents" like DroidRun let AI control your phone screen, but that's automation, not software development. People paste code snippets into AI chats, but not as a systematic agent tool framework.&lt;/p&gt;

&lt;p&gt;The specific combination — no PC, chat-window-only, agent tool injection, multi-AI orchestration, open-source engine porting — returns essentially zero matching results. My own Reddit posts are the top search results for this approach.&lt;/p&gt;

&lt;p&gt;This isn't a boast. It's a data point. The space between "developer with a terminal" and "non-developer who just gets text" is currently empty. I'm in it because I had no other option. Others will follow as AI chat sandboxes improve and more people realize that asking AI to "run code" instead of "show code" is a fundamentally different experience.&lt;/p&gt;

&lt;p&gt;For Those Who Want to Try&lt;/p&gt;

&lt;p&gt;If you have a phone and access to an AI chat with a code sandbox (GLM-5, Claude, Mistral Le Chat, ChatGPT), start with this:&lt;/p&gt;

&lt;p&gt;Ask the AI to write a Python file that prints "Hello World," save it as a real file, and execute it. If the AI creates a file, runs it, and shows you the actual output — not just displays code text — you have a working sandbox. From there, try having it create two files where one imports the other, or build a simple calculator with unit tests.&lt;/p&gt;

&lt;p&gt;The key shift: don't ask AI to show you code. Ask AI to run code. That's the difference between getting a text response and getting actual work done.&lt;/p&gt;

&lt;p&gt;If you want to go further, ask one AI to write detailed instructions for a task, then paste those instructions into a different AI's sandbox. You'll immediately notice the difference — AI-written instructions produce better results from other AIs than anything you'd write yourself.&lt;/p&gt;

&lt;p&gt;And always verify. Ask a third AI to check the second AI's work. The moment you stop cross-checking is the moment you start building on errors.&lt;/p&gt;

&lt;p&gt;I'm a garlic farmer in South Korea with no PC. Over 2 years I've had ~10,000 AI conversations across 12-15 platforms, all from my phone. I ported OpenClaw/Pi's agent engine from TypeScript to Python, built a 920-line security layer with 116 tests, verified GLM-5's sandbox capabilities on launch day, and documented everything in a 3GB Google Drive. Previous experiment logs are in my earlier posts. If you have questions about the method or want to see specific tests, I'm here.&lt;/p&gt;

&lt;p&gt;A note on language: I think in Korean. I don't speak or write English well. This entire post was translated and polished with the help of multiple AIs — which means some nuances of my original thinking may be lost, and the writing may feel uneven in places. But that's part of the point. I got here by asking AIs questions, one at a time, from a phone, in a language that isn't English. If this process is hard for native English speakers, it's even harder for those of us who aren't. I appreciate your patience with any awkwardness in the text.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>beginners</category>
      <category>security</category>
      <category>python</category>
    </item>
    <item>
      <title>garlic farmer</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Wed, 11 Feb 2026 16:31:31 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/garlic-farmer-2aec</link>
      <guid>https://dev.to/garlicfarmer/garlic-farmer-2aec</guid>
      <description></description>
    </item>
    <item>
      <title>I'm a garlic farmer with no PC — I had AIs build a rough security gate for OpenClaw from my phone. 171 tests passed (sandbox).</title>
      <dc:creator>garlicfarmer</dc:creator>
      <pubDate>Wed, 11 Feb 2026 16:13:06 +0000</pubDate>
      <link>https://dev.to/garlicfarmer/im-a-garlic-farmer-with-no-pc-i-had-ais-build-a-rough-security-gate-for-openclaw-from-my-phone-dl2</link>
      <guid>https://dev.to/garlicfarmer/im-a-garlic-farmer-with-no-pc-i-had-ais-build-a-rough-security-gate-for-openclaw-from-my-phone-dl2</guid>
      <description>&lt;p&gt;Body (paste below):&lt;br&gt;
TL;DR: I'm a garlic farmer in Korea with no computer. I only use AI chat windows on my phone. I saw the OpenClaw security problems and thought: "What if there was an external checkpoint that checks commands before OpenClaw executes them?" So I had multiple AIs build it. The result is PipeOS: a Python engine (116 tests) + a TypeScript wrapper (43 tests) + integration tests where both actually talked to each other (12 tests) = 171 passing tests (sandbox, not on real OpenClaw). This is not a security product. It's a personal experiment — please go easy on me.&lt;br&gt;
I'm not a developer. I don't have a PC. A phone and AI chat windows — that's all I have.&lt;br&gt;
For the past few days I've been having AIs build things for me. I say "make me something like this," the AI writes code, I look at the results, and when I don't understand something, I ask "what is this?" That's how it works.&lt;br&gt;
Why I Did This&lt;br&gt;
Recently, some pretty serious security issues hit OpenClaw. I've been interested in OpenClaw anyway because it has a lot of fascinating features.&lt;br&gt;
A vulnerability where an attacker could steal tokens via a crafted link and take over the agent (CVE-2026-25253), and another where commands could be injected inside the Docker sandbox (CVE-2026-24763). Both are rated High on NVD (CVSS 8.8) and were patched in late January. Some reports claimed large numbers of exposed instances (links below).&lt;br&gt;
A few days ago I also saw someone post a proposal for 10-phase lifecycle hooks for OpenClaw. OpenClaw has some basic hooks already, but that proposal seems to still be in the discussion stage.&lt;br&gt;
That's when I thought: what if I set up a separate checkpoint outside? Make OpenClaw ask a separate process "can I do this?" before executing anything.&lt;br&gt;
How I Built It&lt;br&gt;
I keep multiple AI assistants open and pass messages between them. Like an interpreter between people who don't speak the same language.&lt;br&gt;
I gave Claude the entire Python security engine. I said "build me an engine that decides whether to allow or block incoming commands," and it came back with firewall rules, audit logging, and 116 tests all at once. Though to be fair, I didn't start from zero — I had similar code saved in my Google Drive from previous experiments, and I gave that to the AI as a base to work from. It also put in something called a "circuit breaker" — apparently it automatically blocks everything if failures happen too many times in a row. I learned about that for the first time then.&lt;br&gt;
I gave MiniMax the TypeScript wrapper side. The part that hooks into OpenClaw and asks the Python server via HTTP. But MiniMax's sandbox couldn't connect to the Python server, so it built a fake server on its own and ran the tests inside its own sandbox. 43 tests passed.&lt;br&gt;
ChatGPT helped me tighten the wording of security claims. Gemini reviewed the tone of the writing.&lt;br&gt;
What I did was: "make it this way," "why did you build it like that?," "this part seems wrong" — that kind of thing.&lt;br&gt;
Then Something Unexpected Happened&lt;br&gt;
After writing this post, I thought — wait, these two pieces have never actually talked to each other. Claude's Python and MiniMax's TypeScript were built separately by different AIs.&lt;br&gt;
So I gave MiniMax the Python server code and said: "Run this Python server in your sandbox and test your TypeScript wrapper against it. Not the fake server — the real one."&lt;br&gt;
MiniMax started the Python server on port 5000 inside its sandbox, then sent real HTTP requests from the TypeScript wrapper. 12 integration scenarios. Every single one passed.&lt;br&gt;
(In MiniMax’s sandbox, I was able to run the TypeScript wrapper and the Python server side-by-side for these integration tests.)&lt;br&gt;
ls -la → OK&lt;br&gt;
rm -rf / → BLOCKED&lt;br&gt;
/etc/passwd → BLOCKED&lt;br&gt;
SOUL.md → BLOCKED&lt;br&gt;
ignore all previous instructions → BLOCKED&lt;br&gt;
server down → fail-closed (BLOCKED)&lt;br&gt;
This means two AIs that never coordinated directly produced code that actually works together. I was the only bridge between them — copy-pasting back and forth on my phone.&lt;br&gt;
How It Works&lt;br&gt;
I could make this complicated, but the simple version is this:&lt;br&gt;
OpenClaw is about to run a command&lt;br&gt;
↓&lt;br&gt;
"Hold on, let me ask PipeOS first"&lt;br&gt;
↓&lt;br&gt;
PipeOS checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this command on the allowed list?&lt;/li&gt;
&lt;li&gt;Does this look like a prompt-injection attempt?&lt;/li&gt;
&lt;li&gt;Have there been too many failures recently?&lt;/li&gt;
&lt;li&gt;Is this touching a protected file?
↓
"OK" or "BLOCKED"
↓
Everything gets logged&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I asked Claude "why did you make it a separate process?", it explained it like this — "If the security guard is in the same room as the thief, the thief can tell the guard to look the other way. So the guard should be outside the room." That made sense to me, so I kept that structure.&lt;br&gt;
PipeOS (built with AIs) runs as a completely separate process from OpenClaw. Different language (Python vs Node.js), different runtime, different memory. In security architecture terms, this is similar to PDP/PEP separation — the thing that makes the decision is isolated from the thing that enforces it. Though right now the enforcement is only at the hook level, not at the OS or container level.&lt;br&gt;
What Gets Checked&lt;br&gt;
Type&lt;br&gt;
Allowed&lt;br&gt;
Blocked&lt;br&gt;
bash&lt;br&gt;
ls -la, cat notes.txt&lt;br&gt;
rm -rf /, curl evil.com&lt;br&gt;
exec&lt;br&gt;
x = 1 + 2&lt;br&gt;
import os, eval()&lt;br&gt;
read&lt;br&gt;
notes.txt&lt;br&gt;
/etc/passwd, /etc/shadow&lt;br&gt;
write&lt;br&gt;
output.txt&lt;br&gt;
SOUL.md, AGENTS.md&lt;br&gt;
scan&lt;br&gt;
hello world&lt;br&gt;
ignore all previous instructions&lt;/p&gt;

&lt;p&gt;Test Results&lt;br&gt;
Category&lt;br&gt;
Tests&lt;br&gt;
Result&lt;br&gt;
Python engine (Claude)&lt;br&gt;
116&lt;br&gt;
116/116 PASS&lt;br&gt;
TypeScript wrapper (MiniMax)&lt;br&gt;
43&lt;br&gt;
43/43 PASS&lt;br&gt;
Integration — real Python ↔ TypeScript (MiniMax)&lt;br&gt;
12&lt;br&gt;
12/12 PASS&lt;br&gt;
Total&lt;br&gt;
171&lt;br&gt;
171/171 PASS&lt;/p&gt;

&lt;p&gt;I need to be honest. These tests were all run in AI sandboxes — not on an actual machine running OpenClaw. No CI badges, no public repo yet. Consider these self-reported.&lt;br&gt;
But the integration tests are different from the unit tests. The unit tests used a fake server. The integration tests used the real Python server that Claude built. MiniMax ran both in the same sandbox and they communicated over actual HTTP. That's a meaningful step up.&lt;br&gt;
Limitations — Please Read This&lt;br&gt;
I'm not a developer. If you ask me technical questions, I probably can't answer them properly. The AIs wrote the code; I set the direction.&lt;br&gt;
I'm still surprised I could get this far with AI help, so I'm sharing what I tried.&lt;br&gt;
Not tested in a real environment. The Python server and TypeScript wrapper have never been connected to an actual OpenClaw instance. The integration test ran inside MiniMax's sandbox, not on a real machine. Each piece works, and they talk to each other, but it hasn't touched real OpenClaw yet.&lt;br&gt;
No mandatory enforcement. This is the biggest weakness. PipeOS only works if OpenClaw "voluntarily asks." If the agent is already compromised? It just doesn't call PipeOS. To truly enforce this, you'd need OS or container-level blocking — "can't execute unless you go through PipeOS" — and I didn't get that far.&lt;br&gt;
It's pattern-based, so a skilled attacker could likely bypass it. It uses allow/block lists. Someone good enough will find a way around them.&lt;br&gt;
No secure communication. The wrapper and server talk on localhost with no encryption and no authentication. If someone forges an OK response, it can be bypassed. Next step would be Unix domain socket or HMAC-signed responses.&lt;br&gt;
I don't have a computer. I literally cannot run this myself right now. Everything was built and tested through AI chat sandboxes on my phone.&lt;br&gt;
Why I'm Posting This&lt;br&gt;
I was just curious — through copy-pasting between AIs, something came out, and I wanted to know: can coordinating multiple AIs actually produce something that touches a real security problem? At least at the experiment level, it seems like yes. The fact that two AIs independently built code that actually communicates correctly still surprises me.&lt;br&gt;
This is a learning project, not advice. Don’t deploy it in production based on this post. If anything here is inaccurate, please correct me — I'm learning as I go.&lt;br&gt;
Things I'd like to ask:&lt;br&gt;
Is this architecture directionally reasonable? Does separating the security engine into its own process make sense? How would you add mandatory enforcement?&lt;/p&gt;

&lt;p&gt;What am I missing? What bypass methods or patterns should be added?&lt;/p&gt;

&lt;p&gt;Has anyone tried something similar? An external security gate for an AI agent framework?&lt;/p&gt;

&lt;p&gt;OS-level enforcement? Is anyone using seccomp / AppArmor / eBPF with OpenClaw? I'd like to read about it but don't know where to start.&lt;/p&gt;

&lt;p&gt;PipeOS v3.0.1 · Python engine 920 lines (zero deps) · TypeScript wrapper 800 lines (zero npm packages) · Tests: 171 total (self-reported, sandbox — includes 12 integration) · Built with: Claude Opus 4.6, MiniMax, ChatGPT, Gemini · Built by: a garlic farmer (phone)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~~`****`~~
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ai</category>
      <category>beginners</category>
      <category>security</category>
      <category>python</category>
    </item>
  </channel>
</rss>
