This commit is contained in:
ken 2025-04-04 16:30:50 +08:00
parent f87210943c
commit 2005fbcf44

View File

@ -19,8 +19,8 @@ Agent模块负责处理request工作流生成prompt与LLM交互。
Agent 有三模式运行由plugin在request的model参数决定运行模式在交互过程对agent是透明的。
> 1. agent local model就是agent调用本地部署的LLM模型
> 2. agent remote api就是agent调用openai或deepseek等外部服务的api
> 3. plugin remote api由plugin调用openai或deepseek等外部服务的api
> 2. agent remote api就是agent调用openai或deepseek等外部服务的api (改下llm就看实现)
> 3. plugin remote api由plugin调用openai或deepseek等外部服务的api (未实现要改ideservice)
##### 1.1 安装与运行
@ -34,13 +34,13 @@ go build -o ../build/bin/agent.exe src/main.go
./build/bin/agent.exe run
```
##### 1.3系统框架
##### 1.2系统框架
<img src="assets/架构.png" alt="drawing" style="width:700px;"/>
ideservice 是须要plugin提供给agent的一些获取IDE信息的基础功能为穿透NAT需要websocket连接。
##### 1.4 workflow
##### 1.3 workflow
```mermaid
sequenceDiagram
@ -53,7 +53,7 @@ sequenceDiagram
agent有可能会多次向ideservice询问更多的信息这对于plugin是透明的。
##### 1.5 Task Pool
##### 1.4 Task Pool
章节2中所有带cmd参数带前缀“exec”的request都是涉及LLM模型调用的。
Agent用一个FIFO队列缓存所有用户的未处理任务当队列长度过大时agent会拒绝新来的任务。