LightAgent  by wxai-space

Lightweight agentic framework for building AI applications

created 6 months ago
257 stars

Top 98.8% 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 weeks ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
2
Star History
47 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Steven Hao Steven Hao(Cofounder of Cognition), and
6 more.

openai-agents-python by openai

1.5%
13k
Python SDK for multi-agent workflows
created 4 months ago
updated 22 hours ago
Starred by Zhiqiang Xie Zhiqiang Xie(Author of SGLang), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
6 more.

swarm by openai

0.3%
20k
Multi-agent orchestration framework for lightweight agent coordination
created 1 year ago
updated 4 months ago
Feedback? Help us improve.