{"id":50564860,"url":"https://github.com/xumingke-06/docagent","last_synced_at":"2026-06-04T14:00:15.444Z","repository":{"id":362474867,"uuid":"1240802382","full_name":"XuMingKe-06/DocAgent","owner":"XuMingKe-06","description":"Local-first AI document agent — generate, read, modify, and convert Word/Excel/PPT/PDF/Markdown through natural language conversations. Built with Tauri 2 + Rust + React.","archived":false,"fork":false,"pushed_at":"2026-06-04T11:55:51.000Z","size":1608,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T12:15:37.628Z","etag":null,"topics":["ai-agent","desktop-app","document-processing","excel","llm","markdown","pdf","powerpoint","react","rust","tauri","tool-calling","word"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XuMingKe-06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T15:33:57.000Z","updated_at":"2026-06-04T12:12:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/XuMingKe-06/DocAgent","commit_stats":null,"previous_names":["xumingke-06/docagent"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/XuMingKe-06/DocAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuMingKe-06%2FDocAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuMingKe-06%2FDocAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuMingKe-06%2FDocAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuMingKe-06%2FDocAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XuMingKe-06","download_url":"https://codeload.github.com/XuMingKe-06/DocAgent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XuMingKe-06%2FDocAgent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33907694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","desktop-app","document-processing","excel","llm","markdown","pdf","powerpoint","react","rust","tauri","tool-calling","word"],"created_at":"2026-06-04T14:00:13.936Z","updated_at":"2026-06-04T14:00:15.383Z","avatar_url":"https://github.com/XuMingKe-06.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# DocAgent\n\n**AI 驱动的文档处理 Agent，用对话搞定一切文档工作**\n\n[![Windows](https://img.shields.io/badge/platform-Windows-blue?logo=windows)](https://github.com/user-attachments/docagent)\n[![Tauri 2](https://img.shields.io/badge/Tauri-2.x-orange?logo=tauri)](https://v2.tauri.app/)\n[![React 19](https://img.shields.io/badge/React-19-61dafb?logo=react)](https://react.dev/)\n[![Rust](https://img.shields.io/badge/Rust-1.80+-000000?logo=rust)](https://www.rust-lang.org/)\n[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)\n\n[中文](./README.md) | [English](./README_en.md)\n\n\u003c/div\u003e\n\n---\n\n## DocAgent 是什么？\n\nDocAgent 是一款**本地优先**的 AI 文档处理桌面应用。你只需用自然语言描述需求，AI Agent 就会自动完成文档的生成、读取、修改、格式转换等操作。\n\n不再在 Word、Excel、PPT、PDF 之间来回切换工具 -- 一个对话窗口，覆盖所有文档格式。\n\n---\n\n## 为什么选择 DocAgent？\n\n### 本地优先，数据安全\n\n所有文档处理和文件操作都在你的机器上完成，只有 LLM API 调用需要联网。你的文档内容不会上传到任何第三方服务器。\n\n### 多 LLM Provider 支持\n\n灵活接入 OpenAI、Anthropic Claude、Google Gemini、Ollama 等主流 LLM 服务，自动健康检查与故障切换，你不会被单一供应商锁定。\n\n### 专业文档处理引擎\n\n内置 6 大文档处理技能，覆盖从生成到分析的完整工作流：\n\n| 技能 | 说明 |\n|------|------|\n| **generate_document** | 生成 Word / Excel / PPT / PDF / Markdown，支持公式、条件格式、颜色方案、水印等高级特性 |\n| **read_document** | 读取文档结构与内容，支持格式信息提取 |\n| **modify_document** | 30+ 修改操作：段落、表格、书签、超链接、页眉页脚、目录等 |\n| **convert_format** | docx / pdf / md / txt / csv / html 等格式互转 |\n| **analyze_document** | 文档结构分析与统计信息 |\n| **batch_process** | 批量转换、修改、分析 |\n\n### 安全可控的操作确认\n\n高风险操作（删除、修改、批量处理）需用户确认后才执行，支持三级确认策略：始终确认 / 仅编辑确认 / 从不确认。\n\n### 版本快照与回滚\n\n每次文档修改自动创建版本快照，一键回滚到任意历史版本，再也不怕改错。\n\n### 实时文件监听\n\n工作区文件变更实时同步到界面，配合内置文件树浏览，文档状态一目了然。\n\n---\n\n## 技术亮点\n\n- **Tauri 2.x** -- Rust 后端 + Web 前端，安装包小、启动快、内存占用低\n- **Rust Agent 引擎** -- 异步 Tool Calling 循环，流式输出，增量持久化防崩溃丢失\n- **Python Sidecar** -- 专业文档处理（python-docx / openpyxl / python-pptx / PyMuPDF / reportlab），进程级隔离，崩溃自动重启\n- **多 LLM 路由** -- Provider 健康检查、延迟追踪、自动 Fallback\n- **React 19 + Zustand 5** -- 现代前端架构，虚拟滚动优化长列表性能\n- **PDF Canvas 渲染** -- 基于 pdfjs-dist 的高性能 PDF 预览，支持缩放与翻页\n- **统一错误码体系** -- 按模块分段（LLM / Agent / Doc / DB / Config / FS / Runtime），精确定位问题\n\n---\n\n## 界面预览\n\n### 主界面\n\n![DocAgent 主界面](./assets/screenshots/main-interface.png)\n\n### 文档生成效果\n\n![生成的Word文档](./assets/screenshots/document-preview.png)\n\n---\n\n## 使用示例\n\n**生成一份项目周报：**\n\n\u003e 帮我生成一份项目周报 Word 文档，包含本周完成事项、下周计划和风险提示三个部分\n\n**读取并分析 Excel：**\n\n\u003e 读取 data/sales.xlsx，分析各区域的销售数据，生成一份统计摘要\n\n**批量格式转换：**\n\n\u003e 把 workspace/docs 目录下所有 Markdown 文件转换为 PDF\n\n**修改现有文档：**\n\n\u003e 在 report.docx 的第三段后面插入一个三行四列的表格，表头是\"姓名、部门、职位、入职日期\"\n\n---\n\n## 配置与自定义\n\n### LLM Provider 配置\n\n支持 OpenAI、Anthropic、Gemini、Ollama 及任何兼容 OpenAI API 的服务。在设置页添加你的 API Key 和模型即可开始使用。\n\n### 技能管理\n\n6 个内置文档处理技能可按需启用/禁用，在设置页的技能标签页管理。\n\n### Prompt 模板\n\n内置模板管理系统，保存常用 Prompt，一键复用。\n\n### 快捷键\n\n可自定义快捷键：新建会话、关闭会话、发送消息、切换侧栏、快速 Prompt 等。\n\n---\n\n## 贡献\n\n欢迎贡献代码、报告问题或提出建议！\n\n1. Fork 本仓库\n2. 创建功能分支 (`git checkout -b feature/amazing-feature`)\n3. 提交更改 (`git commit -m 'feat: 添加某个很棒的功能'`)\n4. 推送分支 (`git push origin feature/amazing-feature`)\n5. 创建 Pull Request\n\n---\n\n## 技术栈一览\n\n| 类别 | 技术 |\n|------|------|\n| 桌面框架 | Tauri 2.x |\n| 前端 | React 19 + TypeScript 5 + Vite 6 |\n| UI | Shadcn/ui + Radix + Tailwind CSS 4 |\n| 状态管理 | Zustand 5 |\n| 后端 | Rust (Tokio 异步运行时) |\n| 数据库 | SQLite (rusqlite, bundled) |\n| 文档处理 | Python Sidecar (python-docx / openpyxl / python-pptx / PyMuPDF / reportlab) |\n| PDF 预览 | pdfjs-dist |\n| 图表 | Recharts |\n| 自动更新 | tauri-plugin-updater |\n\n---\n\n## 许可证\n\n本项目基于 [MIT 许可证](./LICENSE) 开源。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxumingke-06%2Fdocagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxumingke-06%2Fdocagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxumingke-06%2Fdocagent/lists"}