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

LayerPurpose
L0 — Meta RulesCore behavioral rules and system constraints
L1 — Insight IndexMinimal memory index for fast routing and recall
L2 — Global FactsStable knowledge accumulated over long-term operation
L3 — Task Skills / SOPsReusable workflows for specific task types
L4 — Session ArchiveArchived task records for long-horizon recall

2. 9 Atomic Tools

ToolFunction
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

FeatureGenericAgentOpenClawClaude Code
Codebase~3K lines~530K linesLarge
Deploymentpip + API KeyMulti-serviceCLI
BrowserReal (preserved session)SandboxMCP
OS ControlMouse/kbd, vision, ADBMulti-agentFile + terminal
Self-EvolutionAutonomous skill growthPlugin ecosystemStateless

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

  • openclaw — Multi-service orchestration agent (~530K lines)
  • moc-claude-code — CLI-focused AI coding agent
  • 2026-05-11-agentmemory — agentmemory — #1 Persistent memory for AI coding agents
  • 2026-03-22-supermemory — Supermemory — AI 메모리 & 컨텍스트 엔진 (LongMemEval 3관왕)
  • moc-ai-agents-memory — AI 에이전트 메모리 MOC
  • ai-agents — AI agent frameworks comparison