hello-generic-agent  by datawhalechina

Efficient AI agent framework for maximizing context density

Created 1 month ago
467 stars

Top 64.5% on SourcePulse

GitHubView on GitHub
Project Summary

Generic Agent (GA) addresses the challenge of high token consumption and complex management in advanced AI agents, offering a solution focused on maximizing "contextual information density." It targets users frustrated by the costs of large-token models like Openclaw and ClaudeCode, as well as developers and enthusiasts seeking to build or understand self-evolving agents. GA promises up to 10x-30x token efficiency, simplified setup, and a deep dive into agent architecture, enabling users to create personalized, efficient AI assistants.

How It Works

GA's core principle is prioritizing information density over raw context length. Its architecture features a unified agent loop and dual execution modes, driven by four key mechanisms. Central to its design is a minimal atomic toolset, designed for high efficiency. A sophisticated four-layer memory system (L1 Index, L2 Fact, L3 SOP, L4 Archive) manages information, employing on-demand loading. Contextual data is rigorously managed through a four-level truncation and compression pipeline, maintaining context within a 30k token limit. Furthermore, a self-evolution mechanism transforms natural language into SOPs and executable code, significantly reducing token usage. Complex behaviors like sub-agents and timed tasks emerge from the combination of simple primitives.

Quick Start & Requirements

Installation involves standard Python setup, project download, and API key configuration, with options for GUI or command-line launch. Browser automation requires the tmwd_cdp_bridge plugin. Online learning resources are available without download.

Highlighted Details

  • Achieves 10x-30x greater token efficiency compared to models like Openclaw.
  • Its minimal atomic toolset consumes only 35% of the tokens used by Claude Code.
  • The self-evolution mechanism saves 89.6% of tokens through a three-stage process.
  • Features a four-layer memory architecture (L1-L4) with on-demand loading.
  • Supports browser automation and integration with multiple chat platforms (WeChat, Feishu, DingTalk, QQ, Telegram, Enterprise WeChat).
  • Includes advanced capabilities like Reflect mode, sub-agents, and Plan mode.

Maintenance & Community

The project is led by Zhang Zhoujia, with contributions from Fudan University researchers. Users can report issues or submit pull requests; contact with the "保姆团队" is suggested for follow-up. Information on initiating new projects is available via the Datawhale Open Source Project Guide. Community engagement is facilitated through the Datawhale official public account.

Licensing & Compatibility

The project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0). This license restricts commercial use and requires derivative works to be shared under the same terms.

Limitations & Caveats

This project is currently in a "Beta public testing version" (🧪 Beta公测版), with ongoing optimization of tutorial details. While the core tutorial content is largely complete, users should anticipate potential refinements and be aware of its beta status.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
6
Issues (30d)
6
Star History
186 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.