# Agent Weaver **Repository Path**: LambdaH/agent-weaver ## Basic Information - **Project Name**: Agent Weaver - **Description**: 智能体工作流核心框架 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-30 - **Last Updated**: 2026-04-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Agent Weaver 一个面向本地/云主机部署的可视化工作流引擎,完成"信息采集 → 筛选判断 → 总结生成 → 投递沉淀"的完整闭环。 --- ## 中文 ### 项目简介 Agent Weaver 的核心定位是让用户通过画布式 DAG 编辑器,编排包含 RSS、HTTP、LLM、MCP、Email 在内的多种节点,实现定时运行的自动化信息处理工作流。工作流运行的结果可沉淀到轻量知识库,并通过 **Ask Me** 入口进行基于 RAG 的向量检索、多轮对话与数据可视化回顾。 **技术亮点**: - **MCP 域化架构**:SSE 客户端兼容 MCP 2024-11-05 协议,LLM 自然语言输出可透明转化为结构化工具调用 - **Ask Me 智能问答**:Embedding 相似度排序 + 可插拔 Skill 路由(股票/天气),一句话触发图表生成与引用溯源 - **工作流执行引擎**:13 种节点类型,支持模板变量 `{{variable}}` 传递、条件分支、定时调度与安全上下文注入 - **工程安全**:JWT 无状态鉴权、AES-GCM 凭证加密、用户数据隔离 ### 功能一览 - 登录鉴权与受保护路由(JWT + Spring Security) - 工作流 CRUD、复制与画布式 DAG 编辑(Vue Flow) - 13 种节点:Start、HTTP、RSS Feed、Time Filter、Filter List、Condition、Template、Knowledge Write、LLM、LLM Judge、Email、MCP Stock、End - 节点复制、连线、保存、执行与运行状态高亮 - 定时任务 CRUD(Cron 表达式 + 时区支持) - 运行历史与节点级输出预览 - 凭证管理(AES-GCM 加密存储) - 真实 RSS 抓取、DeepSeek API 调用、SMTP 邮件发送 - MCP Stock 节点:新闻冲击模拟、买入/卖出交易、持仓快照 - 工作流知识库沉淀与 Ask Me 对话入口 - 中英双语界面 ### 技术栈 | 层级 | 技术 | |------|------| | 前端 | Vue 3 + Vite + Vue Router + Vue Flow | | 后端 | Spring Boot 3 + Java 17 + MyBatis-Plus | | 数据库 | MySQL 8 | | 向量检索 | Embedding API(BAAI/bge-large-zh-v1.5)+ 余弦相似度 | | LLM | DeepSeek API | | MCP | SSE 客户端 + Python Flask MCP Server | | 部署 | Docker Compose + Nginx | ### 目录结构 ```text Agent_Weaver/ Backend/ Spring Boot 后端 Frontend/ Vue 3 前端 Database/ 数据库初始化、种子数据、快照支持 mcp-server/ MCP Stock 服务(Flask + SSE) deploy/ 生产环境部署配置 docker-compose.local.yml docker-compose.prod.yml ``` ### 快速开始 #### 本地 Docker 启动 ```bash docker-compose -f docker-compose.local.yml up -d --build ``` 本地服务地址: - 前端:`http://localhost:5173` - 后端:`http://localhost:8081` - phpMyAdmin:`http://localhost:8080` - MySQL:`localhost:3306` - MCP Stock:`http://localhost:3001` #### 云主机 / 生产环境 ```bash cp .env.prod.example .env.prod docker-compose -f docker-compose.prod.yml up -d --build ``` 生产环境通过 Nginx Gateway 统一代理 `/api/` 到后端、`/` 到前端。更详细的 Linux 云主机部署步骤请参考 [云主机部署说明.md](./云主机部署说明.md)。 ### 数据库初始化 MySQL 启动时按以下优先级初始化: 1. 若 `Database/local-snapshot/` 存在 SQL 快照,优先恢复快照; 2. 否则依次执行 `Database/init/00-create-database.sql` → `01-schema.sql` → `seed/*.sql`。 ### 注意事项 - `.env`、`.env.prod` 和本地数据库快照默认被 Git 忽略。 - 生产环境请替换所有默认密码、JWT secret 和加密密钥。 - 首次验证部署链路时,可先用模板值启动,再逐步替换为生产级凭据。 ### 许可 本项目采用 [MIT License](./LICENSE)。 --- ## English ### Overview Agent Weaver is a visual workflow engine for local or cloud-VM deployment. It enables users to orchestrate DAG-based workflows with RSS, HTTP, LLM, MCP, and Email nodes, automating the full loop of information collection, filtering, summarization, and delivery. Workflow outputs are persisted to a lightweight knowledge base and can be reviewed through the **Ask Me** entry point, supporting RAG vector retrieval, multi-turn conversations, and data-visualization-driven Q&A. **Highlights**: - **MCP Domain Architecture**: A custom SSE client compatible with MCP 2024-11-05 protocol transparently transforms LLM natural-language output into structured tool calls. - **Ask Me Intelligent Q&A**: Embedding similarity ranking plus pluggable Skill routing (stock / weather) triggers chart generation and citation-backed answers from a single sentence. - **Workflow Execution Engine**: 13 node types with `{{variable}}` template passing, conditional branching, scheduled execution, and secure-context injection. - **Engineering Security**: JWT stateless authentication, AES-GCM credential encryption, and user data isolation. ### Features - Authentication with protected routes (JWT + Spring Security) - Workflow CRUD, duplication, and canvas-based DAG editing (Vue Flow) - 13 node types: Start, HTTP, RSS Feed, Time Filter, Filter List, Condition, Template, Knowledge Write, LLM, LLM Judge, Email, MCP Stock, End - Node copy, connect, save, execute, and run-status highlighting - Scheduled task CRUD (Cron expressions with timezone support) - Execution history and per-node output preview - Credential management (AES-GCM encrypted storage) - Real RSS fetching, DeepSeek API calls, SMTP email delivery - MCP Stock node: news-shock simulation, buy/sell trades, portfolio snapshot - Knowledge-base persistence and Ask Me conversational entry point - Bilingual UI (Chinese / English) ### Tech Stack | Layer | Technology | |------|------------| | Frontend | Vue 3 + Vite + Vue Router + Vue Flow | | Backend | Spring Boot 3 + Java 17 + MyBatis-Plus | | Database | MySQL 8 | | Vector Retrieval | Embedding API (BAAI/bge-large-zh-v1.5) + cosine similarity | | LLM | DeepSeek API | | MCP | Custom SSE client + Python Flask MCP Server | | Deployment | Docker Compose + Nginx | ### Directory Structure ```text Agent_Weaver/ Backend/ Spring Boot backend Frontend/ Vue 3 frontend Database/ DB initialization, seed data, snapshot support mcp-server/ MCP Stock service (Flask + SSE) deploy/ Production deployment configs docker-compose.local.yml docker-compose.prod.yml ``` ### Quick Start #### Local Docker ```bash docker-compose -f docker-compose.local.yml up -d --build ``` Local service endpoints: - Frontend: `http://localhost:5173` - Backend: `http://localhost:8081` - phpMyAdmin: `http://localhost:8080` - MySQL: `localhost:3306` - MCP Stock: `http://localhost:3001` #### Production ```bash cp .env.prod.example .env.prod docker-compose -f docker-compose.prod.yml up -d --build ``` The production setup uses an Nginx Gateway to proxy `/api/` to the backend and `/` to the frontend. For a detailed Linux deployment walkthrough, see [云主机部署说明.md](./云主机部署说明.md). ### Database Initialization MySQL initializes in the following priority order: 1. If an SQL snapshot exists in `Database/local-snapshot/`, it is restored first. 2. Otherwise, execute `Database/init/00-create-database.sql` → `01-schema.sql` → `seed/*.sql`. ### Notes - `.env`, `.env.prod`, and local snapshots are excluded from Git by default. - Replace all default passwords, JWT secrets, and encryption keys before production use. - You may start with template values for the first deployment verification, then gradually switch to production-grade credentials. ### License This project is licensed under the [MIT License](./LICENSE).