LightAgent  by wxai-space

Lightweight agentic framework for building AI applications

Created 8 months ago
294 stars

Top 89.9% on SourcePulse

GitHubView on GitHub
Project Summary

LightAgent is a lightweight, Python-native AI agent framework designed for rapid development of autonomous agents. It offers memory, tool integration, and Tree-of-Thought (ToT) reasoning, supporting multi-agent collaboration and a wide array of LLMs. The framework aims to simplify the creation of self-learning agents for various applications.

How It Works

LightAgent is built with a minimalist design, featuring a core implementation under 1000 lines of Python code, avoiding heavy dependencies like LangChain or LlamaIndex. It natively integrates with the mem0 module for persistent memory and supports custom tools with automated generation from API documentation. The Tree-of-Thought module enables complex task decomposition and multi-step reasoning, while its LightSwarm component facilitates multi-agent collaboration through intent recognition and task delegation.

Quick Start & Requirements

  • Install via pip: pip install lightagent
  • Optional memory module: pip install mem0ai
  • Supports OpenAI, DeepSeek, Qwen, ChatGLM, and StepFun models.
  • Example usage and detailed documentation are available.

Highlighted Details

  • Minimalist, 100% Python implementation (core code < 1000 lines).
  • Native mem0 memory module support for autonomous context management.
  • Automated tool generation from API documentation, enabling rapid tool creation.
  • Built-in Tree-of-Thought (ToT) for complex reasoning and task decomposition.
  • LightSwarm for simplified multi-agent collaboration.
  • Supports OpenAI streaming API output for seamless integration.
  • Adaptive tool mechanism reduces token consumption and improves response speed.

Maintenance & Community

Developed jointly by Wanxing AI and Professor Zhang Liwen's research group at Shanghai University of Finance and Economics. Contributions are welcomed via GitHub Issues and Pull Requests. Contact information for Wanxing AI and Professor Zhang Liwen is provided.

Licensing & Compatibility

Licensed under the Apache 2.0 License, permitting free use, modification, and distribution. Compatible with commercial and closed-source applications.

Limitations & Caveats

Some StepFun models (step-1-32k, step-1-128k, step-1-256k, step-2-16k) have reported issues with multi-tool calls. The "Agent Assessment" feature is listed as "Coming Soon."

Health Check
Last Commit

2 days ago

Responsiveness

1 week

Pull Requests (30d)
1
Issues (30d)
2
Star History
38 stars in the last 30 days

Explore Similar Projects

Starred by Wes McKinney Wes McKinney(Author of Pandas), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
22 more.

autogen by microsoft

0.5%
50k
Agentic framework for multi-agent AI applications
Created 2 years ago
Updated 18 hours ago
Feedback? Help us improve.