[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-principia-ai--WriteHERE":3,"tool-principia-ai--WriteHERE":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160411,2,"2026-04-18T23:33:24",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":74,"owner_company":74,"owner_location":74,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":76,"languages":77,"stars":98,"forks":99,"last_commit_at":100,"license":74,"difficulty_score":32,"env_os":101,"env_gpu":101,"env_ram":101,"env_deps":102,"category_tags":111,"github_topics":113,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":120,"updated_at":121,"faqs":122,"releases":163},9403,"principia-ai\u002FWriteHERE","WriteHERE","An Open-Source AI Writing Project.","WriteHERE 是一款开源的长文本生成框架，旨在通过模拟人类的自适应规划能力，彻底改变 AI 写作方式。传统 AI 写作工具往往受限于僵化的固定流程，难以应对复杂多变的创作需求；而 WriteHERE 则能动态拆解写作任务，实时调整策略，从而更灵活地完成小说创作或技术报告生成等长篇幅内容。\n\n该项目的核心亮点在于其独特的“异构递归规划”机制。它不仅能将宏大的写作目标层层分解为可执行的子任务，还能无缝融合信息检索、逻辑推理与内容撰写三种关键能力。这种动态适应的过程让 AI 不再机械地按部就班，而是像人类作家一样，根据上下文语境随时优化写作路径。实测表明，WriteHERE 在虚构故事和非虚构报告的生成都显著优于当前主流方法。\n\n鉴于其完全开源（MIT 协议）且代码架构透明，WriteHERE 特别适合 AI 研究人员、开发者以及对大模型应用有深度探索需求的技术团队使用。用户需要具备一定的编程基础（Python\u002FNode.js），并配置相应的大模型 API 密钥即可部署。无论是希望复现前沿论文成果的研究者，还是想要构建自定义写作引擎的开发者，都能从中获得强大的技术支持与灵活的扩展空间。","\u003Ch1 align=\"center\">📝 Write\u003Cspan style=\"color:green\">HERE\u003C\u002Fspan>\u003C\u002Fh1>\n\u003Cp align=\"center\">Heterogeneous Recursive Planning based Open Writing Project\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.08275\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2503.08275-b31b1b.svg\" alt=\"arXiv\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg\" alt=\"License: MIT\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwritehere.site\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebsite-writehere.site-blue.svg\" alt=\"Website\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nWriteHERE is an open-source framework that revolutionizes long-form writing through human-like adaptive planning. Unlike traditional AI writing tools that follow rigid workflows, WriteHERE dynamically decomposes writing tasks and integrates three fundamental capabilities:\n\n1. **Recursive Planning**: Breaks down complex writing tasks into manageable subtasks\n2. **Heterogeneous Integration**: Seamlessly combines retrieval, reasoning, and composition\n3. **Dynamic Adaptation**: Adjusts the writing process in real-time based on context\n\nOur evaluations show that this approach consistently outperforms state-of-the-art methods in both fiction writing and technical report generation.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fprincipia-ai_WriteHERE_readme_a1cecefc0fb6.png\" alt=\"WriteHERE Architecture Overview\">\n\u003C\u002Fp>\n\n## 🎉 News\n\n- **[Sep 2025]** Our paper has been accepted as an oral presentation at EMNLP 2025. See you in Suzhou! 🎊\n\n## 🔍 Overview\n\nUnlike traditional approaches that rely on predetermined workflows and rigid thinking patterns, this framework:\n\n1. **Eliminates workflow restrictions** through a planning mechanism that interleaves recursive task decomposition and execution\n2. **Facilitates heterogeneous task decomposition** by integrating different task types\n3. **Adapts dynamically** during the writing process, similar to human writing behavior\n\nOur evaluations on both fiction writing and technical report generation demonstrate that this method consistently outperforms state-of-the-art approaches across all evaluation metrics.\n\n## 🌐 Open Source Philosophy\n\nWriteHERE is developed with these core principles:\n\n- **Fully Open Source**: All code is freely available for use, modification, and distribution under the MIT License\n- **Non-Commercial**: Developed for research and educational purposes without commercial interests\n- **Full Transparency**: The entire system architecture and decision-making processes are transparent to users\n- **Community-Driven**: We welcome contributions, feedback, and collaborative improvements from the community\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Python 3.6+\n- Node.js 14+ (for the frontend)\n- API keys for:\n  - OpenAI (GPT models)\n  - Anthropic (Claude models)\n  - SerpAPI (for search functionality in report generation)\n\n### Quickstart\n\nYou can use WriteHERE in two ways: with or without the visualization interface.\n\n#### Running Without Visualization\n\nThis is the simpler approach when you don't need real-time visualization or want to use the engine for batch processing.\n\n1. **Setup the environment**:\n```bash\npython -m venv venv\nsource venv\u002Fbin\u002Factivate\npip install -v -e .\n\n# Create api_key.env file based on example\ncp recursive\u002Fapi_key.env.example recursive\u002Fapi_key.env\n# Edit the file to add your keys\nnano recursive\u002Fapi_key.env\n```\n\n\n2. **Run the engine directly**:\n```bash\ncd recursive\npython engine.py --filename \u003Cinput_file> --output-filename \u003Coutput_file> --done-flag-file \u003Cdone_file> --model \u003Cmodel_name> --mode \u003Cstory|report>\n```\n\nExample for generating a story:\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fmeta_fiction.jsonl --output-filename .\u002Fproject\u002Fstory\u002Foutput.jsonl --done-flag-file .\u002Fproject\u002Fstory\u002Fdone.txt --model gpt-4o --mode story\n```\n\nExample for generating a report:\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fqa_test.jsonl --output-filename .\u002Fproject\u002Fqa\u002Fresult.jsonl --done-flag-file .\u002Fproject\u002Fqa\u002Fdone.txt --model claude-3-sonnet --mode report\n```\n\n#### Running With Visualization Interface\n\nThis option provides a web interface to visualize and monitor the writing process in real-time.\n\n1. **One-step setup and launch**:\n```bash\n.\u002Fsetup_env.sh  # One-time setup of the environment\n.\u002Fstart.sh      # Start the application\n```\n\nThis will:\n- Create a clean Python virtual environment\n- Install all required dependencies\n- Start the backend server on port 5001\n- Start the frontend on port 3000\n- Open your browser at http:\u002F\u002Flocalhost:3000\n\nYou can customize the ports using command-line arguments:\n```bash\n.\u002Fstart.sh --backend-port 8080 --frontend-port 8000\n```\n\n#### For Anaconda\u002FMiniconda Users\n\nIf you're using Anaconda and encounter dependency conflicts, use:\n```bash\n.\u002Frun_with_anaconda.sh\n```\n\nThis script creates a dedicated Anaconda environment called 'writehere' with the correct dependencies and runs both servers.\n\nYou can customize ports with this script:\n```bash\n.\u002Frun_with_anaconda.sh --backend-port 8080 --frontend-port 8000\n```\n\n### Manual Installation\n\nIf you prefer to set up the components manually:\n\n#### Backend Setup\n\n1. Create a Python virtual environment:\n```bash\npython -m venv venv\nsource venv\u002Fbin\u002Factivate\n```\n\n2. Install main dependencies:\n```bash\npip install -v -e .\n```\n\n3. Install backend server dependencies:\n```bash\npip install -r backend\u002Frequirements.txt\n```\n\n4. Start the backend server:\n```bash\ncd backend\npython server.py\n```\n\nTo use a custom port:\n```bash\npython server.py --port 8080\n```\n\n#### Frontend Setup\n\n1. Install frontend dependencies:\n```bash\ncd frontend\nnpm install\n```\n\n2. Start the frontend development server:\n```bash\nnpm start\n```\n\nTo use a custom port:\n```bash\nPORT=8000 npm start\n```\n\n### Troubleshooting\n\nIf you encounter any issues, please check the [Troubleshooting Guide](TROUBLESHOOTING.md) for common problems and solutions.\n\n## ✨ Features\n\n- **Recursive Task Decomposition**: Breaks down complex writing tasks into manageable subtasks\n- **Dynamic Integration**: Seamlessly combines retrieval, reasoning, and composition tasks\n- **Adaptive Workflow**: Flexibly adjusts the writing process based on context and requirements\n- **Versatile Applications**: Supports both creative fiction and technical report generation\n- **User-Friendly Interface**: Intuitive web interface for easy interaction\n- **Real-Time Visualization**: See the agent's \"thinking process\" as it works\n- **Transparent Operation**: All agent decisions and processes are visible to users\n- **Fully Customizable**: Modify prompts, parameters, and workflows to suit your needs\n\n## 📂 Project Structure\n\n```\n.\n├── backend\u002F               # Backend Flask server\n├── frontend\u002F              # React frontend\n├── recursive\u002F             # Core engine implementation\n│   ├── agent\u002F             # Agent implementation and prompts\n│   ├── executor\u002F          # Task execution modules\n│   ├── llm\u002F               # Language model integrations\n│   ├── utils\u002F             # Utility functions and helpers\n│   ├── cache.py           # Caching for improved efficiency\n│   ├── engine.py          # Core planning and execution engine\n│   ├── graph.py           # Task graph representation\n│   ├── memory.py          # Memory management\n│   ├── test_run_report.sh # Script for generating reports\n│   └── test_run_story.sh  # Script for generating stories\n├── test_data\u002F             # Example data for testing\n└── start.sh               # All-in-one startup script\n```\n\n## 📊 Real-time Task Visualization\n\nWhen using the visualization interface, you can see the task execution process in real-time. As the agent works on generating content, you can observe:\n\n1. The hierarchical decomposition of tasks\n2. Which tasks are currently being worked on\n3. The status of each task (ready, in progress, completed)\n4. The type of each task (retrieval, reasoning, composition)\n\nThis visualization provides insight into the agent's \"thinking process\" and helps you understand how complex writing tasks are broken down and solved step by step.\n\n## 👥 Contributing\n\nWe welcome contributions from the community to help improve WriteHERE! Here's how you can contribute:\n\n### Code Contributions\n\n1. **Fork the repository** and create your feature branch from `main`\n2. **Set up your development environment** following the installation instructions above\n3. **Make your changes**, ensuring they follow the project's coding style and conventions\n4. **Add tests** for any new functionality\n5. **Ensure all tests pass** by running the test suite\n6. **Submit a pull request** with a clear description of your changes and their benefits\n\n### Bug Reports and Feature Requests\n\n- Use the **Issues** tab to report bugs or suggest new features\n- For bugs, include detailed steps to reproduce, expected behavior, and actual behavior\n- For feature requests, describe the functionality you'd like to see and how it would benefit the project\n\n### Documentation Improvements\n\n- Help improve our documentation by fixing errors, adding examples, or clarifying instructions\n- Documentation changes can be submitted through pull requests just like code changes\n\n### Community Support\n\n- Answer questions from other users in the Issues section\n- Share your experiences and use cases with the community\n\n### Development Guidelines\n\n- Follow the existing code style and architecture\n- Document new functions, classes, and modules\n- Write clear commit messages that explain the purpose of your changes\n- Keep pull requests focused on a single feature or bug fix\n\nBy contributing to WriteHERE, you agree that your contributions will be licensed under the project's MIT License.\n\n## 📚 Citation\n\nIf you use this code in your research, please cite our paper:\n\n```bibtex\n@misc{xiong2025heterogeneousrecursiveplanning,\n      title={Beyond Outlining: Heterogeneous Recursive Planning for Adaptive Long-form Writing with Language Models}, \n      author={Ruibin Xiong and Yimeng Chen and Dmitrii Khizbullin and Mingchen Zhuge and Jürgen Schmidhuber},\n      year={2025},\n      eprint={2503.08275},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.08275}\n}\n```\n\n## ⚖️ License\n\n[MIT License](LICENSE)\n\nThis project is open-source. You are free to use, modify, and distribute the code for research, educational, and personal purposes.\n","\u003Ch1 align=\"center\">📝 Write\u003Cspan style=\"color:green\">HERE\u003C\u002Fspan>\u003C\u002Fh1>\n\u003Cp align=\"center\">基于异构递归规划的开源写作项目\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.08275\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2503.08275-b31b1b.svg\" alt=\"arXiv\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg\" alt=\"License: MIT\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwritehere.site\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWebsite-writehere.site-blue.svg\" alt=\"Website\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nWriteHERE 是一个开源框架，通过类人自适应规划彻底革新长篇写作。与遵循僵化工作流的传统 AI 写作工具不同，WriteHERE 能够动态分解写作任务，并整合三大核心能力：\n\n1. **递归规划**：将复杂写作任务拆解为可管理的子任务\n2. **异构集成**：无缝结合检索、推理和创作\n3. **动态适应**：根据上下文实时调整写作过程\n\n我们的评估表明，该方法在小说写作和技术报告生成方面均持续优于当前最先进的方法。\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fprincipia-ai_WriteHERE_readme_a1cecefc0fb6.png\" alt=\"WriteHERE 架构概览\">\n\u003C\u002Fp>\n\n## 🎉 最新消息\n\n- **[2025年9月]** 我们的论文已被 EMNLP 2025 接受为口头报告。苏州见！🎊\n\n## 🔍 概述\n\n不同于依赖预设工作流程和僵化思维模式的传统方法，该框架：\n\n1. 通过交织递归任务分解与执行的规划机制，**消除了工作流限制**\n2. 通过整合不同类型的任务，**促进异构任务分解**\n3. 在写作过程中**动态适应**，类似于人类的写作行为\n\n我们在小说写作和技术报告生成上的评估表明，该方法在所有评估指标上均持续优于当前最先进的方法。\n\n## 🌐 开源理念\n\nWriteHERE 的开发秉持以下核心原则：\n\n- **完全开源**：所有代码均在 MIT 许可证下免费提供使用、修改和分发\n- **非商业性**：专为研究和教育目的开发，不涉及商业利益\n- **完全透明**：整个系统架构和决策过程对用户完全公开\n- **社区驱动**：我们欢迎来自社区的贡献、反馈和协作改进\n\n## 🚀 快速入门\n\n### 前置条件\n\n- Python 3.6+\n- Node.js 14+（用于前端）\n- API 密钥，包括：\n  - OpenAI（GPT 模型）\n  - Anthropic（Claude 模型）\n  - SerpAPI（用于报告生成中的搜索功能）\n\n### 快速启动\n\n您可以通过两种方式使用 WriteHERE：带可视化界面或不带可视化界面。\n\n#### 不带可视化界面运行\n\n当您不需要实时可视化或希望将引擎用于批量处理时，这是更简单的方式。\n\n1. **设置环境**：\n```bash\npython -m venv venv\nsource venv\u002Fbin\u002Factivate\npip install -v -e .\n\n# 根据示例创建 api_key.env 文件\ncp recursive\u002Fapi_key.env.example recursive\u002Fapi_key.env\n# 编辑文件以添加您的密钥\nnano recursive\u002Fapi_key.env\n```\n\n\n2. **直接运行引擎**：\n```bash\ncd recursive\npython engine.py --filename \u003Cinput_file> --output-filename \u003Coutput_file> --done-flag-file \u003Cdone_file> --model \u003Cmodel_name> --mode \u003Cstory|report>\n```\n\n生成故事的示例：\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fmeta_fiction.jsonl --output-filename .\u002Fproject\u002Fstory\u002Foutput.jsonl --done-flag-file .\u002Fproject\u002Fstory\u002Fdone.txt --model gpt-4o --mode story\n```\n\n生成报告的示例：\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fqa_test.jsonl --output-filename .\u002Fproject\u002Fqa\u002Fresult.jsonl --done-flag-file .\u002Fproject\u002Fqa\u002Fdone.txt --model claude-3-sonnet --mode report\n```\n\n#### 带可视化界面运行\n\n此选项提供了一个 Web 界面，可实时可视化并监控写作过程。\n\n1. **一步式设置与启动**：\n```bash\n.\u002Fsetup_env.sh  # 一次性设置环境\n.\u002Fstart.sh      # 启动应用\n```\n\n这将：\n- 创建一个干净的 Python 虚拟环境\n- 安装所有必需的依赖项\n- 在端口 5001 上启动后端服务器\n- 在端口 3000 上启动前端\n- 自动打开浏览器访问 http:\u002F\u002Flocalhost:3000\n\n您也可以使用命令行参数自定义端口：\n```bash\n.\u002Fstart.sh --backend-port 8080 --frontend-port 8000\n```\n\n#### 对于 Anaconda\u002FMiniconda 用户\n\n如果您使用 Anaconda 并遇到依赖冲突，请使用：\n```bash\n.\u002Frun_with_anaconda.sh\n```\n\n该脚本会创建一个名为 'writehere' 的专用 Anaconda 环境，安装正确的依赖项并同时启动两个服务器。\n\n您还可以通过此脚本自定义端口：\n```bash\n.\u002Frun_with_anaconda.sh --backend-port 8080 --frontend-port 8000\n```\n\n### 手动安装\n\n如果您更倾向于手动设置各个组件：\n\n#### 后端设置\n\n1. 创建 Python 虚拟环境：\n```bash\npython -m venv venv\nsource venv\u002Fbin\u002Factivate\n```\n\n2. 安装主要依赖项：\n```bash\npip install -v -e .\n```\n\n3. 安装后端服务器依赖项：\n```bash\npip install -r backend\u002Frequirements.txt\n```\n\n4. 启动后端服务器：\n```bash\ncd backend\npython server.py\n```\n\n若需使用自定义端口：\n```bash\npython server.py --port 8080\n```\n\n#### 首页设置\n\n1. 安装前端依赖项：\n```bash\ncd frontend\nnpm install\n```\n\n2. 启动前端开发服务器：\n```bash\nnpm start\n```\n\n若需使用自定义端口：\n```bash\nPORT=8000 npm start\n```\n\n### 故障排除\n\n如遇任何问题，请查阅 [故障排除指南](TROUBLESHOOTING.md)，获取常见问题及解决方案。\n\n## ✨ 特性\n\n- **递归任务分解**：将复杂写作任务拆解为可管理的子任务\n- **动态集成**：无缝结合检索、推理和创作任务\n- **自适应工作流**：根据上下文和需求灵活调整写作过程\n- **多用途应用**：支持创意小说和技术报告生成\n- **用户友好界面**：直观的 Web 界面，便于交互\n- **实时可视化**：可查看智能体的工作“思考过程”\n- **透明运行**：所有智能体的决策和过程对用户可见\n- **完全可定制**：可根据需求修改提示词、参数和工作流\n\n## 📂 项目结构\n\n```\n.\n├── backend\u002F               # 后端 Flask 服务器\n├── frontend\u002F              # React 前端\n├── recursive\u002F             # 核心引擎实现\n│   ├── agent\u002F             # 智能体实现及提示词\n│   ├── executor\u002F          # 任务执行模块\n│   ├── llm\u002F               # 语言模型集成\n│   ├── utils\u002F             # 工具函数和辅助程序\n│   ├── cache.py           # 缓存机制，提升效率\n│   ├── engine.py          # 核心规划与执行引擎\n│   ├── graph.py           # 任务图表示\n│   ├── memory.py          # 内存管理\n│   ├── test_run_report.sh # 生成报告的脚本\n│   └── test_run_story.sh  # 生成故事的脚本\n├── test_data\u002F             # 测试用示例数据\n└── start.sh               # 一体化启动脚本\n```\n\n## 📊 实时任务可视化\n\n使用可视化界面时，您可以实时查看任务执行过程。当智能体在生成内容时，您可以看到：\n\n1. 任务的层次化分解\n2. 当前正在处理的任务\n3. 每个任务的状态（待处理、进行中、已完成）\n4. 每个任务的类型（检索、推理、组合）\n\n这种可视化能够让您深入了解智能体的“思考过程”，帮助您理解复杂的写作任务是如何被逐步拆解并解决的。\n\n## 👥 贡献说明\n\n我们欢迎社区成员为 WriteHERE 的改进贡献力量！以下是几种参与方式：\n\n### 代码贡献\n\n1. **fork 仓库**，并在 `main` 分支上创建您的功能分支\n2. **按照安装说明搭建开发环境**\n3. **进行代码修改**，确保遵循项目的编码风格和规范\n4. **为新增功能添加测试**\n5. **运行测试套件，确保所有测试通过**\n6. **提交 pull request**，并清晰描述您的改动及其优势\n\n### Bug 报告与功能请求\n\n- 使用 **Issues** 标签页报告 bug 或提出新功能建议\n- 对于 bug，请提供详细的复现步骤、预期行为和实际行为\n- 对于功能请求，请描述您希望实现的功能以及它将如何使项目受益\n\n### 文档改进\n\n- 通过修复错误、添加示例或澄清说明来完善文档\n- 文档更改可以像代码更改一样通过 pull request 提交\n\n### 社区支持\n\n- 在 Issues 区域回答其他用户的问题\n- 与社区分享您的使用经验和案例\n\n### 开发指南\n\n- 遵循现有代码风格和架构\n- 为新函数、类和模块编写文档\n- 编写清晰的提交信息，解释更改的目的\n- 保持 pull request 的单一性，每次只针对一个功能或 bug 修复\n\n通过为 WriteHERE 做出贡献，您同意您的贡献将采用项目的 MIT 许可证进行授权。\n\n## 📚 引用\n\n如果您在研究中使用了本代码，请引用我们的论文：\n\n```bibtex\n@misc{xiong2025heterogeneousrecursiveplanning,\n      title={超越提纲：基于语言模型的自适应长文写作中的异构递归规划}, \n      author={Ruibin Xiong 和 Yimeng Chen 和 Dmitrii Khizbullin 和 Mingchen Zhuge 和 Jürgen Schmidhuber},\n      year={2025},\n      eprint={2503.08275},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2503.08275}\n}\n```\n\n## ⚖️ 许可证\n\n[MIT 许可证](LICENSE)\n\n本项目为开源项目。您可以自由地将代码用于研究、教育和个人目的，并对其进行修改和分发。","# WriteHERE 快速上手指南\n\nWriteHERE 是一个基于异构递归规划（Heterogeneous Recursive Planning）的开源写作框架。它模拟人类的自适应规划能力，动态分解写作任务，无缝整合检索、推理和创作，适用于小说创作和技术报告生成。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**: Linux \u002F macOS \u002F Windows (WSL 推荐)\n*   **Python**: 3.6 或更高版本\n*   **Node.js**: 14 或更高版本（如需使用可视化界面）\n*   **API Keys**: 您需要准备以下服务的密钥：\n    *   **OpenAI** (用于 GPT 模型)\n    *   **Anthropic** (用于 Claude 模型)\n    *   **SerpAPI** (用于报告生成中的搜索功能)\n\n## 安装步骤\n\n### 1. 克隆项目与配置环境变量\n\n首先克隆仓库并设置 API 密钥配置文件：\n\n```bash\ngit clone \u003Crepository_url>\ncd WriteHERE\n\n# 创建 Python 虚拟环境\npython -m venv venv\nsource venv\u002Fbin\u002Factivate  # Windows 用户请使用: venv\\Scripts\\activate\n\n# 安装核心依赖\npip install -v -e .\n\n# 配置 API 密钥\ncp recursive\u002Fapi_key.env.example recursive\u002Fapi_key.env\n# 使用编辑器打开文件并填入您的 API Keys\nnano recursive\u002Fapi_key.env\n```\n\n### 2. 选择运行模式\n\n您可以根据需求选择**无界面模式**（适合批量处理\u002F命令行）或**可视化界面模式**（适合实时监控写作过程）。\n\n#### 选项 A：运行可视化界面（推荐新手）\n\n此模式提供 Web 界面，可实时观察任务的层级分解和执行状态。\n\n**一键启动（标准环境）：**\n```bash\n.\u002Fsetup_env.sh  # 一次性设置环境\n.\u002Fstart.sh      # 启动应用\n```\n启动后，浏览器将自动打开 `http:\u002F\u002Flocalhost:3000`。后端运行在 5001 端口，前端运行在 3000 端口。\n\n**自定义端口：**\n```bash\n.\u002Fstart.sh --backend-port 8080 --frontend-port 8000\n```\n\n**Anaconda\u002FMiniconda 用户：**\n如果遇到依赖冲突，请使用专用脚本：\n```bash\n.\u002Frun_with_anaconda.sh\n# 自定义端口\n.\u002Frun_with_anaconda.sh --backend-port 8080 --frontend-port 8000\n```\n\n#### 选项 B：无界面模式（命令行引擎）\n\n适合不需要实时可视化或进行批量处理的场景。\n\n直接在 `recursive` 目录下运行引擎：\n\n```bash\ncd recursive\npython engine.py --filename \u003Cinput_file> --output-filename \u003Coutput_file> --done-flag-file \u003Cdone_file> --model \u003Cmodel_name> --mode \u003Cstory|report>\n```\n\n## 基本使用示例\n\n以下是两个典型的使用场景命令：\n\n### 场景 1：生成小说故事 (Story Mode)\n使用 GPT-4o 模型处理虚构类写作任务：\n\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fmeta_fiction.jsonl --output-filename .\u002Fproject\u002Fstory\u002Foutput.jsonl --done-flag-file .\u002Fproject\u002Fstory\u002Fdone.txt --model gpt-4o --mode story\n```\n\n### 场景 2：生成技术报告 (Report Mode)\n使用 Claude 3 Sonnet 模型处理需要检索和推理的报告任务：\n\n```bash\npython engine.py --filename ..\u002Ftest_data\u002Fqa_test.jsonl --output-filename .\u002Fproject\u002Fqa\u002Fresult.jsonl --done-flag-file .\u002Fproject\u002Fqa\u002Fdone.txt --model claude-3-sonnet --mode report\n```\n\n运行完成后，结果将保存至指定的 `output-filename` 文件中。","某科技公司的技术文档工程师需要在一周内完成一份包含竞品分析、架构对比及实施指南的复杂《年度 AI 基础设施技术白皮书》。\n\n### 没有 WriteHERE 时\n- **流程僵化**：传统工具按固定模板线性生成，一旦中途发现数据缺失或逻辑断层，必须人工打断并重新调整全文结构，效率极低。\n- **内容割裂**：检索到的竞品信息与自身的推理分析往往脱节，导致报告前后观点不一致，需要大量人工校对来弥合逻辑鸿沟。\n- **缺乏应变**：在撰写过程中若需临时增加新的技术章节，原有工作流无法动态适应，往往导致整篇文档风格不统一或结构崩塌。\n- **深度不足**：生成的长文容易陷入车轱辘话，难以像人类专家那样将复杂的子任务拆解为层层递进的深度论述。\n\n### 使用 WriteHERE 后\n- **递归规划**：WriteHERE 自动将白皮书拆解为“市场现状”、“技术选型”、“落地案例”等可管理的子任务，并按逻辑依赖关系有序执行，无需人工干预流程。\n- **异构融合**：在写作中实时调用搜索接口获取最新竞品数据，并将其与模型推理能力无缝结合，确保每一个论点都有据可依且逻辑自洽。\n- **动态适应**：当发现某个技术章节需要扩展时，WriteHERE 能即时调整后续写作计划，动态重组内容结构，保持全文风格与逻辑的高度连贯。\n- **类人创作**：模拟人类专家的写作思维，通过不断的“规划 - 执行 - 反思”循环，产出结构严谨、内容深度的专业长文，大幅减少后期修改成本。\n\nWriteHERE 通过类人的自适应规划机制，将繁琐的长文写作转化为灵活的动态决策过程，显著提升了专业技术文档的生产质量与效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fprincipia-ai_WriteHERE_a1cecefc.png","principia-ai",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fprincipia-ai_8026495e.png","https:\u002F\u002Fgithub.com\u002Fprincipia-ai",[78,82,86,90,94],{"name":79,"color":80,"percentage":81},"Python","#3572A5",68,{"name":83,"color":84,"percentage":85},"JavaScript","#f1e05a",29.9,{"name":87,"color":88,"percentage":89},"Shell","#89e051",1.8,{"name":91,"color":92,"percentage":93},"CSS","#663399",0.2,{"name":95,"color":96,"percentage":97},"HTML","#e34c26",0.1,873,135,"2026-04-18T08:17:37","未说明",{"notes":103,"python":104,"dependencies":105},"该工具主要依赖外部大模型 API（如 GPT、Claude）而非本地部署模型，因此无明确 GPU 需求。前端需要 Node.js 14+。提供了一键启动脚本 (start.sh) 和针对 Anaconda 用户的专用脚本。需配置 api_key.env 文件以填入各服务 API 密钥。","3.6+",[106,107,108,109,110],"Flask (后端服务器)","React\u002FNode.js (前端)","OpenAI API","Anthropic API","SerpAPI",[112,13],"其他",[114,115,116,117,118,119],"agentic-workflow","ai-agents","ai-writing","creative-writing-ai","deep-research","planning","2026-03-27T02:49:30.150509","2026-04-19T09:38:42.921088",[123,128,133,138,143,148,153,158],{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},42208,"为什么在使用“报告生成”功能时会报错，而“故事生成”正常？","报告生成功能需要配置 SerpAPI 密钥以启用搜索功能。系统在执行报告生成时需要联网搜索数据，如果未配置有效的 SerpAPI Key，就会报错。请检查您的 API 密钥是否有效，并查看 `engine.log` 文件获取详细的错误信息。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F23",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},42209,"遇到 JSON 解析错误（Expecting value: line 1 column 1）或认证错误（invalid x-api-key）怎么办？","首先请确保您使用的是最新版本的代码（main 分支），该问题可能已在最新版本中修复。其次，请检查您的 API 密钥是否正确配置。您可以尝试在本地运行脚本测试密钥有效性，或者检查后端生成的 `backend\u002Fresults\u002Fapi_key.env` 文件中的密钥配置是否正确。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F2",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},42210,"生成任务卡在特定进度（如 27.33%）并提示超时（timeout exceeded）是什么原因？","这通常是因为未指定搜索引擎导致的。对于报告生成任务，必须配置 SerpAPI。请检查您的配置中是否包含了有效的 SerpAPI 密钥，并确保网络通畅。如果问题依旧，请提供详细的错误日志和提示词以便进一步排查。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F39",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},42211,"项目目前还在维护吗？响应速度如何？","项目仍在维护中，但由于人力有限，维护进度较慢。开发团队通常会集中在周末处理提交的 PR 和 Issue。欢迎加入社区交流或贡献代码。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F37",{"id":144,"question_zh":145,"answer_zh":146,"source_url":147},42212,"为什么生成内容的 Token 消耗量和费用远高于预期？","LLM 代理系统的 Token 消耗量不仅取决于输出长度，还取决于任务的复杂度。模型在推理过程中会产生大量的中间 Token（例如思考逻辑、规划步骤等），即使最终输出较短，总消耗也可能很高。目前版本主要侧重于展示框架能力，未来针对商业应用会探索复用中间 Token 或缓存常用推理模式等优化策略以降低成本。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F38",{"id":149,"question_zh":150,"answer_zh":151,"source_url":152},42213,"遇到\"Exception: Error, some node is not reachable\"异常该如何解决？","这是由于 AI 模型生成的任务计划中存在逻辑错误（例如任务依赖了自己，形成自环），导致执行引擎排序失败。解决方法是修改 `graph.py` 文件中的 `plan2graph` 函数，增加后处理规则：在处理每个任务的依赖 ID 列表时，检测并移除指向任务自身的依赖项（即如果依赖列表中包含任务自己的 ID，将其删除）。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F36",{"id":154,"question_zh":155,"answer_zh":156,"source_url":157},42214,"如何使用本地大模型（如 vLLM 或 SGLANG）来提供服务？","目前代码尚未专门适配 vLLM 或 SGLANG 接口，但可以通过模拟 OpenAI API 的方式使用。首先部署本地模型（例如使用 `vllm.entrypoints.openai.api_server` 启动服务），然后修改 `recursive\u002Fllm\u002Fllm.py` 文件中的代码，使其指向本地部署的服务地址，即可像调用 OpenAI API 一样与本地模型交互。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F32",{"id":159,"question_zh":160,"answer_zh":161,"source_url":162},42215,"项目支持 Azure OpenAI 或其他兼容 OpenAI 接口的模型吗？","项目底层使用 OpenAI Chat Completions API，但代码内部会根据传入的模型名称执行特定逻辑（参考 `recursive\u002Fllm\u002Fllm.py` 第 145 行）。因此，直接使用 Azure 或其他兼容模型可能需要对代码进行少量适配。此外，项目已支持通过 OpenRouter 访问 Google、Anthropic、Meta 和 Mistral 等厂商的模型。","https:\u002F\u002Fgithub.com\u002Fprincipia-ai\u002FWriteHERE\u002Fissues\u002F29",[]]