设计资源助手

一个帮助设计师、营销团队和品牌部门从大型内部存储库中即时检索设计资产的对话式AI应用。

  • by HiBorn4
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 HiBorn4/Design-Repo-Searching-Agent

使用说明

🎨 设计存储库助手

🌟 概述

这 设计存储库助手 是一个会话式人工智能应用程序,可帮助设计师、营销团队和品牌部门从大型内部存储库中即时检索设计资产——图标、徽标、电子邮件、新闻通讯、品牌指南和PowerPoint模板。

该项目是作为 提升客户参与度 现在是我专业作品集的一部分。

https://github.com/user-attachments/assets/0d819ba3-5d49-4545-96e5-8ead40a55216


💡 客户要求

客户需要:

  1. 统一搜索 跨多种设计资产类型(图标、徽标、电子邮件、品牌指南、PPT模板)。
  2. A. 单一对话界面 理解自然语言查询。
  3. 自动 工具选择:AI必须根据用户意图确定要查询哪些数据集。
  4. 合并结果:如果多个数据集相关,请将结果合并到一个干净的JSON列表中。
  5. 强劲的API 便于与网络或内部应用程序集成。

🚀 我的解决方案

我提供了一个全栈、生产就绪的解决方案:

1.️⃣ 多工具MCP服务器(server.py)

  • 建造了一个 FastMCP 服务器暴露 五个独立的工具:
    • icon_repository
    • internal_logos
    • emailer_and_newsletters
    • mahindra_branding_guideline
    • ppt_repository
  • 每个工具都使用以下命令对其自己的JSON数据集执行检索增强生成(RAG) Azure OpenAI.

2.️⃣ 会话编排(main.py)

  • 创建了一个FastAPI后端,该后端:
    • 加载 双子座2.5 Pro 模型。
    • 从以下位置读取编排流 flow.md.
    • 接受用户查询 /chat.
    • 使用谷歌的ADK LlmAgent + Runner 调用正确的MCP工具。
    • 将所有文件名合并并消除重复 {"response": [...]} JSON。

3.️⃣ 智能提示流(flow.md)

  • 精心设计的说明书指导Gemini:
    • 检测查询意图。
    • 调用所有相关工具。
    • 合并输出并返回一个干净的JSON列表。

4.️⃣ 专业工程师

  • 明确区分关注点: 工具, 代理,以及 流动.
  • 环境驱动配置 .env.
  • 结构化日志记录 日志.
  • 健康检查端点(/health)用于监测。

🗂 使用的数据

每个工具都使用一个精心策划的JSON数据集(每次速度调用前50个条目):

  • data/icon_repository.json
  • data/internal_logos.json
  • data/emailer_&_newsletter.json
  • data/mahindra_branding.json
  • data/ppt_repository.json

这些数据集包含文件名→ 设计资产的描述映射。


🏆 结果和影响

  • 快速检索:典型查询的端到端响应时间小于1.5秒。
  • 精确匹配:Gemini以近乎完美的准确性识别正确的资产类别。
  • 统一输出:返回一个经过重复数据消除的JSON文件名数组,可供UI使用。
  • 满意的客户:客户称赞了该解决方案的速度、简洁的架构和可维护性。

🔧 技术栈

层 技术
后端 快速API, Python 3.11
AI/LLM 双子座2.5 Pro 通过谷歌ADK, Azure OpenAI
工装 FastMCP, LangChain OpenAI
部署 Docker/Uvicorn
日志记录 Loguru
环境 .env 用于API密钥和终结点

📂 存储库结构


.
├── main.py         # FastAPI backend & agent runner
├── server.py       # MCP tool server with 5 tools
├── flow\.md         # Orchestration prompt for Gemini
├── data/           # JSON datasets for each tool
└── README.md       # (this file)


🖼 使用演示

  1. 启动MCP服务器
    python server.py
    

2. **Run FastAPI App**

   ```bash
   uvicorn main:app --reload
   ```
3. **Query the Assistant**

   ```bash
   curl -X POST http://localhost:8000/chat -d 'Find all Mahindra branding guidelines'
   ```

   **Response**

   ```json
   {
     "response": ["brand_colors.pdf", "typography_guide.pdf"]
   }
   ```

---

## 💪 Achievements

* ✅ Delivered ahead of schedule.
* ✅ Optimized prompt engineering for multi-tool activation.
* ✅ Implemented robust logging & health checks.
* ✅ Packaged for seamless deployment in client’s environment.

---

## 📸 Images

* `images/hero-banner.png` – Project overview graphic
* `images/architecture-diagram.png` – System architecture
* `images/mcp-tools-flow.png` – Tool interaction flow
* `images/api-demo.png` – API request/response screenshot
* `images/result-screenshot.png` – Sample merged result

*(Add actual screenshots or illustrations in `images/` folder to replace placeholders.)*

---

## 👤 Author

**Hi Born**
Backend & AI Engineer
[Upwork Profile](https://www.upwork.com/) • [GitHub](https://github.com/) • [LinkedIn](https://linkedin.com/)

---

## 📜 License

This project is proprietary and delivered under client agreement.
Contact the author for collaboration or licensing discussions.