GenericAgent

lsdefineMIT活跃维护 有专家点评

一个能自我进化的 AI 智能体,从 3.3K 行种子代码长出技能树,实现全系统控制,token 消耗比常规方案低 6 倍。

Self-evolving agent: grows skill tree from 3.3K-line seed, achieving full system control with 6x less token consumption

v0.2.1发布于 2026-10-19 06:08 UTC14,403star +4 / 7 天1,663fork同步于 2026-11-11 05:25 UTC

专家点评

上手难度:进阶更新于 2026-11-11

用约3K行种子代码和9个原子工具接管本地电脑,并把每次执行路径固化成可复用技能的自主智能体框架

适用场景

  • 需要让 LLM 直接操作真实浏览器完成带登录态、带人机验证的流程(下单、后台操作、表单填报):它通过扩展注入现有 Chrome,而不是启动干净的 headless 实例,因此省去了重新登录和绕过验证码的麻烦;换成 Playwright 类方案,就得自己维护会话和验证码处理。
  • 反复执行同一类桌面任务(整理文件、批量改表、跨应用搬运数据):技能树把首次成功的路径保存下来,后续任务不必让模型重新规划每一步,token 消耗和不确定性都会下降;纯 ReAct 框架每次都要从零推理。
  • 在单机或低配环境跑长时任务:核心代码量小、依赖轻,上下文压在 30K 以内,适合没有 GPU 集群、只靠 API 调用的场景;换成重型 agent 平台,光启动和上下文成本就吃不消。
  • 需要同时覆盖桌面和 Android 设备的自动化:ADB 和键鼠、屏幕工具在同一套原子工具里,不用为移动端再接一个框架。

踩坑

  • 环境版本要求很严格:README 明确要求 Python 3.11/3.12,3.14 与 pywebview 等依赖不兼容,用系统默认新版 Python 建 venv 会在 UI 启动阶段失败。
  • 网页自动化不是装完就能用:需要手动把自带 Chrome 扩展拖进 chrome://extensions,OCR、视觉、电脑操作等能力还要在对话里让 Agent 自己去装,首次跑通要预留调试时间。
  • issue 列表里反复出现内存优化与检索策略、以及要求补 benchmark 来支撑“6x less tokens”说法的条目,说明技能树和记忆层的实际表现依赖具体任务分布,README 的省 token 数字不能直接当作你场景的预期。

同类对比

如果只需要可复现的浏览器脚本而不需要模型自主决策,直接用 Playwright;如果看重成熟的工具生态和多模型编排而非自进化技能沉淀,看 OpenHands 或 browser-use 这类项目。

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/lsdefine/GenericAgent.git && cd GenericAgent
uv venv && uv pip install -e ".[ui]"
cp mykey_template_en.py mykey.py
python frontends/tui_v3.py
硬件要求按 README 说明

README未说明显存或GPU要求;支持跨平台运行,移动端控制需ADB。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

一个约3K行种子代码的自进化自主智能体框架,靠9个原子工具接管本地电脑并自动沉淀技能树

一个能自我进化的 AI 智能体,从 3.3K 行种子代码长出技能树,实现全系统控制,token 消耗比常规方案低 6 倍。

核心能力

  • 用9个原子工具覆盖浏览器、终端、文件、键鼠、屏幕与ADB移动端
  • 每次任务后自动把执行路径固化为可复用Skill,形成个人技能树
  • Agent Loop仅约100行,核心代码约3K行,依赖极轻
  • TMWebdriver注入真实浏览器,保留登录态并通过人机验证
  • 上下文窗口控制在30K以内,比常见智能体省数倍token

容易踩的坑

必须用Python 3.11或3.12,3.14与pywebview等依赖不兼容;需先复制mykey_template_en.py为mykey.py并填入LLM API Key;网页自动化需手动把自带Chrome扩展拖入chrome://extensions,OCR/视觉/电脑操作等能力要指示Agent自行安装配置。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.1
  1. v0.2.1GenericAgent v0.2.1 — Windows Desktop最新正式版2026-10-19 · 2026-10-19 06:08 UTC

    v0.2.1 — Windows / Linux / macOS packages

    Downloads

    PlatformExisting GA installationGA source + desktopGA source + desktop + Python
    Windows x64GenericAgent.exeGenericAgent-Windows-Source.zipGenericAgent-Windows-WithPython.zip
    Linux x86_64GenericAgent-Linux-x86_64.AppImageGenericAgent-Linux-Source.tar.gzGenericAgent-Linux-WithPython.tar.gz
    macOS arm64GenericAgent-macOS-arm64.app.zip——

    For a fresh installation, choose WithPython. Both package variants use the same GA source layout; the only extra directory in WithPython is python/ (Python 3.12.14 with runtime dependencies preinstalled). Source packages require your own Python environment and GA dependencies. Standalone desktop components require an existing GA checkout; place them in frontends/.

    Start

    • Extract the entire archive into a writable directory. Windows: Start GenericAgent.cmd; Linux: ./Start GenericAgent.sh.
    • Windows requires Windows 10/11 x64 and Edge WebView2.
    • Linux requires x86_64, glibc >= 2.36 and a graphical desktop. Tested in Debian 12 with Xvfb. If FUSE is unavailable, use APPIMAGE_EXTRACT_AND_RUN=1 ./Start GenericAgent.sh.
    • Explicit saved project/Python settings always take priority. Unset paths are discovered automatically. Move the whole folder together; do not overwrite existing user data when upgrading.
    • Status-bar version is now sourced from the build configuration and is 0.2.1, not a stale hard-coded value.

    Verification and build identity

    • GA source: eaa2e6f14be5caa7ada7a4a40c16e71ba57901dc (main repository unchanged).
    • Windows Desktop: cfca435; 11 Rust tests and 320 renderer tests passed.
    • Linux Desktop: f1aad9e (same source tree as local 3b5bd39, adding a Linux-only shortcut reference fix); 11 Rust tests and 286 renderer tests passed.
    • Both platforms: source/full common-file parity and relocated bundled bridge startup passed.
    • Linux: the packaged AppImage was launched under Xvfb from a relocated path containing spaces; GA and bundled Python auto-discovery and bridge startup passed. This was a startup smoke test, not a full visual UI audit.
    • Windows desktop was not relaunched during publishing, to avoid interrupting active user sessions.
    • All ten current assets were downloaded back and SHA256-verified. Checksums: SHA256SUMS-windows.txt, SHA256SUMS-linux.txt, SHA256SUMS-macos.txt.

    macOS (arm64)

    • GenericAgent-macOS-arm64.app.zip is the standalone desktop component only: unzip, move GA Desktop.app into Applications, and point it at an existing GA checkout with a working Python environment. It does not bundle GA source or Python.
    • Requires macOS 10.13+ on Apple Silicon. This build was produced locally on macOS, not by CI, and is ad-hoc signed only (no Developer ID, no notarization). On first launch, use the standard macOS prompt to allow the app.
    • SHA256: see SHA256SUMS-macos.txt.
  2. desktop-portable-v0.2.0GenericAgent Desktop desktop-portable-v0.2.02026-08-24 · 2026-08-24 04:58 UTC
    查看更新说明

    GenericAgent Desktop 桌面版 / Desktop

    三个平台产物来自同一提交,并在公开发布前统一验证。All three platform artifacts come from one commit and are validated before publication.

    安装方法 / Installation

    • Windows x64:下载 GenericAgent-Desktop-Windows-Portable.zip,解压后双击 GenericAgent.exe。卸载时运行 uninstall.bat,再删除解压目录。 Windows x64: extract GenericAgent-Desktop-Windows-Portable.zip, then launch GenericAgent.exe. Run uninstall.bat before deleting the extracted directory.
    • Linux x86_64:下载并解压 GenericAgent-Desktop-Linux-Portable.tar.gz,执行 chmod +x GenericAgent.AppImage 后运行它。卸载时运行 uninstall.sh,再删除解压目录。 Linux x86_64: extract GenericAgent-Desktop-Linux-Portable.tar.gz, run chmod +x GenericAgent.AppImage, then launch it. Run uninstall.sh before deleting the extracted directory.
    • macOS Apple silicon (arm64):打开 GenericAgent-Desktop-macOS-aarch64.dmg,把 GenericAgent.app 拖入 Applications。 macOS Apple silicon (arm64): open GenericAgent-Desktop-macOS-aarch64.dmg and drag GenericAgent.app to Applications.

    签名状态 / Signing status

    Windows 便携版尚未使用代码签名证书,SmartScreen 可能显示警告;运行前请核对 SHA256SUMS-windows.txt。 The Windows portable build is not code-signed, so SmartScreen may warn; verify SHA256SUMS-windows.txt before running it.

    macOS 应用仅使用 ad-hoc 签名,未使用 Apple Developer ID,也未 notarize。首次打开可能需要右键选择“打开”或在“隐私与安全性”中允许。 The macOS app is ad-hoc signed only. It is neither Developer ID signed nor notarized; first launch may require Open from the context menu or approval in Privacy & Security.

    SHA-256 清单与各产物一同发布。SHA-256 manifests are included with the artifacts.

  3. desktop-portable-v0.1.8GenericAgent Desktop desktop-portable-v0.1.8pre-release2026-07-21 · 2026-07-21 03:00 UTC
    查看更新说明

    GenericAgent Desktop 桌面版 / Desktop

    无需自行安装 Python、无需联网安装依赖、无需源码;首次启动会自动准备内置运行环境。 No separate Python install, no internet for dependencies, no source checkout required; the bundled runtime is prepared on first launch.

    安装方法 / Installation

    • Windows: 下载 GenericAgent-Desktop-Windows-Portable.zip,解压后双击 GenericAgent.exe 启动。卸载时先退出应用,再双击包内 uninstall.bat,最后删除整个解压目录。 Download GenericAgent-Desktop-Windows-Portable.zip, extract it, then double-click GenericAgent.exe. To uninstall, quit the app, double-click uninstall.bat, then delete the extracted folder.
    • Linux: 下载 GenericAgent-Desktop-Linux-Portable.tar.gz,解压后执行 chmod +x GenericAgent.AppImage,再运行 ./GenericAgent.AppImage。卸载时先退出应用,再运行 ./uninstall.sh,最后删除整个解压目录。 Download GenericAgent-Desktop-Linux-Portable.tar.gz, extract it, run chmod +x GenericAgent.AppImage, then launch ./GenericAgent.AppImage. To uninstall, quit the app, run ./uninstall.sh, then delete the extracted folder.
    • macOS: 下载 GenericAgent-Desktop-macOS.dmg,双击打开 DMG,把 GenericAgent.app 拖入 Applications,之后在“应用程序 / Applications”中启动。若出现“无法验证开发者”等提示,先双击 DMG 内的 open_anyway.command,再启动。卸载时先退出应用,再从 Applications 删除 GenericAgent.app。 Download GenericAgent-Desktop-macOS.dmg, open it, drag GenericAgent.app to Applications, then launch it from Applications. If macOS says the developer cannot be verified, double-click open_anyway.command inside the DMG first, then launch again. To uninstall, quit the app, then delete GenericAgent.app from Applications.

    首次启动 / First launch

    首次启动会自动离线准备运行环境(安装依赖),有进度条,完成后进入主界面;之后启动会更快。 The first launch prepares the runtime offline (installs deps) with a progress bar, then opens the main window; later launches are faster.

    说明 / Notes

    • 想真正对话需在程序内配置模型 / API Key。Configure a model / API key in-app to start chatting.
    • Windows Defender 防火墙可能会拦截 127.0.0.1 / localhost 回环连接,导致程序无法启动或连接本机服务;请允许 GenericAgent.exe 和随包的 python.exe 通过防火墙后重启。Windows Defender Firewall may block the local loopback connection; allow GenericAgent.exe and the bundled python.exe through the firewall, then restart the app.
    • Windows/Linux 为便携包,可整体移动到任意目录后继续使用。Windows/Linux packages are portable and can be moved as a whole folder.
    • Windows/Linux 包内附 readme.txt(中英)。Windows/Linux packages include a bilingual readme.txt.
  4. desktop-portable-v0.1.5GenericAgent Desktop desktop-portable-v0.1.5pre-release2026-07-11 · 2026-07-11 02:57 UTC
    查看更新说明

    GenericAgent Desktop 桌面版 / Desktop

    无需自行安装 Python、无需联网安装依赖、无需源码;首次启动会自动准备内置运行环境。 No separate Python install, no internet for dependencies, no source checkout required; the bundled runtime is prepared on first launch.

    安装方法 / Installation

    • Windows: 下载 GenericAgent-Desktop-Windows-Portable.zip,解压后双击 GenericAgent.exe 启动。卸载时先退出应用,再双击包内 uninstall.bat,最后删除整个解压目录。 Download GenericAgent-Desktop-Windows-Portable.zip, extract it, then double-click GenericAgent.exe. To uninstall, quit the app, double-click uninstall.bat, then delete the extracted folder.
    • Linux: 下载 GenericAgent-Desktop-Linux-Portable.tar.gz,解压后执行 chmod +x GenericAgent.AppImage,再运行 ./GenericAgent.AppImage。卸载时先退出应用,再运行 ./uninstall.sh,最后删除整个解压目录。 Download GenericAgent-Desktop-Linux-Portable.tar.gz, extract it, run chmod +x GenericAgent.AppImage, then launch ./GenericAgent.AppImage. To uninstall, quit the app, run ./uninstall.sh, then delete the extracted folder.
    • macOS: 下载 GenericAgent-Desktop-macOS.dmg,双击打开 DMG,把 GenericAgent.app 拖入 Applications,之后在“应用程序 / Applications”中启动。若出现“无法验证开发者”等提示,先双击 DMG 内的 open_anyway.command,再启动。卸载时先退出应用,再从 Applications 删除 GenericAgent.app。 Download GenericAgent-Desktop-macOS.dmg, open it, drag GenericAgent.app to Applications, then launch it from Applications. If macOS says the developer cannot be verified, double-click open_anyway.command inside the DMG first, then launch again. To uninstall, quit the app, then delete GenericAgent.app from Applications.

    首次启动 / First launch

    首次启动会自动离线准备运行环境(安装依赖),有进度条,完成后进入主界面;之后启动会更快。 The first launch prepares the runtime offline (installs deps) with a progress bar, then opens the main window; later launches are faster.

    说明 / Notes

    • 想真正对话需在程序内配置模型 / API Key。Configure a model / API key in-app to start chatting.
    • Windows/Linux 为便携包,可整体移动到任意目录后继续使用。Windows/Linux packages are portable and can be moved as a whole folder.
    • Windows/Linux 包内附 readme.txt(中英)。Windows/Linux packages include a bilingual readme.txt.
  5. desktop-portable-v0.1.4GenericAgent Desktop desktop-portable-v0.1.42026-06-26 · 2026-06-26 12:04 UTC
    查看更新说明

    GenericAgent Desktop 桌面版 / Desktop

    无需自行安装 Python、无需联网安装依赖、无需源码;首次启动会自动准备内置运行环境。 No separate Python install, no internet for dependencies, no source checkout required; the bundled runtime is prepared on first launch.

    安装方法 / Installation

    • Windows: 下载 GenericAgent-Desktop-Windows-Portable.zip,解压后双击 GenericAgent.exe 启动。卸载时先退出应用,再双击包内 uninstall.bat,最后删除整个解压目录。 Download GenericAgent-Desktop-Windows-Portable.zip, extract it, then double-click GenericAgent.exe. To uninstall, quit the app, double-click uninstall.bat, then delete the extracted folder.
    • Linux: 下载 GenericAgent-Desktop-Linux-Portable.tar.gz,解压后执行 chmod +x GenericAgent.AppImage,再运行 ./GenericAgent.AppImage。卸载时先退出应用,再运行 ./uninstall.sh,最后删除整个解压目录。 Download GenericAgent-Desktop-Linux-Portable.tar.gz, extract it, run chmod +x GenericAgent.AppImage, then launch ./GenericAgent.AppImage. To uninstall, quit the app, run ./uninstall.sh, then delete the extracted folder.
    • macOS: 下载 GenericAgent-Desktop-macOS.dmg,双击打开 DMG,把 GenericAgent.app 拖入 Applications,之后在“应用程序 / Applications”中启动。若出现“无法验证开发者”等提示,先双击 DMG 内的 open_anyway.command,再启动。卸载时先退出应用,再从 Applications 删除 GenericAgent.app。 Download GenericAgent-Desktop-macOS.dmg, open it, drag GenericAgent.app to Applications, then launch it from Applications. If macOS says the developer cannot be verified, double-click open_anyway.command inside the DMG first, then launch again. To uninstall, quit the app, then delete GenericAgent.app from Applications.

    首次启动 / First launch

    首次启动会自动离线准备运行环境(安装依赖),有进度条,完成后进入主界面;之后启动会更快。 The first launch prepares the runtime offline (installs deps) with a progress bar, then opens the main window; later launches are faster.

    说明 / Notes

    • 想真正对话需在程序内配置模型 / API Key。Configure a model / API key in-app to start chatting.
    • Windows/Linux 为便携包,可整体移动到任意目录后继续使用。Windows/Linux packages are portable and can be moved as a whole folder.
    • Windows/Linux 包内附 readme.txt(中英)。Windows/Linux packages include a bilingual readme.txt.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    GenericAgent

    A Minimal, Self-Evolving Autonomous Agent Framework

    ~3K lines of seed code · 9 atomic tools · ~100-line Agent Loop

    English · 中文

    📌 Official: GitHub + https://gaagent.ai only. DintalClaw is the sole authorized commercial partner; others are not affiliated.


    🌟 Overview

    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).

    Design philosophy — don't preload skills, evolve them.

    Every time GenericAgent solves a new task, it automatically crystallizes the execution path into a reusable Skill. The longer you use it, the more skills accumulate — forming a personal skill tree grown entirely from 3K lines of seed code.

    🤖 Self-Bootstrap Proof — Everything in this repository, from installing Git and running git init to every commit message, was completed autonomously by GenericAgent. The author never opened a terminal once.

    📑 Table of Contents


    📋 Key Features

    FeatureDescription
    🧬 Self-EvolvingAutomatically crystallizes each task into a 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 ExecutionTMWebdriver injects into a real browser (preserving login sessions). 9 atomic tools take direct control of the system.
    🔌 High CompatibilitySupports Claude / Gemini / Kimi / MiniMax and other major models. Cross-platform.
    💰 Token Efficient<30K context window — a fraction of the 200K–1M other agents consume. Less noise, fewer hallucinations, higher success rate, lower cost.

    🎯 Demo Showcase


    🚀 Quick Start

    ⚠️ Python version: use Python 3.11 or 3.12. Do not use Python 3.14 — it is incompatible with pywebview and a few other GA dependencies.

    📖 Detailed installation guide: installation.md · installation_zh.md(中文)

    For LLM Agents

    Fetch the installation guide and follow it:

    curl -fsSL https://raw.githubusercontent.com/lsdefine/GenericAgent/refs/heads/main/docs/installation.md
    

    For Humans

    Method 1 — Clone & install (recommended)
    git clone https://github.com/lsdefine/GenericAgent.git && cd GenericAgent
    uv venv && uv pip install -e ".[ui]"
    cp mykey_template_en.py mykey.py   # fill in your LLM API key
    

    Dependencies are deliberately tiered: the agent core needs only requests, plus four lightweight packages (beautifulsoup4, bottle, simple-websocket-server, aiohttp) for TMWebdriver's local server. The [ui] extra pulls in frontend libraries (Streamlit, prompt_toolkit/rich for the TUI, …) — install it for the bundled UIs, or skip it entirely and drive the agent headless. No Playwright, no LangChain, no browser binaries to download.

    Then launch:

    python frontends/tui_v3.py   # Terminal UI (recommended)
    python launch.pyw            # Streamlit web UI
    
    Method 2 — One-line installer (convenience)

    Sets up a self-contained directory with an isolated Python environment, Git, and a ready-to-run package. The script is in assets/ if you'd like to read it first.

    Windows PowerShell

    powershell -ExecutionPolicy Bypass -c "$env:GLOBAL=1; irm https://raw.githubusercontent.com/lsdefine/GenericAgent/main/assets/ga_install.ps1 | iex"
    

    Linux / macOS

    GLOBAL=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/lsdefine/GenericAgent/main/assets/ga_install.sh)"
    

    💡 GenericAgent grows its environment through the Agent itself — don't pre-install everything. See Unlocking Advanced Capabilities below.


    💻 Usage

    Frontends

    Terminal UI (recommended)

    A lightweight, scrollback-first terminal interface built on prompt_toolkit + rich. Supports multiple concurrent sessions and real-time streaming.

    python frontends/tui_v3.py
    

    TUI rendering on Windows can be flaky depending on terminal + font. Common causes:

    1. prompt_toolkit / rich are not on the latest version — pip install -U prompt_toolkit rich first.
    2. PowerShell / cmd ship with terminals that have rough Unicode + key-binding support. Prefer Git Bash on Windows, which is much better behaved.
    3. If it still looks broken, ask GA itself to fix it:

      "My experience using frontends/tui_v3.py in PowerShell / cmd / Git Bash on Windows is very poor — lots of incompatibility. Please refer to Claude Code's best practices for the Windows terminal and fix all font and rendering incompatibilities."

    Streamlit UI
    python launch.pyw
    

    Bot Interface (IM)

    GenericAgent also supports IM frontends such as Telegram, Discord, and Lark.

    PlatformCommand
    Telegrampython frontends/tgapp.py
    Discordpython frontends/dcapp.py
    Lark / Feishupython frontends/fsapp.py

    WeChat, QQ, WeCom and DingTalk are also supported — see the Chinese section below. For detailed setup, ask GenericAgent itself.


    🔓 Unlocking Advanced Capabilities

    In GA, advanced capabilities are unlocked by instructing the agent, not by reading docs or installing extras. Each instruction below makes GA read its pre-installed SOPs (battle-tested playbooks in its memory), install whatever is missing, adapt to your OS, and persist the result into its own memory.

    CapabilityJust tell GA
    🌐 Web automation"Set up your web automation capability." — GA guides you through the one manual step: dragging the bundled Chrome extension into chrome://extensions.
    🔤 OCR"Set up your OCR capability with rapidocr and save it to memory."
    👁️ Vision"Set up your vision capability from the template in memory/." — GA copies the template, wires it to your existing LLM keys, and self-tests.
    🖱️ Computer use"Probe this system and set up your computer-use capability."

    💡 About language: the pre-installed SOPs are written in Chinese — GA reads them natively, so this never blocks you. If you prefer an English knowledge base, just say: "Read your pre-installed SOPs and rewrite them in English (keep code, paths and error strings verbatim)."

    🌍 About platforms: the SOPs were honed on Windows, but cross-platform adaptation is itself a GA task — on macOS/Linux, GA swaps in the platform equivalents (window enumeration, input control, screenshots) on its own. Same self-evolution principle.


    🧠 Architecture

    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.

    LayerNameDescription
    L0Meta RulesCore behavioral rules and system constraints
    L1Insight IndexMinimal memory index for fast routing and recall
    L2Global FactsStable knowledge accumulated over long-term operation
    L3Task Skills / SOPsReusable workflows for completing specific task types
    L4Session ArchiveArchived 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.

    ToolFunction
    code_runExecute arbitrary code (Python / PowerShell)
    file_readRead files
    file_writeWrite / create / overwrite files
    file_patchPatch / modify files
    web_scanPerceive web content
    web_execute_jsControl browser behavior
    ask_userHuman-in-the-loop confirmation
    update_working_checkpoint(memory) Short-term working notepad
    start_long_term_update(memory) Distill long-term memory

    4️⃣ Capability Extension

    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.


    🧬 Self-Evolution Mechanism

    This is what fundamentally distinguishes GenericAgent from every other agent framework.

    [New Task]
       │
       ▼
    [Autonomous Exploration]   ─►  install deps · write scripts · debug · verify
       │
       ▼
    [Crystallize into Skill]   ─►  write to memory layer
       │
       ▼
    [Direct Recall on Next Similar Task]
    
    What you sayFirst timeEvery time after
    "Read my WeChat messages"Install deps → reverse DB → write read script → save Skillone-line invoke
    "Give me a morning digest of Hacker News"Write scraper → build digest → schedule daily run → save Skillone-line invoke
    "Monitor stocks and alert me"Install mootdx → build selection flow → configure cron → save Skillone-line start
    "Send this file via Gmail"Configure OAuth → write send script → save Skillready 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.


    📊 Comparison

    FeatureGenericAgentOpenClawClaude Code
    Codebase~3K lines~530,000 linesOpen-sourced (large)
    Deploymentpip install + API KeyMulti-service orchestrationCLI + subscription
    Browser ControlReal browser (session preserved)Sandbox / headless browserVia MCP plugin
    OS ControlMouse/kbd, vision, ADBMulti-agent delegationFile + terminal
    Self-EvolutionAutonomous skill growthPlugin ecosystemStateless between sessions
    Out of the BoxFew core files + starter skillsHundreds of modulesRich CLI toolset

    📈 Evaluation

    📂 Full evaluation datasets and results: JinyiHan99/GA-Technical-Report

    We evaluate GenericAgent across five dimensions:

    #DimensionQuestionBenchmarks
    1Task Completion & Token EfficiencyCan GA complete hard tasks more cheaply than leading agents?SOP-Bench, Lifelong AgentBench, RealFin-Benchmark
    2Tool-Use EfficiencyCan a minimal atomic toolset solve what specialized toolsets solve, with less overhead?Tool Efficiency Benchmark (11 simple + 5 long-horizon)
    3Memory System EffectivenessDoes condensed hierarchical memory beat full/redundant memory and embedding-based retrievers?SOP-Bench (dangerous goods), LoCoMo, 20-skill stress test
    4Self-Evolution CapabilityCan the agent distill experience into reusable SOPs and code, without intervention?9-round LangChain longitudinal study, 8-task cross-task web benchmark
    5Web Browsing CapabilityDoes density-driven design survive the open web?WebCanvas, BrowseComp-ZH, Custom Tasks (22)

    Baselines across these dimensions include Claude Code, OpenAI CodeX, and OpenClaw, evaluated under Claude Sonnet 4.6, Claude Opus 4.6, GPT-5.4, and MiniMax M2.7 backbones.

    Browser Realness of GA Web Tools (TMWebdriver)

    GA web tools are powered by TMWebdriver — a local WebSocket server plus a Chrome extension — running through a real, persistent Chrome/Chromium session rather than a disposable headless sandbox, preserving cookies, login state, extensions, GPU/WebGL behavior, and normal browser-session fingerprints.

    Detection Service / SignalVanilla Headless AutomationGA Web ToolsNotes
    SannySoft headless testOften detected✅ 56/56 passedbot.sannysoft.com
    bot.incolumitas.comCommonly fails webdriver / CDP checks✅ 36/36 passedWEBDRIVER, SELENIUM_DRIVER, webDriverAdvanced all OK
    BrowserScan bot detectionOften abnormal✅ Normalbrowserscan.net
    Device & Browser Info bot testMultiple bot flags✅ Human / isBot=falsedeviceandbrowserinfo.com
    FingerprintJS bot detection demoOften detected✅ PassedDemo flow completed without bot verdict
    reCAPTCHA v3 demoLow bot-like score✅ 0.9 human-like scoreScore-based risk signal; 0.9 is above typical production thresholds

    For reCAPTCHA v3, 0.9 is not a "checkbox solved" result; it is the high-confidence human-like score returned by the risk model, typically sufficient to avoid extra challenges in production flows.


    📅 Roadmap & News

    • 2026-05-23 — 🆕 TUI v3 released (frontends/tui_v3.py). Block-based scrollback with proper resize reflow, per-terminal color profile for cross-terminal parity, and feature parity with v2.
    • 2026-05-18 — 🆕 Morphling mode. Project-level skill absorption — extract goal + tests from any external repo, then decide per component: call, rewrite, or discard. See memory/morphling_sop.md.
    • 2026-05-17 — 🆕 Goal Hive mode. Multi-worker cooperative Goal mode — BBS-coordinated master/workers running long-horizon objectives in parallel. See memory/goal_hive_sop.md.
    • 2026-05-15 — 🖥️ Desktop GUI released. One-line installs ship a ready-to-run desktop app (frontends/GenericAgent.exe). Developers launch via python launch.pyw.
    • 2026-05-14 — 🆕 Conductor sub-agent orchestration. Spawn, supervise, and auto-clean parallel sub-agents; first-class delegation primitives complementing /btw side-questions.
    • 2026-05-12 — 🆕 TUI v2 released (frontends/tuiapp_v2.py). Refined Textual frontend with image-paste folding, file paste, block-delete, Ctrl+C copy, history navigation, and /llm / /export / /continue pickers.
    • 2026-05-08 — 🆕 Goal mode (reflect/goal_mode.py). Time-budget-driven self-driven loop — "keep optimizing X for N hours" with no premature delivery.
    • 2026-04-21 — 📄 Technical Report on arXiv — GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization.
    • 2026-04-11 — Introduced L4 session archive memory and scheduler cron integration.
    • 2026-03-23 — Personal WeChat supported as a bot frontend.
    • 2026-03-10 — Released million-scale Skill Library (Chinese).
    • 2026-03-08 — Released "Dintal Claw" — a GenericAgent-powered government-affairs bot (Chinese).
    • 2026-03-01 — Featured by Jiqizhixin (机器之心) (Chinese).
    • 2026-01-16 — GenericAgent V1.0 public release.

    ⭐ Community & Support

    If this project helped you, please consider leaving a Star! 🙏

    🚩 Friendly Links

    Thanks to the LinuxDo community for the support!

    LinuxDo

    Community GUIs (independent open-source projects):

    • chilishark27/ga-manager
    • wangjc683/galley — Out-of-the-box local agent workbench with a bundled GA runtime (CPython 3.11 + deps), native GUI/CLI, multi-session + Project orchestration, local-first.
    • FroStorM/A3Agent
    • Fwind43/GenericAgent-Admin — Go + React desktop admin panel: service lifecycle management, native chat, Goal mode, BBS team board, file editor, model config wizard, TMWebDriver monitor, self-update, and Windows tray/desktop-pet integration.

    📄 License

    Distributed under the MIT License. See LICENSE for full text.

    Disclaimer: The official GenericAgent channels are this GitHub repository and https://gaagent.ai. DintalClaw is currently the only officially authorized commercial partner; any other third-party website, organization, or individual using the GenericAgent name is not official unless explicitly listed here.


    🌟 项目简介

    GenericAgent 是一个极简、可自我进化的自主 Agent 框架。核心仅 ~3K 行代码,通过 9 个原子工具 + ~100 行 Agent Loop,赋予任意 LLM 对本地计算机的系统级控制能力,覆盖浏览器、终端、文件系统、键鼠输入、屏幕视觉及移动设备(ADB)。

    设计哲学 —— 不预设技能,靠进化获得能力。

    每解决一个新任务,GenericAgent 就将执行路径自动固化为 Skill,供后续直接调用。使用时间越长,沉淀的技能越多,形成一棵完全属于你、从 3K 行种子代码生长出来的专属技能树。

    🤖 自举实证 — 本仓库的一切,从安装 Git、git init 到每一条 commit message,均由 GenericAgent 自主完成。作者全程未打开过一次终端。

    📑 目录


    📋 核心特性

    特性说明
    🧬 自我进化每次任务自动沉淀 Skill,能力随使用持续增长,形成专属技能树
    🪶 极简架构~3K 行核心代码,Agent Loop 约百行,无复杂依赖,部署零负担
    ⚡ 强执行力注入真实浏览器(保留登录态),9 个原子工具直接接管系统
    🔌 高兼容性支持 Claude / Gemini / Kimi / MiniMax 等主流模型,跨平台运行
    💰 极致省 Token上下文窗口不到 30K,是其他 Agent(200K–1M)的零头;噪声更少、幻觉更低、成功率更高,成本低一个数量级

    🎯 实例展示


    🚀 快速开始

    ⚠️ Python 版本: 推荐使用 Python 3.11 或 3.12。请不要使用 Python 3.14,与 pywebview 及部分依赖不兼容。

    📖 详细安装指南:installation_zh.md(中文) · installation.md (English)

    给 LLM Agent 看的

    获取安装指南并照做:

    curl -fsSL https://raw.githubusercontent.com/lsdefine/GenericAgent/refs/heads/main/docs/installation_zh.md
    

    给人类用户看的

    方法一 — 一键安装 (推荐)

    一键安装会自动准备独立 Python 环境、Git、项目文件和桌面端,不污染系统环境。

    Windows PowerShell

    powershell -ExecutionPolicy Bypass -c "irm http://fudankw.cn:9000/files/ga_install.ps1 | iex"
    

    Linux / macOS

    curl -fsSL http://fudankw.cn:9000/files/ga_install.sh | bash
    

    安装完成后启动:

    • Windows — 双击 frontends/GenericAgent.exe
    • Linux / macOS — 在安装目录运行 python launch.pyw
    方法二 — Python 安装 (开发者)
    git clone https://github.com/lsdefine/GenericAgent.git
    cd GenericAgent
    uv venv
    uv pip install -e ".[ui]"          # 核心 + UI 依赖
    cp mykey_template.py mykey.py      # 填入你的 LLM API Key
    python launch.pyw
    

    💡 GenericAgent 更推荐由 Agent 在使用中自举环境,而不是预先手动装完整依赖。

    📖 完整引导流程见 docs/GETTING_STARTED.md 📖 新手图文版:飞书文档 📘 完整入门教程(Datawhale 出品):Hello GenericAgent · GitHub


    💻 使用方式

    前端启动

    桌面端

    一键安装自带桌面端(Windows),双击:

    frontends/GenericAgent.exe
    
    终端 UI

    基于 Textual 的轻量键盘驱动界面。支持多会话并发、实时流式输出,有终端就能跑。

    python frontends/tuiapp_v2.py
    
    1. textual 版本太旧,先 pip install -U textual;
    2. PowerShell / cmd 自带终端对 Unicode 和键位的支持比较糟糕,Windows 上推荐用 Git Bash,体验明显更稳;
    3. 仍然显示异常时,可以让 GA 自己修一遍,参考 Prompt:

      "我在 Windows 的 PowerShell / cmd / Git Bash 中使用 frontends/tuiapp_v2.py 体验非常差,出现了一堆不兼容问题。请参考 Claude Code 在 Windows 终端的最佳配置,把所有字体和显示不兼容的问题修一遍。"

    Streamlit UI
    python launch.pyw
    

    Bot 接口(IM)

    GenericAgent 支持 Telegram、Discord、微信、QQ、飞书 / Lark、企业微信、钉钉等 IM 前端。

    平台启动命令
    Telegrampython frontends/tgapp.py
    Discordpython frontends/dcapp.py
    微信python frontends/wechatapp.py
    QQpython frontends/qqapp.py
    飞书 / Larkpython frontends/fsapp.py
    企业微信python frontends/wecomapp.py
    钉钉python frontends/dingtalkapp.py

    详细配置直接问 GenericAgent。


    🧠 架构设计

    GenericAgent 通过 分层记忆 × 最小工具集 × 自主执行循环 完成复杂任务,并在执行过程中持续积累经验。

    1️⃣ 分层记忆系统

    记忆在任务执行过程中持续沉淀,使 Agent 逐步形成稳定且高效的工作方式。

    层级名称说明
    L0元规则(Meta Rules)Agent 的基础行为规则和系统约束
    L1记忆索引(Insight Index)极简索引层,用于快速路由与召回
    L2全局事实(Global Facts)在长期运行过程中积累的稳定知识
    L3任务 Skills / SOPs完成特定任务类型的可复用流程
    L4会话归档(Session Archive)从已完成任务中提炼出的归档记录,用于长程召回

    2️⃣ 自主执行循环

    感知环境状态 → 任务推理 → 调用工具执行 → 经验写入记忆 → 循环

    整个核心循环仅 约百行代码(agent_loop.py)。

    3️⃣ 最小工具集

    GenericAgent 仅提供 9 个原子工具,构成与外部世界交互的基础能力。

    工具功能
    code_run执行任意代码(Python / PowerShell)
    file_read读取文件
    file_write写入 / 创建 / 覆盖文件
    file_patch修改文件
    web_scan感知网页内容
    web_execute_js控制浏览器行为
    ask_user人机协作确认
    update_working_checkpoint(记忆) 短期工作记事板
    start_long_term_update(记忆) 提炼长期记忆

    4️⃣ 能力扩展机制

    具备动态创建新工具的能力。

    通过 code_run,GenericAgent 可在运行时动态安装 Python 包、编写新脚本、调用外部 API 或控制硬件,将临时能力固化为永久工具。


    🧬 自我进化机制

    这是 GenericAgent 区别于其他 Agent 框架的根本所在。

    [遇到新任务]
        │
        ▼
    [自主摸索]   ─►  安装依赖 · 编写脚本 · 调试验证
        │
        ▼
    [执行路径固化为 Skill]   ─►  写入记忆层
        │
        ▼
    [下次同类任务直接调用]
    
    你说的一句话第一次做了什么之后每次
    "监控股票并提醒我"安装 mootdx → 构建选股流程 → 配置定时任务 → 保存 Skill一句话启动
    "用 Gmail 发这个文件"配置 OAuth → 编写发送脚本 → 保存 Skill直接可用

    用几周后,你的 Agent 实例将拥有一套任何人都没有的专属技能树,全部从 3K 行种子代码中生长而来。


    📊 与同类产品对比

    特性GenericAgentOpenClawClaude Code
    代码量~3K 行~530,000 行已开源(体量大)
    部署方式pip install + API Key多服务编排CLI + 订阅
    浏览器控制注入真实浏览器(保留登录态)沙箱 / 无头浏览器通过 MCP 插件
    OS 控制键鼠、视觉、ADB多 Agent 委派文件 + 终端
    自我进化自主生长 Skill 和工具插件生态会话间无状态
    出厂配置几个核心文件 + 少量初始 Skills数百模块丰富 CLI 工具集

    📈 评测

    📂 完整的评测数据集以及评测结果见:JinyiHan99/GA-Technical-Report

    我们从 五大维度 评测 GenericAgent:

    #维度核心问题使用的基准
    1任务完成度与 Token 效率GA 能否以更低成本完成高难度任务?SOP-Bench、Lifelong AgentBench、RealFin-Benchmark
    2工具使用效率最小原子工具集能否以更低开销替代专用工具集?Tool Efficiency Benchmark
    3记忆系统有效性精简分层记忆能否超越冗余记忆和基于 Embedding 的检索器?SOP-Bench、LoCoMo、20-skill 压力测试
    4自我进化能力Agent 能否在无人干预下将经验提炼为可复用的 SOP 与代码?9 轮 LangChain 纵向研究、8 任务跨任务 Web 基准
    5网页浏览能力信息密度驱动设计能否适应开放网页?WebCanvas、BrowseComp-ZH、自定义任务

    以上维度的基线包括 Claude Code、OpenAI CodeX 和 OpenClaw,分别在 Claude Sonnet 4.6、Claude Opus 4.6、GPT-5.4 和 MiniMax M2.7 底座上进行评测。

    GA Web 工具的浏览器真实性

    GA Web 工具运行在真实、持久化的 Chrome/Chromium 会话中,而不是一次性的 headless 沙箱,因此可以保留 Cookie、登录态、扩展、GPU/WebGL 行为以及正常浏览器会话指纹。

    检测服务 / 信号普通 Headless 自动化GA Web 工具说明
    SannySoft headless test常被识别✅ 56/56 通过bot.sannysoft.com
    bot.incolumitas.com常在 webdriver / CDP 项异常✅ 36/36 通过WEBDRIVER、SELENIUM_DRIVER、webDriverAdvanced 全部 OK
    BrowserScan bot detection常显示异常✅ Normalbrowserscan.net
    Device & Browser Info bot test多个 bot 标记✅ Human / isBot=falsedeviceandbrowserinfo.com
    FingerprintJS bot detection demo常被识别✅ 通过Demo 流程完成,未给出 bot 判定
    reCAPTCHA v3 demo低分 / bot-like✅ 0.9 真人相似分v3 是基于分数的风险信号;0.9 高于常见生产阈值

    对于 reCAPTCHA v3,0.9 不是“点过验证码”的结果,而是风控模型返回的高置信真人相似分,通常足以通过生产环境中的常见阈值,避免进入更严格挑战。


    📅 路线图与最新动态

    • 2026-05-23 — 🆕 TUI v3 正式发布(frontends/tui_v3.py)。基于块的滚屏回看 + 正确的 resize 重排,每终端独立配色保证跨终端一致,并与 v2 达成功能对齐。
    • 2026-05-18 — 🆕 Morphling 模式。项目级能力吞噬 —— 从任意外部仓库抽取目标与测例后,对每个核心组件分别决定调用、重写或舍弃。详见 memory/morphling_sop.md。
    • 2026-05-17 — 🆕 Goal Hive 模式。多 worker 协作版 Goal —— Master/Worker 通过 BBS 协同推进长程目标。详见 memory/goal_hive_sop.md。
    • 2026-05-15 — 🖥️ 桌面 GUI 发布。一键安装会自带可直接运行的桌面端(frontends/GenericAgent.exe),开发者也可用 python launch.pyw 启动。
    • 2026-05-14 — 🆕 Conductor 子 Agent 编排。派发、监督、自动清理并行子 Agent;与 /btw 旁路子 Agent 互补,提供一等公民级的任务委派原语。
    • 2026-05-12 — 🆕 TUI v2 正式发布(frontends/tuiapp_v2.py)。重做视觉风格的 Textual 前端,支持图片粘贴折叠、文件粘贴、块删除、Ctrl+C 复制、历史导航,以及 /llm / /export / /continue 选择器。
    • 2026-05-08 — 🆕 Goal 模式(reflect/goal_mode.py)。时间预算驱动的自驱循环 —— "持续优化 X N 小时",预算没到不准提前交付。
    • 2026-04-21 — 📄 技术报告已发布至 arXiv — GenericAgent: A Token-Efficient Self-Evolving LLM Agent via Contextual Information Density Maximization。
    • 2026-04-11 — 引入 L4 会话归档记忆,并接入 scheduler cron 调度。
    • 2026-03-23 — 支持个人微信接入作为 Bot 前端。
    • 2026-03-10 — 发布百万级 Skill 库。
    • 2026-03-08 — 发布以 GenericAgent 为核心的"政务龙虾" Dintal Claw。
    • 2026-03-01 — 被机器之心报道。
    • 2026-01-16 — GenericAgent V1.0 公开版本发布。

    ⭐ 社区与支持

    如果这个项目对你有帮助,欢迎点一个 Star! 🙏

    也欢迎加入 GenericAgent 体验交流群,一起交流、反馈、共建 👏

    🚩 友情链接

    感谢 LinuxDo 社区的支持!

    LinuxDo

    社区 GUI 客户端 (独立开源项目):

    • chilishark27/ga-manager
    • wangjc683/galley —— 开箱即用的本地 Agent 工作台,自带 GA 内核(内置 CPython 3.11 + 运行依赖),GUI/CLI 双原生、多 session + Project 编排、本地优先。
    • FroStorM/A3Agent
    • Fwind43/GenericAgent-Admin —— Go + React 桌面管理面板:服务生命周期管理、原生 Chat、Goal 模式、BBS 团队看板、文件编辑器、模型配置向导、TMWebDriver 监控、自更新,以及 Windows 托盘/桌面宠物集成。
    • Fwind43/GenericAgent-Harness —— 一切皆插件的 GA 外壳,不改 GA 源码,提供 Web / TUI / 桌面版。

    📄 许可

    基于 MIT License 发布,详见 LICENSE。

    声明:GenericAgent 官方渠道为本 GitHub 仓库和 https://gaagent.ai。DintalClaw 是目前唯一官方授权的商业合作方;除非在此处明确列出,其他使用 GenericAgent 名义的第三方网站、机构、组织或个人均非官方。