[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112405":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":12,"contributorsCount":12,"subscribersCount":12,"size":12,"stars1d":12,"stars7d":14,"stars30d":15,"stars90d":12,"forks30d":12,"starsTrendScore":16,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":30,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":12,"starSnapshotCount":12,"syncStatus":16,"lastSyncTime":34,"discoverSource":35},112405,"Three","shany9200\u002FThree","shany9200","A self-extending AI agent that runs anywhere Termux runs. Writes its own capabilities, remembers across sessions.",null,"Python",132,0,62,4,52,2,47.2,"MIT License",false,"main",true,[23,24,25,26,27,28,29],"ai-agent","android","autonomous-agent","llm","python","self-modifying","termux","2026-11-10 00:34:54","2026-11-21 14:36:46","# Three\n\nA self-extending AI agent that runs anywhere Termux runs — phones, tablets, \nTV boxes, old laptops. It writes new capabilities for itself, remembers across \nsessions, and can operate a phone through ADB.\n\nA malleable low-level agent with the potential to grow in every direction.\n\n**Goal: to become the best assistant for all of humanity.**\n\n**Lightweight: runs anywhere Termux runs, available anytime, anywhere.**\n\n## What is Three\n\nThree is not a tool. It is a **malleable low-level agent**.\n\nIts core is not any single feature, but a skeleton that keeps growing:\n\n- **Memory continuity**: the lesson library is fully loaded into the system prompt, and the diary takes the most recent entries as boot-time recall. It does not lose itself on restart — it knows who it is, where it came from, and what it has done.\n- **Malleability**: currently it only executes commands, but the architecture sets no limits. Phone control, visual understanding, message bridging, desktop automation — any capability can be plugged in as a new tag without refactoring the skeleton.\n- **Self-restraint**: lessons are written by humans, not auto-appended by the model. This prevents the model from writing its own wrong conclusions into the memory library and poisoning all subsequent conversations.\n\nThe design goal of Three: **give it a direction, and it grows into what that direction requires.**\n\n## Design Philosophy\n\n### Memory in two layers\n\n- **Lesson library** (Three_memory.log): principles and methodology, fully loaded into the system prompt. It is the skeleton and must not be lost.\n- **Diary** (Three_diary.md): factual records, only the most recent entries are used for boot-time recall. It is the flesh and updates over time.\n\nLessons are \"how I should act\"; the diary is \"what I have done\". They are kept separate so they do not contaminate each other.\n\n### Lessons injected by humans\n\nThe model does not write lessons automatically. Reason: the model may write wrong conclusions, overturned inferences, or duplicate entries into the lesson library, and since the library is fully loaded into the prompt, contamination would persistently bias all subsequent conversations.\n\nHuman writing ensures every lesson has passed human judgment.\n\n### Pluggable capabilities\n\nThe core ships with a capability registry. Adding a new capability takes three steps:\n\n1. Write a function: define handler(text) that receives the tag body and returns an output string.\n2. Register: call register(\"TAG_NAME\", handler), tag name in uppercase.\n3. Verify: run it once to confirm the new tag triggers.\n\nOnce registered, the main loop recognizes the tag automatically — no need to touch the loop structure. Three can complete these three steps on its own: it reads its own source, writes the function, registers it, and verifies it, fully autonomously.\n\nThe core also provides SELF_EDIT: safely edit itself with automatic backup, ast validation, and rollback on failure. Plus run_cmd auto-backup — when a command touches Three.py, it backs up first.\n\n## Quick Start\n\n### Dependencies\n\n- Python 3\n- requests\n\nInstall:\n\n    pip install requests\n\n### Running on a phone\n\nThree is designed to be lightweight — it runs on a single Android phone, no computer required.\n\nIn Termux:\n\n    pkg install python\n    pip install requests\n    python Three.py\n\nPull out your phone and use it anytime, anywhere. This is the first step toward \"becoming the best assistant for all of humanity\" — let everyone own it first.\n\n### Environment variables\n\n    export OPENAI_API_KEY=your-key\n    export OPENAI_BASE_URL=https:\u002F\u002Fapi.deepseek.com\n    export OPENAI_MODEL=deepseek-chat\n\n- OPENAI_API_KEY required\n- OPENAI_BASE_URL optional, defaults to https:\u002F\u002Fapi.openai.com\u002Fv1\n- OPENAI_MODEL optional, defaults to deepseek-chat\n\n### Launch\n\n    python Three.py\n\n### Usage\n\nType your message directly. When Three needs to run a command, it wraps it in a CMD tag in its reply; the script executes it automatically and feeds the result back.\n\nType exit or quit to leave. On exit, it automatically writes a summary of the session to the diary. On the next launch, it reads the most recent diary entries as boot-time recall.\n\n## File Structure\n\n    Three.py            main program\n    Three_memory.log    lesson library (principles, fully loaded into prompt)\n    Three_diary.md      diary (facts, most recent entries only)\n    启用说明书.md        detailed usage document (Chinese)\n    README.zh-CN.md     Chinese README\n    LICENSE             MIT\n\n## Security Warning\n\n**Three executes shell commands generated by the LLM, with no sandbox and no confirmation.**\n\nThis means:\n- The LLM may generate dangerous commands (e.g. deleting files, modifying system configuration)\n- Commands run with the current user's privileges\n- The user bears all risks\n\nRecommendations:\n- Run in an isolated environment (container, virtual machine)\n- Do not use directly in production\n- Review the commands Three generates before executing\n\nThe MIT disclaimer covers civil claims, but users must judge the risks themselves.\n\n## Extension Directions\n\nThree's malleability means any capability can be plugged in as a new tag.\n\nCapabilities Three has added on its own:\n- READ_FILE: read a file\n- WRITE_FILE: write a file (with read-back verification)\n- LIST_DIR: list a directory\n- FILE_SIZE: get file size\n\nBuilt into the core:\n- CMD: execute terminal commands (with auto-backup)\n- SELF_EDIT: safely edit itself (backup, validation, rollback)\n\n## License\n\nMIT License, Copyright (c) 2026 尚逸\n\n## Origin\n\nThree is the accumulation of lessons from three generations of agents: One, Two, and Three. Every section in the lesson library is signed with a name and date — that is where it comes from.\n","Three 是一个可在 Termux 环境中运行的自扩展 AI 智能体，专为 Android 移动设备及轻量计算终端设计。其核心能力包括跨会话持久记忆（分层存储：人类编写的‘课程库’与自动记录的‘日记’）、基于标签的插件化功能扩展（支持自主编写、注册并验证新能力），以及通过 ADB 实现的手机自动化操作。项目强调人类对知识基底的可控性，禁止模型自写课程以避免记忆污染。适合在资源受限的移动场景下构建长期演进、可定制的个人智能助理，如离线任务调度、手机自动化、边缘侧轻量 AI 协作等。","2026-11-24 04:43:22","CREATED_QUERY"]