使用说明
代理企业
描述
agent是一个示例系统,旨在通过基于代理的架构提供智能业务服务。 该项目由使用MCP(模型控制协议)协同工作的多个服务组成,以提供全面的解决方案。
建筑
系统架构基于三个相互通信的主要组件:
- 接收用户请求的中央应用程序代理
- 通过MCP公开的RAG(检索增强生成)服务,用上下文知识回答查询。
- 提供系统状态信息的监控服务,通过MCP公开。
flowchart TD
subgraph application["application-agent (Port: 8080)"]
app["🤖 Application Agent"]
style app fill:#f0f0f0,stroke:#333,stroke-width:2px
mc1["Monitor MCP Client"]
mc2["RAG MCP Client"]
app --- mc1
app --- mc2
style app font-weight:bold
end
subgraph system-status["Monitor Service (Port: 8081)"]
status["🤖 System Status Service"]
style status fill:#eef7e6,stroke:#333,stroke-width:2px
status-server["Monitor MCP Server"]
status --- status-server
style status font-weight:bold
end
subgraph rag-service["RAG Service (Port: 8082)"]
rag["🤖 RAG Agent"]
style rag fill:#e6f7ff,stroke:#333,stroke-width:2px
rag-server["Rag MCP Server"]
kb["Redis Vector Store"]
rag --- rag-server
rag --- kb
style rag font-weight:bold
end
%% Increased spacing between components using invisible nodes
invisible1[" "]
invisible2[" "]
application ~~~ invisible1 ~~~ rag-service
application ~~~ invisible2 ~~~ system-status
%% Connect with longer edges
mc1 --> rag-server
mc2 --> status-server
%% Hide invisible nodes
style invisible1 fill:none,stroke:none
style invisible2 fill:none,stroke:none
classDef server fill:#f0f0f0,stroke:#666,stroke-width:1px
class rag-server,status-server server
classDef client fill:#f0f0f0,stroke:#666,stroke-width:1px
class mc1,mc2 client
classDef data fill:#f9f9f9,stroke:#999,stroke-width:1px
class kb,api data
模块
应用程序代理
主代理通过rest端点接收用户请求,并协调其他服务。
配置:
- 端口: 8080
- 依赖项:连接到
rag和monitor通过MCP客户端提供服务
配置文件: application.yml
抹布
基于存储知识提供响应的检索增强生成(RAG)代理。 Redis向量存储用于高效地索引和检索信息。
配置:
- 端口: 8081
- 类型:MCP服务器
- 存储:Redis矢量存储,用于高效索引和检索
配置文件: application.yml
监视器
角色:提供有关系统状态信息的监控服务。
配置:
- 端口: 8082
- 类型:MCP服务器
- 功能:收集有关系统运行状况和性能的虚拟数据
配置文件: application.yml
运行项目
雷迪斯
cd environment;
docker-compose up -d
正在启动服务
1.启动RAG服务:
cd rag
mvn spring-boot:run
2.启动监视器服务:
cd monitor
mvn spring-boot:run
3.启动应用程序代理:
cd application-agent
mvn spring-boot:run
用法
向端口8080上的应用程序代理发送请求。该系统将协调与RAG的通信,并监控服务以检索 必要的信息并相应地做出回应。
视频
音频很糟糕。只需观看没有声音的视频。 🙂
