agent-os-server 0.0.4__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.
- agent_os_server-0.0.4/LICENSE +0 -0
- agent_os_server-0.0.4/PKG-INFO +168 -0
- agent_os_server-0.0.4/README.md +147 -0
- agent_os_server-0.0.4/pyproject.toml +38 -0
- agent_os_server-0.0.4/setup.cfg +4 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/PKG-INFO +168 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/SOURCES.txt +14 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/dependency_links.txt +1 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/entry_points.txt +4 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/requires.txt +5 -0
- agent_os_server-0.0.4/src/agent_os_server.egg-info/top_level.txt +1 -0
- agent_os_server-0.0.4/src/agent_server/__init__.py +0 -0
- agent_os_server-0.0.4/src/agent_server/adk_server.py +372 -0
- agent_os_server-0.0.4/src/agent_server/agui_server.py +69 -0
- agent_os_server-0.0.4/src/agent_server/cmd_server.py +340 -0
- agent_os_server-0.0.4/src/agent_server/utils.py +154 -0
|
File without changes
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-os-server
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: 智能体服务
|
|
5
|
+
Author-email: fubo <fb_linux@163.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server/blob/master/README.md
|
|
8
|
+
Project-URL: Repository, https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server.git
|
|
9
|
+
Keywords: agent-server
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: agent-os-base>=0.1.2
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
19
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# Agent Server
|
|
23
|
+
|
|
24
|
+
一个基于 Google ADK (Agent Development Kit) 和 FastAPI 构建的智能体服务服务器,用于运行和管理 AI 代理。
|
|
25
|
+
|
|
26
|
+
## 项目概述
|
|
27
|
+
|
|
28
|
+
`agent-server` 提供了多种接口方式来与 AI 代理进行交互,包括 HTTP API、AGUI 接口和命令行界面。
|
|
29
|
+
|
|
30
|
+
## 核心功能
|
|
31
|
+
|
|
32
|
+
### 1. ADK Server
|
|
33
|
+
|
|
34
|
+
基于 FastAPI 的 HTTP API 服务器,使用 Google ADK 的 Runner 来执行代理。
|
|
35
|
+
|
|
36
|
+
- **功能**: 提供标准的 HTTP API 接口
|
|
37
|
+
- **会话管理**: 支持会话创建和管理
|
|
38
|
+
- **安全**: 包含用户白名单中间件
|
|
39
|
+
- **启动命令**: `agent-server-adk`
|
|
40
|
+
|
|
41
|
+
### 2. AGUI Server
|
|
42
|
+
|
|
43
|
+
提供 AGUI (Agent Graphical User Interface) 接口,用于图形化交互。
|
|
44
|
+
|
|
45
|
+
- **主要端点**:
|
|
46
|
+
- `POST /agui/api/v1/chat/completions` - 聊天完成接口
|
|
47
|
+
- `GET /agui/api/v1/reload` - 热重载代理配置
|
|
48
|
+
- `GET /agui/api/v1/health` - 健康检查
|
|
49
|
+
- **启动命令**: `agent-server-agui`
|
|
50
|
+
|
|
51
|
+
### 3. CMD Server
|
|
52
|
+
|
|
53
|
+
命令行交互界面,使用 `rich` 库实现彩色输出和 Markdown 渲染。
|
|
54
|
+
|
|
55
|
+
- **功能**:
|
|
56
|
+
- 任务提交和执行
|
|
57
|
+
- 会话管理(列出、删除)
|
|
58
|
+
- 实时输出代理响应
|
|
59
|
+
- 支持工具调用和函数响应展示
|
|
60
|
+
- **启动命令**: `agent-server-cmd`
|
|
61
|
+
|
|
62
|
+
## 技术架构
|
|
63
|
+
|
|
64
|
+
### 依赖
|
|
65
|
+
- **Google ADK**: Agent Development Kit,用于代理运行
|
|
66
|
+
- **FastAPI**: Web 框架,提供 HTTP API
|
|
67
|
+
- **Uvicorn**: ASGI 服务器
|
|
68
|
+
- **Rich**: 命令行美化输出
|
|
69
|
+
- **Python Dotenv**: 环境变量管理
|
|
70
|
+
|
|
71
|
+
### 工具类 (utils.py)
|
|
72
|
+
|
|
73
|
+
- **Utils.Service**: 提供 session 和 memory 服务的创建
|
|
74
|
+
- `memory_service()`: 创建记忆服务
|
|
75
|
+
- `session_service()`: 创建会话服务
|
|
76
|
+
- **Utils.Agent**: 负责代理的加载和运行器创建
|
|
77
|
+
- `load_adk_agents()`: 从指定路径加载代理配置
|
|
78
|
+
- `create_adk_agent_agui_runner()`: 创建 AGUI 运行器
|
|
79
|
+
- `create_adk_agent_adk_runner()`: 创建 ADK 运行器
|
|
80
|
+
|
|
81
|
+
## 配置说明
|
|
82
|
+
|
|
83
|
+
配置文件:`.server.env`
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# 代理配置路径
|
|
87
|
+
AGENTS_PATH=/Users/fubo/develop/apps/agent-os/agents
|
|
88
|
+
|
|
89
|
+
# 会话服务数据库 URI(留空使用内存服务)
|
|
90
|
+
SESSION_SERVICE_URI=
|
|
91
|
+
|
|
92
|
+
# 记忆服务 URI(留空使用内存服务)
|
|
93
|
+
MEMORY_SERVICE_URI=
|
|
94
|
+
|
|
95
|
+
# 用户服务 URI
|
|
96
|
+
USER_SERVICE_URI=
|
|
97
|
+
|
|
98
|
+
# 追踪服务 URI
|
|
99
|
+
TRACE_SERVICE_URI=
|
|
100
|
+
|
|
101
|
+
# 服务器监听地址
|
|
102
|
+
HOST=0.0.0.0
|
|
103
|
+
|
|
104
|
+
# 服务器端口
|
|
105
|
+
PORT=8000
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 安装与使用
|
|
109
|
+
|
|
110
|
+
### 安装依赖
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install -e .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 启动服务
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 启动 AGUI 服务器
|
|
120
|
+
agent-server-agui
|
|
121
|
+
|
|
122
|
+
# 启动命令行界面
|
|
123
|
+
agent-server-cmd
|
|
124
|
+
|
|
125
|
+
# 启动 ADK 服务器
|
|
126
|
+
agent-server-adk
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 项目结构
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
agent-server/
|
|
133
|
+
├── src/
|
|
134
|
+
│ └── agent_server/
|
|
135
|
+
│ ├── __init__.py
|
|
136
|
+
│ ├── adk_server.py # ADK HTTP 服务器
|
|
137
|
+
│ ├── agui_server.py # AGUI 服务器
|
|
138
|
+
│ ├── cmd_server.py # 命令行服务器
|
|
139
|
+
│ ├── utils.py # 工具类
|
|
140
|
+
│ └── .server.env # 配置文件
|
|
141
|
+
├── tests/
|
|
142
|
+
├── pyproject.toml
|
|
143
|
+
├── Dockerfile
|
|
144
|
+
└── README.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 开发信息
|
|
148
|
+
|
|
149
|
+
- **版本**: 0.0.1
|
|
150
|
+
- **作者**: fubo <fb_linux@163.com>
|
|
151
|
+
- **许可证**: MIT
|
|
152
|
+
- **Python 版本**: >= 3.10
|
|
153
|
+
|
|
154
|
+
## 依赖项
|
|
155
|
+
|
|
156
|
+
- `agent-base>=0.1.2`
|
|
157
|
+
- `fastapi`
|
|
158
|
+
- `uvicorn`
|
|
159
|
+
- `rich`
|
|
160
|
+
- `python-dotenv`
|
|
161
|
+
- `google-adk`
|
|
162
|
+
|
|
163
|
+
## 测试
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
pip install -e ".[test]"
|
|
167
|
+
pytest
|
|
168
|
+
```
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Agent Server
|
|
2
|
+
|
|
3
|
+
一个基于 Google ADK (Agent Development Kit) 和 FastAPI 构建的智能体服务服务器,用于运行和管理 AI 代理。
|
|
4
|
+
|
|
5
|
+
## 项目概述
|
|
6
|
+
|
|
7
|
+
`agent-server` 提供了多种接口方式来与 AI 代理进行交互,包括 HTTP API、AGUI 接口和命令行界面。
|
|
8
|
+
|
|
9
|
+
## 核心功能
|
|
10
|
+
|
|
11
|
+
### 1. ADK Server
|
|
12
|
+
|
|
13
|
+
基于 FastAPI 的 HTTP API 服务器,使用 Google ADK 的 Runner 来执行代理。
|
|
14
|
+
|
|
15
|
+
- **功能**: 提供标准的 HTTP API 接口
|
|
16
|
+
- **会话管理**: 支持会话创建和管理
|
|
17
|
+
- **安全**: 包含用户白名单中间件
|
|
18
|
+
- **启动命令**: `agent-server-adk`
|
|
19
|
+
|
|
20
|
+
### 2. AGUI Server
|
|
21
|
+
|
|
22
|
+
提供 AGUI (Agent Graphical User Interface) 接口,用于图形化交互。
|
|
23
|
+
|
|
24
|
+
- **主要端点**:
|
|
25
|
+
- `POST /agui/api/v1/chat/completions` - 聊天完成接口
|
|
26
|
+
- `GET /agui/api/v1/reload` - 热重载代理配置
|
|
27
|
+
- `GET /agui/api/v1/health` - 健康检查
|
|
28
|
+
- **启动命令**: `agent-server-agui`
|
|
29
|
+
|
|
30
|
+
### 3. CMD Server
|
|
31
|
+
|
|
32
|
+
命令行交互界面,使用 `rich` 库实现彩色输出和 Markdown 渲染。
|
|
33
|
+
|
|
34
|
+
- **功能**:
|
|
35
|
+
- 任务提交和执行
|
|
36
|
+
- 会话管理(列出、删除)
|
|
37
|
+
- 实时输出代理响应
|
|
38
|
+
- 支持工具调用和函数响应展示
|
|
39
|
+
- **启动命令**: `agent-server-cmd`
|
|
40
|
+
|
|
41
|
+
## 技术架构
|
|
42
|
+
|
|
43
|
+
### 依赖
|
|
44
|
+
- **Google ADK**: Agent Development Kit,用于代理运行
|
|
45
|
+
- **FastAPI**: Web 框架,提供 HTTP API
|
|
46
|
+
- **Uvicorn**: ASGI 服务器
|
|
47
|
+
- **Rich**: 命令行美化输出
|
|
48
|
+
- **Python Dotenv**: 环境变量管理
|
|
49
|
+
|
|
50
|
+
### 工具类 (utils.py)
|
|
51
|
+
|
|
52
|
+
- **Utils.Service**: 提供 session 和 memory 服务的创建
|
|
53
|
+
- `memory_service()`: 创建记忆服务
|
|
54
|
+
- `session_service()`: 创建会话服务
|
|
55
|
+
- **Utils.Agent**: 负责代理的加载和运行器创建
|
|
56
|
+
- `load_adk_agents()`: 从指定路径加载代理配置
|
|
57
|
+
- `create_adk_agent_agui_runner()`: 创建 AGUI 运行器
|
|
58
|
+
- `create_adk_agent_adk_runner()`: 创建 ADK 运行器
|
|
59
|
+
|
|
60
|
+
## 配置说明
|
|
61
|
+
|
|
62
|
+
配置文件:`.server.env`
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# 代理配置路径
|
|
66
|
+
AGENTS_PATH=/Users/fubo/develop/apps/agent-os/agents
|
|
67
|
+
|
|
68
|
+
# 会话服务数据库 URI(留空使用内存服务)
|
|
69
|
+
SESSION_SERVICE_URI=
|
|
70
|
+
|
|
71
|
+
# 记忆服务 URI(留空使用内存服务)
|
|
72
|
+
MEMORY_SERVICE_URI=
|
|
73
|
+
|
|
74
|
+
# 用户服务 URI
|
|
75
|
+
USER_SERVICE_URI=
|
|
76
|
+
|
|
77
|
+
# 追踪服务 URI
|
|
78
|
+
TRACE_SERVICE_URI=
|
|
79
|
+
|
|
80
|
+
# 服务器监听地址
|
|
81
|
+
HOST=0.0.0.0
|
|
82
|
+
|
|
83
|
+
# 服务器端口
|
|
84
|
+
PORT=8000
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 安装与使用
|
|
88
|
+
|
|
89
|
+
### 安装依赖
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
pip install -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 启动服务
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# 启动 AGUI 服务器
|
|
99
|
+
agent-server-agui
|
|
100
|
+
|
|
101
|
+
# 启动命令行界面
|
|
102
|
+
agent-server-cmd
|
|
103
|
+
|
|
104
|
+
# 启动 ADK 服务器
|
|
105
|
+
agent-server-adk
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 项目结构
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
agent-server/
|
|
112
|
+
├── src/
|
|
113
|
+
│ └── agent_server/
|
|
114
|
+
│ ├── __init__.py
|
|
115
|
+
│ ├── adk_server.py # ADK HTTP 服务器
|
|
116
|
+
│ ├── agui_server.py # AGUI 服务器
|
|
117
|
+
│ ├── cmd_server.py # 命令行服务器
|
|
118
|
+
│ ├── utils.py # 工具类
|
|
119
|
+
│ └── .server.env # 配置文件
|
|
120
|
+
├── tests/
|
|
121
|
+
├── pyproject.toml
|
|
122
|
+
├── Dockerfile
|
|
123
|
+
└── README.md
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## 开发信息
|
|
127
|
+
|
|
128
|
+
- **版本**: 0.0.1
|
|
129
|
+
- **作者**: fubo <fb_linux@163.com>
|
|
130
|
+
- **许可证**: MIT
|
|
131
|
+
- **Python 版本**: >= 3.10
|
|
132
|
+
|
|
133
|
+
## 依赖项
|
|
134
|
+
|
|
135
|
+
- `agent-base>=0.1.2`
|
|
136
|
+
- `fastapi`
|
|
137
|
+
- `uvicorn`
|
|
138
|
+
- `rich`
|
|
139
|
+
- `python-dotenv`
|
|
140
|
+
- `google-adk`
|
|
141
|
+
|
|
142
|
+
## 测试
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
pip install -e ".[test]"
|
|
146
|
+
pytest
|
|
147
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agent-os-server"
|
|
7
|
+
version = "0.0.4"
|
|
8
|
+
description = "智能体服务"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
authors = [
|
|
11
|
+
{name = "fubo", email = "fb_linux@163.com"},
|
|
12
|
+
]
|
|
13
|
+
license = {text = "MIT"}
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
keywords = ["agent-server"]
|
|
20
|
+
requires-python = ">=3.10"
|
|
21
|
+
dependencies = [
|
|
22
|
+
"agent-os-base>=0.1.2"
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
test = ["pytest>=6.0", "pytest-cov"]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server/blob/master/README.md"
|
|
30
|
+
Repository = "https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server.git"
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
agent-server-agui = "agent_server.agui_server:main"
|
|
34
|
+
agent-server-cmd = "agent_server.cmd_server:main"
|
|
35
|
+
agent-server-adk = "agent_server.adk_server:main"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
where = ["src"]
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-os-server
|
|
3
|
+
Version: 0.0.4
|
|
4
|
+
Summary: 智能体服务
|
|
5
|
+
Author-email: fubo <fb_linux@163.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server/blob/master/README.md
|
|
8
|
+
Project-URL: Repository, https://codeup.aliyun.com/64650c96168f0a5963451dec/agi-next/agent-server.git
|
|
9
|
+
Keywords: agent-server
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: agent-os-base>=0.1.2
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: pytest>=6.0; extra == "test"
|
|
19
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# Agent Server
|
|
23
|
+
|
|
24
|
+
一个基于 Google ADK (Agent Development Kit) 和 FastAPI 构建的智能体服务服务器,用于运行和管理 AI 代理。
|
|
25
|
+
|
|
26
|
+
## 项目概述
|
|
27
|
+
|
|
28
|
+
`agent-server` 提供了多种接口方式来与 AI 代理进行交互,包括 HTTP API、AGUI 接口和命令行界面。
|
|
29
|
+
|
|
30
|
+
## 核心功能
|
|
31
|
+
|
|
32
|
+
### 1. ADK Server
|
|
33
|
+
|
|
34
|
+
基于 FastAPI 的 HTTP API 服务器,使用 Google ADK 的 Runner 来执行代理。
|
|
35
|
+
|
|
36
|
+
- **功能**: 提供标准的 HTTP API 接口
|
|
37
|
+
- **会话管理**: 支持会话创建和管理
|
|
38
|
+
- **安全**: 包含用户白名单中间件
|
|
39
|
+
- **启动命令**: `agent-server-adk`
|
|
40
|
+
|
|
41
|
+
### 2. AGUI Server
|
|
42
|
+
|
|
43
|
+
提供 AGUI (Agent Graphical User Interface) 接口,用于图形化交互。
|
|
44
|
+
|
|
45
|
+
- **主要端点**:
|
|
46
|
+
- `POST /agui/api/v1/chat/completions` - 聊天完成接口
|
|
47
|
+
- `GET /agui/api/v1/reload` - 热重载代理配置
|
|
48
|
+
- `GET /agui/api/v1/health` - 健康检查
|
|
49
|
+
- **启动命令**: `agent-server-agui`
|
|
50
|
+
|
|
51
|
+
### 3. CMD Server
|
|
52
|
+
|
|
53
|
+
命令行交互界面,使用 `rich` 库实现彩色输出和 Markdown 渲染。
|
|
54
|
+
|
|
55
|
+
- **功能**:
|
|
56
|
+
- 任务提交和执行
|
|
57
|
+
- 会话管理(列出、删除)
|
|
58
|
+
- 实时输出代理响应
|
|
59
|
+
- 支持工具调用和函数响应展示
|
|
60
|
+
- **启动命令**: `agent-server-cmd`
|
|
61
|
+
|
|
62
|
+
## 技术架构
|
|
63
|
+
|
|
64
|
+
### 依赖
|
|
65
|
+
- **Google ADK**: Agent Development Kit,用于代理运行
|
|
66
|
+
- **FastAPI**: Web 框架,提供 HTTP API
|
|
67
|
+
- **Uvicorn**: ASGI 服务器
|
|
68
|
+
- **Rich**: 命令行美化输出
|
|
69
|
+
- **Python Dotenv**: 环境变量管理
|
|
70
|
+
|
|
71
|
+
### 工具类 (utils.py)
|
|
72
|
+
|
|
73
|
+
- **Utils.Service**: 提供 session 和 memory 服务的创建
|
|
74
|
+
- `memory_service()`: 创建记忆服务
|
|
75
|
+
- `session_service()`: 创建会话服务
|
|
76
|
+
- **Utils.Agent**: 负责代理的加载和运行器创建
|
|
77
|
+
- `load_adk_agents()`: 从指定路径加载代理配置
|
|
78
|
+
- `create_adk_agent_agui_runner()`: 创建 AGUI 运行器
|
|
79
|
+
- `create_adk_agent_adk_runner()`: 创建 ADK 运行器
|
|
80
|
+
|
|
81
|
+
## 配置说明
|
|
82
|
+
|
|
83
|
+
配置文件:`.server.env`
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# 代理配置路径
|
|
87
|
+
AGENTS_PATH=/Users/fubo/develop/apps/agent-os/agents
|
|
88
|
+
|
|
89
|
+
# 会话服务数据库 URI(留空使用内存服务)
|
|
90
|
+
SESSION_SERVICE_URI=
|
|
91
|
+
|
|
92
|
+
# 记忆服务 URI(留空使用内存服务)
|
|
93
|
+
MEMORY_SERVICE_URI=
|
|
94
|
+
|
|
95
|
+
# 用户服务 URI
|
|
96
|
+
USER_SERVICE_URI=
|
|
97
|
+
|
|
98
|
+
# 追踪服务 URI
|
|
99
|
+
TRACE_SERVICE_URI=
|
|
100
|
+
|
|
101
|
+
# 服务器监听地址
|
|
102
|
+
HOST=0.0.0.0
|
|
103
|
+
|
|
104
|
+
# 服务器端口
|
|
105
|
+
PORT=8000
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## 安装与使用
|
|
109
|
+
|
|
110
|
+
### 安装依赖
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
pip install -e .
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 启动服务
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
# 启动 AGUI 服务器
|
|
120
|
+
agent-server-agui
|
|
121
|
+
|
|
122
|
+
# 启动命令行界面
|
|
123
|
+
agent-server-cmd
|
|
124
|
+
|
|
125
|
+
# 启动 ADK 服务器
|
|
126
|
+
agent-server-adk
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## 项目结构
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
agent-server/
|
|
133
|
+
├── src/
|
|
134
|
+
│ └── agent_server/
|
|
135
|
+
│ ├── __init__.py
|
|
136
|
+
│ ├── adk_server.py # ADK HTTP 服务器
|
|
137
|
+
│ ├── agui_server.py # AGUI 服务器
|
|
138
|
+
│ ├── cmd_server.py # 命令行服务器
|
|
139
|
+
│ ├── utils.py # 工具类
|
|
140
|
+
│ └── .server.env # 配置文件
|
|
141
|
+
├── tests/
|
|
142
|
+
├── pyproject.toml
|
|
143
|
+
├── Dockerfile
|
|
144
|
+
└── README.md
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 开发信息
|
|
148
|
+
|
|
149
|
+
- **版本**: 0.0.1
|
|
150
|
+
- **作者**: fubo <fb_linux@163.com>
|
|
151
|
+
- **许可证**: MIT
|
|
152
|
+
- **Python 版本**: >= 3.10
|
|
153
|
+
|
|
154
|
+
## 依赖项
|
|
155
|
+
|
|
156
|
+
- `agent-base>=0.1.2`
|
|
157
|
+
- `fastapi`
|
|
158
|
+
- `uvicorn`
|
|
159
|
+
- `rich`
|
|
160
|
+
- `python-dotenv`
|
|
161
|
+
- `google-adk`
|
|
162
|
+
|
|
163
|
+
## 测试
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
pip install -e ".[test]"
|
|
167
|
+
pytest
|
|
168
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/agent_os_server.egg-info/PKG-INFO
|
|
5
|
+
src/agent_os_server.egg-info/SOURCES.txt
|
|
6
|
+
src/agent_os_server.egg-info/dependency_links.txt
|
|
7
|
+
src/agent_os_server.egg-info/entry_points.txt
|
|
8
|
+
src/agent_os_server.egg-info/requires.txt
|
|
9
|
+
src/agent_os_server.egg-info/top_level.txt
|
|
10
|
+
src/agent_server/__init__.py
|
|
11
|
+
src/agent_server/adk_server.py
|
|
12
|
+
src/agent_server/agui_server.py
|
|
13
|
+
src/agent_server/cmd_server.py
|
|
14
|
+
src/agent_server/utils.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
agent_server
|
|
File without changes
|