LightAgent 0.3.1__tar.gz → 0.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lightagent-0.3.1 → lightagent-0.3.2}/LightAgent/la_core.py +130 -55
- {lightagent-0.3.1 → lightagent-0.3.2}/PKG-INFO +8 -8
- {lightagent-0.3.1 → lightagent-0.3.2}/README.md +3 -3
- {lightagent-0.3.1 → lightagent-0.3.2}/README.zh-CN.md +4 -4
- {lightagent-0.3.1 → lightagent-0.3.2}/pyproject.toml +1 -1
- {lightagent-0.3.1 → lightagent-0.3.2}/LICENSE +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/LightAgent/__init__.py +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.de.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.es.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.fr.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.ja.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.ko.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.pt.md +0 -0
- {lightagent-0.3.1 → lightagent-0.3.2}/README.ru.md +0 -0
|
@@ -3,33 +3,32 @@
|
|
|
3
3
|
|
|
4
4
|
"""
|
|
5
5
|
作者: [weego/WXAI-Team]
|
|
6
|
-
版本: 0.3.
|
|
6
|
+
版本: 0.3.2
|
|
7
7
|
最后更新: 2025-03-31
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
from copy import deepcopy
|
|
10
|
+
import asyncio
|
|
11
|
+
import importlib
|
|
13
12
|
import importlib.util
|
|
14
|
-
import
|
|
13
|
+
import inspect
|
|
15
14
|
import json
|
|
16
|
-
from datetime import datetime
|
|
17
|
-
from openai import OpenAI
|
|
18
15
|
import logging
|
|
19
16
|
import os
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
from openai.types.chat import ChatCompletionChunk
|
|
23
|
-
import inspect
|
|
17
|
+
import random
|
|
18
|
+
import re
|
|
24
19
|
import traceback
|
|
25
|
-
from mcp import ClientSession, StdioServerParameters, types
|
|
26
20
|
from contextlib import AsyncExitStack
|
|
21
|
+
from copy import deepcopy
|
|
22
|
+
from datetime import datetime
|
|
23
|
+
from functools import partial
|
|
24
|
+
from typing import List, Dict, Any, Callable, Union, Optional, Generator, AsyncGenerator
|
|
27
25
|
|
|
26
|
+
import httpx
|
|
27
|
+
from mcp import ClientSession, StdioServerParameters
|
|
28
28
|
from mcp.client.sse import sse_client
|
|
29
29
|
from mcp.client.stdio import stdio_client
|
|
30
|
-
import
|
|
31
|
-
from
|
|
32
|
-
|
|
30
|
+
from openai import OpenAI
|
|
31
|
+
from openai.types.chat import ChatCompletionChunk
|
|
33
32
|
|
|
34
33
|
# 全局工具注册表
|
|
35
34
|
_FUNCTION_MAPPINGS = {} # 工具名称 -> 工具函数
|
|
@@ -37,7 +36,7 @@ _FUNCTION_INFO = {} # 工具名称 -> 工具info信息
|
|
|
37
36
|
_OPENAI_FUNCTION_SCHEMAS = [] # OpenAI 格式的工具描述
|
|
38
37
|
_PROMPT_FUNCTION_SCHEMAS = [] # prompt 格式的工具描述
|
|
39
38
|
|
|
40
|
-
__version__ = "0.3.
|
|
39
|
+
__version__ = "0.3.2" # 你可以根据需要设置版本号
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
def register_tool_manually(tools: List[Union[str, Callable]]) -> bool:
|
|
@@ -181,6 +180,41 @@ def get_tools_str() -> str:
|
|
|
181
180
|
return tools_str
|
|
182
181
|
|
|
183
182
|
|
|
183
|
+
def filter_tools_schemas(refined_content: str) -> json:
|
|
184
|
+
"""
|
|
185
|
+
根据refined_content中的工具列表过滤全局_OPENAI_FUNCTION_SCHEMAS
|
|
186
|
+
:param refined_content: 包含工具列表的JSON字符串
|
|
187
|
+
"""
|
|
188
|
+
# global _OPENAI_FUNCTION_SCHEMAS # 声明操作全局变量
|
|
189
|
+
|
|
190
|
+
try:
|
|
191
|
+
# 解析工具列表
|
|
192
|
+
parsed_data: Dict[str, List[Dict]] = json.loads(refined_content)
|
|
193
|
+
valid_tools = {tool["name"].strip().lower() for tool in parsed_data.get("tools", [])}
|
|
194
|
+
|
|
195
|
+
# 原地过滤操作
|
|
196
|
+
filtered_schemas: List[Dict] = []
|
|
197
|
+
for schema in _OPENAI_FUNCTION_SCHEMAS:
|
|
198
|
+
if not isinstance(schema, dict):
|
|
199
|
+
continue
|
|
200
|
+
|
|
201
|
+
# 深度检查结构
|
|
202
|
+
function_info = schema.get("function", {})
|
|
203
|
+
if isinstance(function_info, dict):
|
|
204
|
+
schema_name = function_info.get("name", "").strip().lower()
|
|
205
|
+
if schema_name in valid_tools:
|
|
206
|
+
filtered_schemas.append(schema)
|
|
207
|
+
|
|
208
|
+
# 直接替换全局变量内容
|
|
209
|
+
# _OPENAI_FUNCTION_SCHEMAS[:] = filtered_schemas
|
|
210
|
+
return filtered_schemas
|
|
211
|
+
|
|
212
|
+
except (json.JSONDecodeError, KeyError, AttributeError) as e:
|
|
213
|
+
# 错误处理:清空工具列表并记录日志
|
|
214
|
+
# _OPENAI_FUNCTION_SCHEMAS.clear()
|
|
215
|
+
raise ValueError(f"工具过滤失败: {str(e)}") from e
|
|
216
|
+
|
|
217
|
+
|
|
184
218
|
class MCPClientManager:
|
|
185
219
|
"""增强版MCP客户端管理器"""
|
|
186
220
|
|
|
@@ -379,7 +413,7 @@ class MCPClientManager:
|
|
|
379
413
|
|
|
380
414
|
|
|
381
415
|
class LightAgent:
|
|
382
|
-
__version__ = "0.3.
|
|
416
|
+
__version__ = "0.3.2" # 将版本号放在类中
|
|
383
417
|
|
|
384
418
|
def __init__(
|
|
385
419
|
self,
|
|
@@ -463,7 +497,6 @@ class LightAgent:
|
|
|
463
497
|
self.load_tools(tools)
|
|
464
498
|
# register_tool_manually(tools)
|
|
465
499
|
|
|
466
|
-
|
|
467
500
|
if api_key is None:
|
|
468
501
|
raise ValueError(
|
|
469
502
|
"The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable"
|
|
@@ -605,8 +638,8 @@ class LightAgent:
|
|
|
605
638
|
self.logger.error(log_message)
|
|
606
639
|
|
|
607
640
|
async def setup_mcp(
|
|
608
|
-
|
|
609
|
-
|
|
641
|
+
self,
|
|
642
|
+
mcp_setting: dict | None = None, # mcp 设置
|
|
610
643
|
):
|
|
611
644
|
if mcp_setting:
|
|
612
645
|
self.mcp_setting = mcp_setting
|
|
@@ -680,19 +713,29 @@ class LightAgent:
|
|
|
680
713
|
query = f"{memory}\n##用户提问:\n{query}"
|
|
681
714
|
# print(query)
|
|
682
715
|
|
|
683
|
-
# 4.
|
|
684
|
-
|
|
716
|
+
# 4. 思维链
|
|
717
|
+
active_tools = []
|
|
718
|
+
if self.tree_of_thought:
|
|
719
|
+
tot_response, active_tools = self.run_thought(query=query)
|
|
720
|
+
system_prompt = system_prompt + f" /n ##以下是问题的补充说明 /n {tot_response}"
|
|
721
|
+
self.log("DEBUG", "tree_of_thought", {"response": tot_response, "active_tools": active_tools})
|
|
722
|
+
|
|
723
|
+
# 5. 拼接tools工具
|
|
724
|
+
# 带类型校验 自适应工具机制
|
|
725
|
+
try:
|
|
726
|
+
tools = active_tools if (
|
|
727
|
+
len(active_tools) > 0
|
|
728
|
+
) else get_tools()
|
|
729
|
+
except TypeError:
|
|
730
|
+
tools = get_tools()
|
|
731
|
+
# 带类型校验 自适应工具机制
|
|
732
|
+
# tools = get_tools() # v0.2.X的工具选取机制
|
|
685
733
|
if tools:
|
|
686
734
|
self.log("DEBUG", "register_tools", {"tools": list(_FUNCTION_MAPPINGS.keys())})
|
|
735
|
+
self.log("DEBUG", "active_tools", {"tools": tools})
|
|
687
736
|
params["tools"] = tools
|
|
688
737
|
params["tool_choice"] = "auto"
|
|
689
738
|
|
|
690
|
-
# 5. 思维链
|
|
691
|
-
if self.tree_of_thought:
|
|
692
|
-
tot_response = self.run_thought(query=query)
|
|
693
|
-
system_prompt = system_prompt + f" /n ##以下是问题的补充说明 /n {tot_response}"
|
|
694
|
-
self.log("DEBUG", "tree_of_thought", {"response": tot_response})
|
|
695
|
-
|
|
696
739
|
# 6. 调用核心运行逻辑
|
|
697
740
|
params["messages"] = [{"role": "system", "content": system_prompt}]
|
|
698
741
|
# 将历史对话添加到消息列表中
|
|
@@ -1075,10 +1118,10 @@ class LightAgent:
|
|
|
1075
1118
|
:param related_memories: 从记忆中检索到的相关内容。
|
|
1076
1119
|
:return: 结合记忆后的上下文。
|
|
1077
1120
|
"""
|
|
1078
|
-
if not related_memories or not related_memories["
|
|
1121
|
+
if not related_memories or not related_memories["results"]:
|
|
1079
1122
|
return ""
|
|
1080
1123
|
|
|
1081
|
-
memory_context = "\n".join([m["memory"] for m in related_memories["
|
|
1124
|
+
memory_context = "\n".join([m["memory"] for m in related_memories["results"]])
|
|
1082
1125
|
if not memory_context:
|
|
1083
1126
|
return ""
|
|
1084
1127
|
|
|
@@ -1093,10 +1136,10 @@ class LightAgent:
|
|
|
1093
1136
|
:param agent_memories: 从记忆中检索到的相关内容。
|
|
1094
1137
|
:return: 结合记忆后的上下文。
|
|
1095
1138
|
"""
|
|
1096
|
-
if not agent_memories or not agent_memories["
|
|
1139
|
+
if not agent_memories or not agent_memories["results"]:
|
|
1097
1140
|
return ""
|
|
1098
1141
|
|
|
1099
|
-
memory_context = "\n".join([m["memory"] for m in agent_memories["
|
|
1142
|
+
memory_context = "\n".join([m["memory"] for m in agent_memories["results"]])
|
|
1100
1143
|
if not memory_context:
|
|
1101
1144
|
return ""
|
|
1102
1145
|
|
|
@@ -1104,7 +1147,7 @@ class LightAgent:
|
|
|
1104
1147
|
self.log("DEBUG", "agent_memories", {"memory_context": memory_context})
|
|
1105
1148
|
return prompt
|
|
1106
1149
|
|
|
1107
|
-
def run_thought(self, query: str
|
|
1150
|
+
def run_thought(self, query: str) -> tuple:
|
|
1108
1151
|
"""使用思维树的方式 让大模型先根据get_tools_str生成一个解答用户query的工具使用计划"""
|
|
1109
1152
|
tot_model = self.tot_model # self.model
|
|
1110
1153
|
tools = get_tools_str()
|
|
@@ -1113,30 +1156,62 @@ class LightAgent:
|
|
|
1113
1156
|
now = datetime.now()
|
|
1114
1157
|
current_date = now.strftime("%Y-%m-%d")
|
|
1115
1158
|
current_time = now.strftime("%H:%M:%S")
|
|
1116
|
-
system_prompt = f"""
|
|
1159
|
+
system_prompt = f"""你是一个智能助手,请根据用户输入的问题,结合工具使用计划,生成一个思维树,并按照思维树依次调用工具步骤,最终生成一个最终回答。\n 今日的日期: {current_date} 当前时间: {current_time} \n 工具列表: {tools}"""
|
|
1117
1160
|
self.log("DEBUG", "run_thought", {"system_prompt": system_prompt})
|
|
1118
1161
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1162
|
+
try:
|
|
1163
|
+
# 第一次请求,生成初始的工具使用计划
|
|
1164
|
+
params = dict(model=tot_model,
|
|
1165
|
+
messages=[{"role": "system", "content": system_prompt}, {"role": "user", "content": query}],
|
|
1166
|
+
stream=False)
|
|
1167
|
+
response = self.tot_client.chat.completions.create(**params)
|
|
1168
|
+
initial_content = response.choices[0].message.content
|
|
1169
|
+
self.log("DEBUG", "initial_response", {"response": initial_content})
|
|
1170
|
+
|
|
1171
|
+
# 第二次请求,请求大模型反思并生成新的工具使用规划
|
|
1172
|
+
reflection_prompt = "请反思你的回答,请严格按照<工具列表>中的工具来规划,不可以创造其他新的工具。请输出新的任务规划,不要输出其他分析和回答。"
|
|
1173
|
+
reflection_params = dict(model=tot_model, messages=[
|
|
1174
|
+
{"role": "user", "content": f"{system_prompt} /n 开始思考问题: {query}"},
|
|
1175
|
+
{"role": "assistant", "content": initial_content},
|
|
1176
|
+
{"role": "user", "content": reflection_prompt}
|
|
1177
|
+
], stream=False)
|
|
1178
|
+
self.log("DEBUG", "reflection_params", {"params": reflection_params})
|
|
1179
|
+
reflection_response = self.tot_client.chat.completions.create(**reflection_params)
|
|
1180
|
+
refined_content = reflection_response.choices[0].message.content
|
|
1181
|
+
self.log("DEBUG", "refined_response", {"response": refined_content})
|
|
1182
|
+
|
|
1183
|
+
# 获取工具的使用集合
|
|
1184
|
+
tool_reflection_prompt = """请严格按以下要求执行:
|
|
1185
|
+
1. 分析问题需求并规划需要使用的工具
|
|
1186
|
+
2. 仅输出包含工具名称的JSON格式结果
|
|
1187
|
+
3. 使用以下结构(示例):
|
|
1188
|
+
{"tools": [{"name": "工具名称1"}, {"name": "工具名称2"}]}
|
|
1189
|
+
4. 不要包含任何解释性内容"""
|
|
1190
|
+
|
|
1191
|
+
tool_reflection_params = dict(
|
|
1192
|
+
model=tot_model,
|
|
1193
|
+
messages=[
|
|
1194
|
+
{"role": "system", "content": system_prompt},
|
|
1195
|
+
{"role": "user", "content": f"问题分析请求:{query}"},
|
|
1196
|
+
{"role": "assistant", "content": refined_content},
|
|
1197
|
+
{"role": "user", "content": tool_reflection_prompt}
|
|
1198
|
+
],
|
|
1199
|
+
response_format={"type": "json_object"}, # 强制JSON输出格式
|
|
1200
|
+
stream=False
|
|
1201
|
+
)
|
|
1202
|
+
|
|
1203
|
+
self.log("DEBUG", "tool_reflection_params", {"params": tool_reflection_params})
|
|
1204
|
+
tool_reflection_response = self.tot_client.chat.completions.create(**tool_reflection_params)
|
|
1205
|
+
tool_reflection_result = tool_reflection_response.choices[0].message.content
|
|
1206
|
+
self.log("DEBUG", "tool_reflection_result", {"result": tool_reflection_result})
|
|
1207
|
+
current_tools = filter_tools_schemas(tool_reflection_result)
|
|
1208
|
+
self.log("DEBUG", "current_tools", {"get_tools": current_tools})
|
|
1209
|
+
|
|
1210
|
+
return refined_content, current_tools
|
|
1211
|
+
|
|
1212
|
+
except Exception as e:
|
|
1213
|
+
self.log("ERROR", "run_thought_failure", {"error": str(e)})
|
|
1214
|
+
raise RuntimeError(f"思维链执行失败: {str(e)}") from e
|
|
1140
1215
|
|
|
1141
1216
|
def _detect_intent(self, query: str, light_swarm=None) -> Optional[Dict]:
|
|
1142
1217
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: LightAgent
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: **LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a Tree of Thought (`ToT`). It supports swarm-like multi-agent collaboration, automated tool generation, and agent assessment, with underlying model support for OpenAI, Zhipu ChatGLM, Baichuan Large Model, DeepSeek R1, Qwen series large models, and more. At the same time, LightAgent supports OpenAI streaming format API service output, seamlessly integrating with major mainstream chat frameworks. 🌟
|
|
5
5
|
Home-page: https://github.com/wxai-space/LightAgent
|
|
6
6
|
License: Apache 2.0
|
|
@@ -55,10 +55,10 @@ Description-Content-Type: text/markdown
|
|
|
55
55
|
</p>
|
|
56
56
|
</div>
|
|
57
57
|
<div align="center">
|
|
58
|
-
<h1>LightAgent🚀 (
|
|
58
|
+
<h1>LightAgent🚀 (Production-level open-source Agentic AI development framework)</h1>
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
|
-
**LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a
|
|
61
|
+
**LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a tree of thought (`ToT`), and it is completely open-source. It supports simpler multi-agent collaboration than OpenAI Swarm, builds agents with self-learning capabilities, and supports MCP. The underlying models support OpenAI, ChatGLM, DeepSeek, stepfun, Qwen and more. At the same time, LightAgent supports OpenAI streaming format API service output, seamlessly integrating with major mainstream Chat frameworks. 🌟
|
|
62
62
|
|
|
63
63
|
---
|
|
64
64
|
|
|
@@ -80,7 +80,7 @@ Description-Content-Type: text/markdown
|
|
|
80
80
|
|
|
81
81
|
---
|
|
82
82
|
## News
|
|
83
|
-
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-
|
|
83
|
+
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-04-01]** LightAgent v0.3.0 Support browser interaction [browser_use](https://github.com/browser-use/browser-use) and fully supports the MCP protocol, enabling collaborative work with multiple models and tools to achieve more efficient handling of complex tasks.<a href="mcp_release.md">View MCP release introduction.>></a>
|
|
84
84
|
- **[2025-02-19]** LightAgent v0.2.7 supports deepseek-r1 model for tot now.Significantly enhances the multi-tool planning capability for complex tasks.
|
|
85
85
|
- **[2025-02-06]** LightAgent version 0.2.5 is released now.
|
|
86
86
|
- **[2025-01-20]** LightAgent version 0.2.0 is released now.
|
|
@@ -777,10 +777,10 @@ We look forward to your feedback and work together to make LightAgent even stron
|
|
|
777
777
|
</div>
|
|
778
778
|
|
|
779
779
|
<div align="center">
|
|
780
|
-
<h1>LightAgent
|
|
780
|
+
<h1>LightAgent🚀(生产级开源Agentic AI开发框架)</h1>
|
|
781
781
|
</div>
|
|
782
782
|
|
|
783
|
-
**LightAgent** 是一个极其轻量的带记忆(`mem0`)、工具(`Tools`)、思维树(`ToT`)的主动式 Agentic Framework
|
|
783
|
+
**LightAgent** 是一个极其轻量的带记忆(`mem0`)、工具(`Tools`)、思维树(`ToT`)的主动式 Agentic Framework(自主性框架),并且完全开源。它支持比Openai Swarm更简单的多智能体协同,简单一步即可构建具备自我学习能力的agent,并支持stdio和sse方式接入MCP协议。底层模型支持 OpenAI、智谱 ChatGLM、DeepSeek、阶跃星辰、Qwen通义千问大模型等。同时,LightAgent 支持 OpenAI 流格式 API 服务输出,无缝接入各大主流 Chat 框架。🌟
|
|
784
784
|
|
|
785
785
|
---
|
|
786
786
|

|
|
@@ -795,12 +795,12 @@ We look forward to your feedback and work together to make LightAgent even stron
|
|
|
795
795
|
- **独立执行** 🤖:无人为干预自主完成任务工具调用。
|
|
796
796
|
- **多模型支持** 🔄:兼容 OpenAI、智谱 ChatGLM、百川大模型、阶跃星辰、DeepSeek、Qwen 系列大模型。
|
|
797
797
|
- **流式 API输出** 🌊:支持 OpenAI 流格式 API 服务输出,无缝接入主流 Chat 框架,提升用户体验。
|
|
798
|
-
- **Tools工具生成器** 🚀:只需将您的API文档交给[Tools工具生成器],它将自动化地为您打造专属的tools,助您在短短1小时内快速构建数百个个性化的自定义工具,提升效率,释放您的创新潜能。
|
|
798
|
+
- **Tools工具生成器** 🚀:只需将您的API文档交给[[Tools工具生成器]](#3-tools工具生成器),它将自动化地为您打造专属的tools,助您在短短1小时内快速构建数百个个性化的自定义工具,提升效率,释放您的创新潜能。
|
|
799
799
|
- **agent自我学习** 🧠️:每个agent拥有自己的场景记忆能力,拥有从用户的对话中进行自我学习能力。
|
|
800
800
|
|
|
801
801
|
---
|
|
802
802
|
## 新闻
|
|
803
|
-
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-
|
|
803
|
+
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-04-01]** LightAgent v0.3.0 支持浏览器交互 [browser_use](https://github.com/browser-use/browser-use),并全面支持MCP协议,支持多模型多工具的协同工作,实现更高效的复杂任务处理。<a href="mcp_release.zh-CN.md">查看MCP发布简介>></a>
|
|
804
804
|
- **[2025-02-19]** LightAgent v0.2.7 支持单独采用 deepseek-r1 作为的agent推理规划ToT引擎,大幅度提升复杂任务的多工具Plan能力.
|
|
805
805
|
- **[2025-02-06]** LightAgent version 0.2.5 is released now.
|
|
806
806
|
- **[2025-01-20]** LightAgent version 0.2.0 is released now.
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
</p>
|
|
31
31
|
</div>
|
|
32
32
|
<div align="center">
|
|
33
|
-
<h1>LightAgent🚀 (
|
|
33
|
+
<h1>LightAgent🚀 (Production-level open-source Agentic AI development framework)</h1>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
|
-
**LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a
|
|
36
|
+
**LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a tree of thought (`ToT`), and it is completely open-source. It supports simpler multi-agent collaboration than OpenAI Swarm, builds agents with self-learning capabilities, and supports MCP. The underlying models support OpenAI, ChatGLM, DeepSeek, stepfun, Qwen and more. At the same time, LightAgent supports OpenAI streaming format API service output, seamlessly integrating with major mainstream Chat frameworks. 🌟
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
---
|
|
57
57
|
## News
|
|
58
|
-
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-
|
|
58
|
+
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-04-01]** LightAgent v0.3.0 Support browser interaction [browser_use](https://github.com/browser-use/browser-use) and fully supports the MCP protocol, enabling collaborative work with multiple models and tools to achieve more efficient handling of complex tasks.<a href="mcp_release.md">View MCP release introduction.>></a>
|
|
59
59
|
- **[2025-02-19]** LightAgent v0.2.7 supports deepseek-r1 model for tot now.Significantly enhances the multi-tool planning capability for complex tasks.
|
|
60
60
|
- **[2025-02-06]** LightAgent version 0.2.5 is released now.
|
|
61
61
|
- **[2025-01-20]** LightAgent version 0.2.0 is released now.
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<div align="center">
|
|
33
|
-
<h1>LightAgent
|
|
33
|
+
<h1>LightAgent🚀(生产级开源Agentic AI开发框架)</h1>
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
|
-
**LightAgent** 是一个极其轻量的带记忆(`mem0`)、工具(`Tools`)、思维树(`ToT`)的主动式 Agentic Framework
|
|
36
|
+
**LightAgent** 是一个极其轻量的带记忆(`mem0`)、工具(`Tools`)、思维树(`ToT`)的主动式 Agentic Framework(自主性框架),并且完全开源。它支持比Openai Swarm更简单的多智能体协同,简单一步即可构建具备自我学习能力的agent,并支持stdio和sse方式接入MCP协议。底层模型支持 OpenAI、智谱 ChatGLM、DeepSeek、阶跃星辰、Qwen通义千问大模型等。同时,LightAgent 支持 OpenAI 流格式 API 服务输出,无缝接入各大主流 Chat 框架。🌟
|
|
37
37
|
|
|
38
38
|
---
|
|
39
39
|

|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
- **独立执行** 🤖:无人为干预自主完成任务工具调用。
|
|
49
49
|
- **多模型支持** 🔄:兼容 OpenAI、智谱 ChatGLM、百川大模型、阶跃星辰、DeepSeek、Qwen 系列大模型。
|
|
50
50
|
- **流式 API输出** 🌊:支持 OpenAI 流格式 API 服务输出,无缝接入主流 Chat 框架,提升用户体验。
|
|
51
|
-
- **Tools工具生成器** 🚀:只需将您的API文档交给[Tools工具生成器],它将自动化地为您打造专属的tools,助您在短短1小时内快速构建数百个个性化的自定义工具,提升效率,释放您的创新潜能。
|
|
51
|
+
- **Tools工具生成器** 🚀:只需将您的API文档交给[[Tools工具生成器]](#3-tools工具生成器),它将自动化地为您打造专属的tools,助您在短短1小时内快速构建数百个个性化的自定义工具,提升效率,释放您的创新潜能。
|
|
52
52
|
- **agent自我学习** 🧠️:每个agent拥有自己的场景记忆能力,拥有从用户的对话中进行自我学习能力。
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
## 新闻
|
|
56
|
-
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-
|
|
56
|
+
- <img src="https://img.alicdn.com/imgextra/i3/O1CN01SFL0Gu26nrQBFKXFR_!!6000000007707-2-tps-500-500.png" alt="new" width="30" height="30"/>**[2025-04-01]** LightAgent v0.3.0 支持浏览器交互 [browser_use](https://github.com/browser-use/browser-use),并全面支持MCP协议,支持多模型多工具的协同工作,实现更高效的复杂任务处理。<a href="mcp_release.zh-CN.md">查看MCP发布简介>></a>
|
|
57
57
|
- **[2025-02-19]** LightAgent v0.2.7 支持单独采用 deepseek-r1 作为的agent推理规划ToT引擎,大幅度提升复杂任务的多工具Plan能力.
|
|
58
58
|
- **[2025-02-06]** LightAgent version 0.2.5 is released now.
|
|
59
59
|
- **[2025-01-20]** LightAgent version 0.2.0 is released now.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "LightAgent"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.2"
|
|
4
4
|
description = "**LightAgent** is an extremely lightweight active Agentic Framework with memory (`mem0`), tools (`Tools`), and a Tree of Thought (`ToT`). It supports swarm-like multi-agent collaboration, automated tool generation, and agent assessment, with underlying model support for OpenAI, Zhipu ChatGLM, Baichuan Large Model, DeepSeek R1, Qwen series large models, and more. At the same time, LightAgent supports OpenAI streaming format API service output, seamlessly integrating with major mainstream chat frameworks. 🌟"
|
|
5
5
|
authors = ["caiweige <caiweige@qq.com>"]
|
|
6
6
|
license = "Apache 2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|