GenericAgent is a minimal, self-evolving autonomous agent framework. Its core is just ~3K lines of code. Through 9 atomic tools + a ~100-line Agent Loop, it grants any LLM system-level control over a local computer — covering browser, terminal, filesystem, keyboard/mouse input, screen vision, and mobile devices (ADB).
Its design philosophy: don't preload skills — evolve them.
Every time GenericAgent solves a new task, it automatically crystallizes the execution path into an skill for direct reuse later. The longer you use it, the more skills accumulate — forming a skill tree that belongs entirely to you, grown from 3K lines of seed code.
🤖 Self-Bootstrap Proof — Everything in this repository, from installing Git and running
git initto every commit message, was completed autonomously by GenericAgent. The author never opened a terminal once.
- Self-Evolving: Automatically crystallizes each task into an skill. Capabilities grow with every use, forming your personal skill tree.
- Minimal Architecture: ~3K lines of core code. Agent Loop is ~100 lines. No complex dependencies, zero deployment overhead.
- Strong Execution: Injects into a real browser (preserving login sessions). 9 atomic tools take direct control of the system.
- High Compatibility: Supports Claude / Gemini / Kimi / MiniMax and other major models. Cross-platform.
This is what fundamentally distinguishes GenericAgent from every other agent framework.
[New Task] --> [Autonomous Exploration] (install deps, write scripts, debug & verify) -->
[Crystallize Execution Path into skill] --> [Write to Memory Layer] --> [Direct Recall on Next Similar Task]
| What you say | What the agent does the first time | Every time after |
|---|---|---|
| "Read my WeChat messages" | Install deps → reverse DB → write read script → save skill | one-line invoke |
| "Monitor stocks and alert me" | Install mootdx → build selection flow → configure cron → save skill | one-line start |
| "Send this file via Gmail" | Configure OAuth → write send script → save skill | ready to use |
After a few weeks, your agent instance will have a skill tree no one else in the world has — all grown from 3K lines of seed code.
- 2026-04-11: Introduced L4 session archive memory and scheduler cron integration
- 2026-03-23: Support personal WeChat as a bot frontend
- 2026-03-10: Released million-scale Skill Library
- 2026-03-08: Released "Dintal Claw" — a GenericAgent-powered government affairs bot
- 2026-03-01: GenericAgent featured by Jiqizhixin (机器之心)
- 2026-01-16: GenericAgent V1.0 public release
# 1. Clone the repo
git clone https://github.com/lsdefine/GenericAgent.git
cd GenericAgent
# 2. Install minimal dependencies
pip install streamlit pywebview
# 3. Configure API Key
cp mykey_template.py mykey.py
# Edit mykey.py and fill in your LLM API Key
# 4. Launch
python launch.pywFull guide: GETTING_STARTED.md
# mykey.py
tg_bot_token = 'YOUR_BOT_TOKEN'
tg_allowed_users = [YOUR_USER_ID]python frontends/tgapp.pyBesides the default Streamlit web UI, you can also try other frontend styles:
python frontends/qtapp.py # Qt-based desktop app
streamlit run frontends/stapp2.py # Alternative Streamlit UI| Feature | GenericAgent | OpenClaw | Claude Code |
|---|---|---|---|
| Codebase | ~3K lines | ~530,000 lines | Open-sourced (large) |
| Deployment | pip install + API Key |
Multi-service orchestration | CLI + subscription |
| Browser Control | Real browser (session preserved) | Sandbox / headless browser | Via MCP plugin |
| OS Control | Mouse/kbd, vision, ADB | Multi-agent delegation | File + terminal |
| Self-Evolution | Autonomous skill growth | Plugin ecosystem | Stateless between sessions |
| Out of the Box | A few core files + starter skills | Hundreds of modules | Rich CLI toolset |
GenericAgent accomplishes complex tasks through Layered Memory × Minimal Toolset × Autonomous Execution Loop, continuously accumulating experience during execution.
1️⃣ Layered Memory System
Memory crystallizes throughout task execution, letting the agent build stable, efficient working patterns over time.
- L0 — Meta Rules: Core behavioral rules and system constraints of the agent
- L1 — Insight Index: Minimal memory index for fast routing and recall
- L2 — Global Facts: Stable knowledge accumulated over long-term operation
- L3 — Task Skills / SOPs: Reusable workflows for completing specific task types
- L4 — Session Archive: Archived task records distilled from finished sessions for long-horizon recall
2️⃣ Autonomous Execution Loop
Perceive environment state → Task reasoning → Execute tools → Write experience to memory → Loop
The entire core loop is just ~100 lines of code (agent_loop.py).
3️⃣ Minimal Toolset
GenericAgent provides only 9 atomic tools, forming the foundational capabilities for interacting with the outside world.
| Tool | Function |
|---|---|
code_run |
Execute arbitrary code |
file_read |
Read files |
file_write |
Write files |
file_patch |
Patch / modify files |
web_scan |
Perceive web content |
web_execute_js |
Control browser behavior |
ask_user |
Human-in-the-loop confirmation |
Additionally, 2 memory management tools (
update_working_checkpoint,start_long_term_update) allow the agent to persist context and accumulate experience across sessions.
4️⃣ Capability Extension Mechanism
Capable of dynamically creating new tools.
Via code_run, GenericAgent can dynamically install Python packages, write new scripts, call external APIs, or control hardware at runtime — crystallizing temporary abilities into permanent tools.
If this project helped you, please consider leaving a Star! 🙏
You're also welcome to join our GenericAgent Community Group for discussion, feedback, and co-building 👏
Thanks for the support from the LinuxDo community!
MIT License — see LICENSE







