Garlic Farmer Builds 19K-Line AI Agent System on Android Phone

✍️ OpenClawRadar📅 Published: March 28, 2026🔗 Source
Garlic Farmer Builds 19K-Line AI Agent System on Android Phone
Ad

Development Environment and System

A garlic farmer from Gyeongsang province, South Korea, has developed an AI agent system called "garlic-agent" using only an Android phone with Termux terminal app. The system consists of 19,260 lines of Python code (as verified by asking multiple AIs to count it) and runs complex automation scripts in a custom programming language.

The system rotates between multiple AI providers including Gemini, Groq, and NVIDIA, saves context in SQLite, and runs entirely on a mobile device. The farmer describes it as a "personal project in AI era" developed without a PC.

Workflow Methodology

The entire development process revolves around manual copy-paste operations. The workflow follows this pattern:

  • Ask Claude to "diagnose project health"
  • Claude generates a diagnostic script
  • Copy the script manually (press and hold with finger)
  • Switch to Termux, paste, and execute
  • Copy the results
  • Switch back to Claude, paste results for analysis
  • Claude generates patch scripts
  • Repeat the copy-paste-execute cycle

The farmer reports performing this cycle "thousands of times a day" and has maintained this workflow through "tens of thousands of conversations" with AI systems.

AI Role Division

The system uses three primary AI roles:

  • External analysis - Claude: Diagnoses code from outside the project, generates diagnostic scripts, but cannot execute code directly. Requires manual intervention to run scripts in Termux.
  • Internal execution - Gemini: Runs as an API AI inside garlic-agent, reads files, executes commands, and returns results. Has internal knowledge of the codebase from daily operation.
  • Human connector: The farmer acts as middleware between Claude (in web browser) and Gemini (in Termux), carrying results between both sides, delivering questions, and making decisions when AI judgments conflict.
Ad

Context Management

To manage multiple AI sessions, the farmer assigns alias-like numbers at the end of each response (e.g., analysis21, analysis22, analysis23). This helps distinguish between different AI instances when managing dozens of chat windows. When one AI leaves a record in CHANGELOG, the next AI reads it and takes over, creating context consistency.

The handover record has grown to 10,730 lines over approximately a month and a half of operation. The farmer emphasizes that this level of context management is "impossible to explain" and recommends experiencing it firsthand.

Practical Implementation

The system runs continuously - the farmer returns from garlic fields, turns on the phone screen, and continues from where they stopped. Development happens during breaks while digging garlic and after lunch. The farmer notes that while AI remembers context (eliminating the need for human memory), the process requires "very much human touch every moment."

The farmer explicitly states they don't trust AI alone: "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."

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also