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

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.
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
👀 See Also

Lessons from Running 14 AI Agents in Production: Organizational Gaps, Not Technical Bugs
A digital marketing agency running 14 AI agents for daily operations found that when agents break, the problem is almost never the agent itself but the organizational environment. They developed an Organizational Operating System (OOS) and a tool called OTP to identify structural gaps, improving their Coordination Score from 68 to 91 out of 100.

Multi-AI Orchestration Setup Using Claude Code with GPT and Gemini
A developer shares their setup where Claude Code orchestrates GPT-5.4 and Gemini 3.1 Pro in the same IDE, using markdown files for persistent context and CLI commands for inter-model communication.

User Creates HTML Converter for Claude Chat Exports Using Claude Itself
A non-coder used Claude to build a converter that transforms Claude's native JSON chat exports into readable HTML with color-coded messages, collapsible conversations, and organization by date and time.

Batch API Cost-Effective for Multi-File Code Changes
A developer reports using Claude Sonnet and Opus for batch processing to modify 30+ files and generate 3k lines of code for approximately £2, with specific prompts and tools like Repomix for content gathering and Minimax for cleanup.