GenericAgent
A minimal, self-evolving autonomous agent framework with ~3K lines of core code. It provides 9 atomic tools + ~100 line Agent Loop, granting any LLM system-level control over a local computer.
Overview
GenericAgent’s core philosophy: don’t preload skills — evolve them.
Self-Evolving : Automatically crystallizes each task into a skill. Capabilities grow with every use, forming a personal skill tree
Minimal Architecture : ~3K lines of core code, Agent Loop is ~100 lines
Strong Execution : Injects into real browser (preserving login sessions)
High Compatibility : Supports Claude / Gemini / Kimi / MiniMax
Token Efficient : <30K context window (6x less than other agents)
Core Components
1. Layered Memory System
Layer Purpose L0 — Meta Rules Core behavioral rules and system constraints 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 specific task types L4 — Session Archive Archived task records for long-horizon recall
Tool Function code_runExecute arbitrary code file_readRead files file_writeWrite files file_patchModify files web_scanPerceive web content web_execute_jsControl browser behavior ask_userHuman-in-the-loop confirmation update_working_checkpointPersist context across sessions start_long_term_updateAccumulate experience
3. Autonomous Execution Loop
[New Task] → [Autonomous Exploration] → [Crystallize into Skill] → [Write to Memory] → [Direct Recall on Next]
Key Features
Browser Control : Real browser injection with session preservation
OS Control : Mouse/keyboard, screen vision, ADB for mobile
Self-Bootstrap : Can autonomously install deps, write scripts, debug & verify
Skill Tree : Grows organically with usage — unique to each user
Comparison
Feature GenericAgent OpenClaw Claude Code Codebase ~3K lines ~530K lines Large Deployment pip + API Key Multi-service CLI Browser Real (preserved session) Sandbox MCP OS Control Mouse/kbd, vision, ADB Multi-agent File + terminal Self-Evolution Autonomous skill growth Plugin ecosystem Stateless
Latest Updates
2026-04-21: Technical Report on arXiv (GenericAgent: Token-Efficient Self-Evolving LLM Agent)
2026-04-11: L4 session archive memory + cron scheduler
2026-03-23: WeChat bot frontend support
2026-03-10: Million-scale Skill Library
Quick Start
git clone https://github.com/lsdefine/GenericAgent.git
cd GenericAgent
pip install requests streamlit pywebview
cp mykey_template.py mykey.py
# Edit mykey.py with your LLM API Key
python launch.pyw
Bot Interfaces
Streamlit Web UI (default)
Telegram Bot
WeChat Bot
QQ Bot
Feishu (Lark)
Enterprise WeChat
DingTalk
Qt Desktop App
See Also