# lsdefine/genericagent

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/lsdefine-genericagent).**

13,017 stars · 1,514 forks · Python · MIT

## Links

- GitHub: https://github.com/lsdefine/GenericAgent
- Homepage: https://github.com/lsdefine/GenericAgent
- awesome-repositories: https://awesome-repositories.com/repository/lsdefine-genericagent.md

## Topics

`ai-agent` `automation` `autonomous-agent` `browser-automation` `claude` `computer-control` `desktop-automation` `gemini` `lightweight` `llm-agent` `memory-system` `python` `self-evolving` `skill-tree` `task-automation`

## Description

GenericAgent is an LLM agent framework and autonomous system controller designed to manage local systems, web browsers, and hardware interfaces through action and observation loops. It functions as a tool orchestrator that routes model calls to local executors, enabling the automation of complex tasks on a host machine.

The project is distinguished by its self-evolving AI agent capabilities, which convert successful execution paths into reusable procedural scripts and skill trees to reduce future reasoning overhead. It employs a context optimization engine that utilizes layered memory hierarchies, information tiering, and conversation compression to minimize token consumption and manage long-term interactions.

The framework covers a broad surface of capabilities including autonomous workflow orchestration, multi-agent workspace isolation, and the ability to synthesize new tools at runtime by installing Python packages. It integrates with various LLM providers, chat platforms, and enterprise productivity tools, while providing mechanisms for tiered failure recovery and human-in-the-loop intervention.

The system is managed via a control console that allows for agent service control, parallel session management, and dialogue history manipulation.

## Tags

### Artificial Intelligence & ML

- [Agentic LLM Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-llm-frameworks.md) — Provides a comprehensive framework for building autonomous agents that control local systems and web browsers using language models.
- [Autonomous Agent Orchestration](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-agent-orchestration.md) — Provides a framework for planning, executing, and verifying complex tasks through an autonomous action-observation loop.
- [Hybrid Short-and-Long Term Memory](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/hybrid-short-and-long-term-memory.md) — Implements a memory architecture that integrates immediate session checkpoints with persistent long-term storage. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))
- [Context Optimization Engines](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/hybrid-short-and-long-term-memory/context-optimization-engines.md) — Implements a sophisticated memory system using layered hierarchies and compression to minimize token consumption during long-term interactions.
- [Hierarchical Memory Organization](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/long-term-memory-injection/hierarchical-memory-organization.md) — Organizes long-term knowledge into hierarchical levels and loads only relevant information into active context. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter7/))
- [Multi-Layer Memory Architectures](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/multi-layer-memory-architectures.md) — Organizes information into meta-rules, global facts, and session archives to optimize context window usage.
- [Concurrent Agent Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/orchestration-engines/ai-agent/multi-agent-coordination-systems/concurrent-agent-execution.md) — Spawns isolated child agents to execute multiple tasks concurrently while coordinating with a primary agent. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter4/))
- [Agent Task Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-task-execution.md) — Implements an iterative loop of action and observation to execute complex user instructions on local systems. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter8/))
- [Self-Evolving Agent Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-capabilities-skills-tooling/agent-skill-frameworks/self-evolving-agent-frameworks.md) — Enables agents to grow a skill tree by converting successful task execution paths into reusable procedural scripts.
- [Programmatic Agent Spawning](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/management-and-discovery/agent-registries/programmatic-agent-spawning.md) — Launches independent child agents with dedicated workspaces to handle sub-tasks while maintaining primary oversight. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))
- [Autonomous Goal Pursuit](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-goal-pursuit.md) — Operates in a self-driven mode focused on a high-level objective until a time or turn limit expires. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))
- [Autonomous System Controllers](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-system-controllers.md) — Functions as a controller that manages files, terminal commands, and hardware interfaces via LLM-driven loops.
- [Autonomous Task Execution](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-task-execution.md) — Processes a queue of natural language tasks sequentially during user inactivity and generates reports. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))
- [Autonomous Workflow Automation](https://awesome-repositories.com/f/artificial-intelligence-ml/autonomous-workflow-automation.md) — Converts manual standard operating procedures into executable code and scheduled background autonomous tasks.
- [Knowledge Distillation into Skills](https://awesome-repositories.com/f/artificial-intelligence-ml/knowledge-distillation-into-skills.md) — Converts successful execution paths into reusable scripts and procedural memory to reduce future reasoning overhead.
- [LLM Cost Management](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-cost-management.md) — Optimizes LLM operational costs by compressing conversation history and streamlining tool definitions to reduce tokens.
- [LLM Provider Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-provider-integrations.md) — Supports diverse LLM providers through standardized protocols, including official APIs and local deployments. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))
- [Memory Hierarchies](https://awesome-repositories.com/f/artificial-intelligence-ml/memory-hierarchies.md) — Implements structured memory hierarchies to organize agent memories and minimize context window bloat. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter10/))
- [On-Demand Context Retrieval](https://awesome-repositories.com/f/artificial-intelligence-ml/on-demand-context-retrieval.md) — Retrieves specific facts or procedural knowledge using index routing only when identified as necessary for the task. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter10/))
- [Step-by-Step Task Plans](https://awesome-repositories.com/f/artificial-intelligence-ml/step-by-step-task-plans.md) — Orchestrates structured workflows involving exploration, planning, user confirmation, and independent verification. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))
- [Tool-Calling Schemas](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-calling-schemas.md) — Uses a unified schema to route structured model calls to local tool executors.
- [State Preservation Anchors](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/long-term-memory-injection/state-preservation-anchors.md) — Preserves critical task state after message eviction by injecting persistent anchor prompts into the dialogue. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter11/))
- [Verified Experience Distillation](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-architectures/memory-management-systems/long-term-memory-stores/multi-layer-memory-architectures/verified-experience-distillation.md) — Prevents memory pollution by requiring successful task verification before writing experiences into long-term procedural storage. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter10/))
- [Skill Retrieval](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-skill-management/skill-retrieval.md) — Organizes acquired capabilities and tool scripts into a structured mapping for specialized skill retrieval. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter12/))
- [Agent Workspace Environments](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/infrastructure-runtime-environments/agent-workspace-environments.md) — Spawns child agents with dedicated isolated workspaces to execute parallel sub-tasks.
- [Conversation History Correction](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/reasoning-symbolic-systems/pattern-matching-engines/command-error-correction-engines/agent-instruction-correction/conversation-history-correction.md) — Removes recent conversation turns to correct instructions and restart a task from a previous state. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))
- [Context Compression](https://awesome-repositories.com/f/artificial-intelligence-ml/context-compression.md) — Reduces token usage by truncating tool returns, compressing historical rounds, and removing unnecessary messages. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter7/))
- [Conversation Branching Systems](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-history-management/conversation-branching-systems.md) — Duplicates current dialogue history into a new session to explore alternative paths without affecting the original. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))
- [Skill Tree Planning](https://awesome-repositories.com/f/artificial-intelligence-ml/curriculum-learning-frameworks/skill-tree-planning.md) — Prioritizes new tasks based on utility and innovation to strategically expand the agent's skill tree. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter12/))
- [Heuristic Budgeting](https://awesome-repositories.com/f/artificial-intelligence-ml/data-preprocessing-pipelines/llm-context-preparation/token-budgeted-assembly/heuristic-budgeting.md) — Tracks conversation length using a character-domain formula to manage token limits independently of specific model tokenizers. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter11/))
- [Heuristic Token Estimators](https://awesome-repositories.com/f/artificial-intelligence-ml/heuristic-token-estimators.md) — Manages token limits using a character-domain heuristic formula to remain independent of specific model tokenizers.
- [Human-in-the-Loop Intervention Requests](https://awesome-repositories.com/f/artificial-intelligence-ml/human-in-the-loop-intervention-requests.md) — Pauses autonomous execution to seek user decisions when the agent reaches its capability boundaries. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))
- [Failover Mechanisms](https://awesome-repositories.com/f/artificial-intelligence-ml/model-provider-management/failover-mechanisms.md) — Automatically switches to backup AI model providers when primary services encounter errors or timeouts. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))
- [Procedure-to-Code Compilation](https://awesome-repositories.com/f/artificial-intelligence-ml/procedure-to-code-compilation.md) — Converts textual procedures into executable scripts to achieve faster and deterministic task completion. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter12/))
- [Real-Time Training Interventions](https://awesome-repositories.com/f/artificial-intelligence-ml/real-time-training-interventions.md) — Modifies running sub-agents by injecting stop signals or new instructions via specialized control files. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))
- [Self-Improving Knowledge Bases](https://awesome-repositories.com/f/artificial-intelligence-ml/self-improving-agent-tutorials/self-improving-knowledge-bases.md) — Records errors and user preferences in a log that guides future behavior via system prompts. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter12/))
- [Autonomous Execution Guards](https://awesome-repositories.com/f/artificial-intelligence-ml/step-based-schedulers/step-execution-engines/execution-step-controllers/autonomous-execution-guards.md) — Prevents runaway autonomous loops by enforcing iteration limits and progress-saving mechanisms. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter8/))
- [Verification Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/step-based-schedulers/step-execution-engines/execution-step-controllers/iterative-step-controllers/state-aware-iterative-loops/verification-loops.md) — Ensures only verified successful task experiences are written to long-term procedural memory to prevent pollution.
- [Tool Definition Optimization](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-definition-optimization.md) — Limits available tools to a minimal collection of atomic functions to reduce redundant definition tokens. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter7/))

### Data & Databases

- [Governed Agent Memory](https://awesome-repositories.com/f/data-databases/data-governance-modeling/data-management-governance/data-governance/knowledge-governance/governed-agent-memory.md) — Establishes organizational rules and update boundaries for the memory system using a meta-memory layer. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter10/))
- [Dynamic Capability Synthesis](https://awesome-repositories.com/f/data-databases/dynamic-extension-loading/runtime-extension-registrations/dynamic-capability-synthesis.md) — Installs Python packages or writes scripts at runtime to create permanent tools from temporary needs. ([source](https://cdn.jsdelivr.net/gh/lsdefine/genericagent@main/README.md))
- [Multi-Tier Memory Systems](https://awesome-repositories.com/f/data-databases/tiered-caching-systems/multi-tier-memory-systems.md) — Organizes conversation data into meta-rules, global facts, and archives across different latency and persistence tiers. ([source](https://cdn.jsdelivr.net/gh/lsdefine/genericagent@main/README.md))
- [KV Cache Eviction](https://awesome-repositories.com/f/data-databases/cache-eviction-policies/kv-cache-eviction.md) — Implements a first-in-first-out message eviction policy to maintain context window compatibility when the token budget is exceeded. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter11/))

### Development Tools & Productivity

- [LLM Tool Orchestration](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-tools/build-task-automation/llm-tool-orchestration.md) — Routes model calls to local executors via a unified schema, decoupling tool definitions from their actual implementation.
- [Background Task Schedulers](https://awesome-repositories.com/f/development-tools-productivity/background-task-schedulers.md) — Launches tasks automatically by monitoring environment changes or time-based schedules. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter8/))
- [Agent Session Parallelization](https://awesome-repositories.com/f/development-tools-productivity/parallel-execution/custom-parallel-task-execution/parallel-task-orchestrators/agent-session-parallelization.md) — Runs multiple independent conversations in a single interface with separate histories and execution threads. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))

### Operating Systems & Systems Programming

- [Local System Automation](https://awesome-repositories.com/f/operating-systems-systems-programming/local-system-automation.md) — Controls the host machine's terminal, filesystem, and web browser to perform autonomous computer operations.
- [System Action Execution](https://awesome-repositories.com/f/operating-systems-systems-programming/system-action-execution.md) — Modifies files via pattern matching, executes code with feedback loops, and operates browsers using JavaScript. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))

### Software Engineering & Architecture

- [Request Dispatchers](https://awesome-repositories.com/f/software-engineering-architecture/request-dispatchers.md) — Routes structured model calls to local executors using a unified schema to decouple tool declarations from implementation. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))
- [Progressive Recovery Flows](https://awesome-repositories.com/f/software-engineering-architecture/error-handling/sequential-recovery-flows/progressive-recovery-flows.md) — Prevents memory pollution and failure by attempting local corrections and strategy shifts before human intervention. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter12/))
- [Error Recovery](https://awesome-repositories.com/f/software-engineering-architecture/error-recovery.md) — Recovers from tool errors through a sequence of local correction, strategy shifting, and human escalation. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))
- [Dynamic Tool Synthesis](https://awesome-repositories.com/f/software-engineering-architecture/requirement-to-task-decomposition/requirement-to-code-generators/dynamic-tool-synthesis.md) — Synthesizes new system capabilities at runtime by installing Python packages or writing custom scripts.
- [Agentic Error Recovery](https://awesome-repositories.com/f/software-engineering-architecture/stream-failure-recovery/agentic-error-recovery.md) — Resolves execution errors through a sequence of local self-correction and strategy shifts before requesting human intervention.

### Web Development

- [Browser Control APIs](https://awesome-repositories.com/f/web-development/web-automation-scraping/browser-control-protocols/browser-control-apis.md) — Automates web research and data retrieval by executing browser actions via a debugging protocol. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter2/))

### Part of an Awesome List

- [Hardware Interaction](https://awesome-repositories.com/f/awesome-lists/devtools/hardware-interaction.md) — Interacts with physical keyboards, mice, and Android devices via ADB for low-level system control. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter4/))
- [AI Agents](https://awesome-repositories.com/f/awesome-lists/ai/ai-agents.md) — Self-evolving agent optimized for token efficiency.

### DevOps & Infrastructure

- [Recurring Job Scheduling](https://awesome-repositories.com/f/devops-infrastructure/recurring-job-scheduling.md) — Manages triggers to execute specific instructions at fixed intervals or calendar dates using JSON configurations. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter6/))

### Networking & Communication

- [Chat Platform Integrations](https://awesome-repositories.com/f/networking-communication/communication-platforms-services/communication-platforms/messaging-middleware/chat-platform-integrations.md) — Connects the agent to third-party messaging services for remote task triggering and notifications. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter5/))
- [Multi-Channel AI Deployments](https://awesome-repositories.com/f/networking-communication/conversational-channel-integrations/multi-channel-ai-deployments.md) — Connects the agent core to diverse user interfaces including chat platforms, web apps, and desktop software. ([source](https://datawhalechina.github.io/hello-generic-agent/part1/chapter1/))

### Security & Cryptography

- [Session Task Tracking](https://awesome-repositories.com/f/security-cryptography/process-sandboxes/session-resumption/ai-agent-sessions/session-task-tracking.md) — Tracks high-level goals and execution progress within a persistent working memory anchor. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter10/))

### System Administration & Monitoring

- [Semantic Layout Analysis](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-observability/ai-agent-observability/observational-memory-systems/semantic-layout-analysis.md) — Scans web pages and file segments using layout analysis to extract semantic content while minimizing token usage. ([source](https://datawhalechina.github.io/hello-generic-agent/part2/chapter9/))
