# LightAgent **Repository Path**: hackha/light-agent ## Basic Information - **Project Name**: LightAgent - **Description**: 一个超轻量、无依赖、可插拔的智能体框架,专门用来快速构建各种 LLM Agent,不用复杂架构。支持工具调用、记忆、反思、多轮规划 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-04-23 - **Last Updated**: 2026-04-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LightAgent 超轻量、无依赖、可插拔的 LLM Agent 框架 ## 特性 - **零依赖**:仅使用 Python 标准库 - **工具调用**:内置工具注册与执行机制 - **记忆系统**:支持简单记忆和摘要记忆 - **反思机制**:自动分析执行结果 - **多步规划**:自动分解复杂任务 ## 快速开始 ```python from LightAgent import Agent, AgentConfig from LightAgent.tools import CalculatorTool def my_llm(prompt: str) -> str: # 调用你的 LLM API return llm.chat(prompt) agent = Agent( llm_provider=my_llm, tools=[CalculatorTool()] ) result = agent.run("计算 25 * 4") ``` ## 内置工具 - `SearchTool` - 网络搜索 - `CalculatorTool` - 数学计算 - `FileReadTool` / `FileWriteTool` - 文件读写 ## 安装 ```bash pip install light-agent ``` 或直接使用源码: ```python import sys sys.path.insert(0, '/path/to/LightAgent') ```