[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-yoheinakajima--mindgraph":3,"tool-yoheinakajima--mindgraph":61},[4,18,26,36,44,53],{"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 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"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",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":77,"owner_twitter":72,"owner_website":78,"owner_url":79,"languages":80,"stars":97,"forks":98,"last_commit_at":99,"license":77,"difficulty_score":32,"env_os":100,"env_gpu":101,"env_ram":101,"env_deps":102,"category_tags":110,"github_topics":77,"view_count":32,"oss_zip_url":77,"oss_zip_packed_at":77,"status":17,"created_at":111,"updated_at":112,"faqs":113,"releases":123},6418,"yoheinakajima\u002Fmindgraph","mindgraph","proof of concept prototype for generating and querying against an ever-expanding knowledge graph with ai","MindGraph 是一个开源的概念验证项目，旨在利用人工智能构建并查询不断扩展的知识图谱。它专为自然语言交互设计，允许用户通过简单的对话输入和输出，轻松管理人物、组织及其相互关系。\n\n该项目主要解决了传统客户关系管理（CRM）系统搭建复杂、难以灵活集成 AI 能力的痛点。通过提供一套以 API 为核心的模板，MindGraph 让开发者能够快速定制属于自己的智能 CRM 解决方案，无需从零开始构建底层架构。\n\nMindGraph 特别适合开发者和技术研究人员使用，尤其是那些希望探索如何将大语言模型与结构化图数据结合，或需要快速原型化智能数据管理应用的团队。普通用户若具备基础编程知识，也可借此学习知识图谱的运作机制。\n\n其技术亮点在于模块化的集成系统和内存图数据结构。通过独特的 `integration_manager` 组件，系统能动态注册和执行各类功能，无缝将自然语言转化为结构化的实体与关系。此外，基于 Flask 的轻量级架构配合清晰的信号机制，使得数据的增删改查及外部系统对接变得异常简便，为构建“越用越聪明”的动态知识库提供了坚实基础。","# MindGraph\n\nWelcome to MindGraph, a proof of concept, open-source, API-first graph-based project designed for natural language interactions (input and output). This prototype serves as a template for building and customizing your own CRM solutions with a focus on ease of integration and extendibility. Here is the [announcement on X](https:\u002F\u002Ftwitter.com\u002Fyoheinakajima\u002Fstatus\u002F1769019899245158648), for some more context.\n\n![flowchart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoheinakajima_mindgraph_readme_9271cf018b20.png)\n\n## Getting Started\n\n### Prerequisites\nBefore you begin, ensure you have the following installed:\n- Python 3.6 or higher\n- Poetry (dependency management and packaging tool)\n\n### Installation\n\n1. Clone the repository:\n   ```sh\n   git clone https:\u002F\u002Fgithub.com\u002Fyourusername\u002FMindGraph.git\n   ```\n\n2. Navigate to the project directory:\n   ```sh\n   cd MindGraph\n   ```\n\n3. Install the project dependencies using Poetry:\n   ```sh\n   poetry install\n   ```\n   This command will create a virtual environment for the project and install all the required packages specified in the ```pyproject.toml``` file.\n\n- Note: If you get any dependencies error you can run: ```poetry add \u003Cname_of_dependency>``` to add dependency to the project.\n\n## Environment Setup\n\n1. Create a ```.env``` file in the project root directory.\n\n2. Open the ```.env``` file and add the following line, replacing ```YOUR_API_KEY``` with your actual OpenAI API key:\n\n   ```sh\n   OPENAI_API_KEY=YOUR_API_KEY\n   ```\n\n## Running the Application\n\n   After installing the dependencies, you can start the Flask server with:\n\n\n   ```sh\n   poetry run python main.py\n   ```\n\n   The server will launch on `http:\u002F\u002F0.0.0.0:81`.\n\n## Project Structure\n\nMindGraph is organized into several key components:\n\n- `main.py`: The entry point to the application.\n- `app\u002F__init__.py`: Sets up the Flask app and integrates the blueprints.\n- `models.py`: Manages the in-memory graph data structure for entities and relationships.\n- `views.py`: Hosts the API route definitions.\n- `integration_manager.py`: Handles the dynamic registration and management of integration functions.\n- `signals.py`: Sets up signals for creating, updating, and deleting entities.\n\n## Integration System\n\nMindGraph employs a sophisticated integration system designed to extend the application's base functionality dynamically. At the core of this system is `integration_manager.py`, which acts as a registry and executor for various integration functions. This modular architecture allows MindGraph to incorporate AI-powered features seamlessly, such as processing natural language inputs into structured knowledge graphs through integrations like `natural_input.py`. Further integrations, including `add_multiple_conditional`, `conditional_entity_addition`, and `conditional_relationship_addition`, work in tandem to ensure the integrity and enhancement of the application's data model.\n\n## Features\n\n**Entity Management**: Entities are stored in an in-memory graph for quick access and manipulation, allowing CRUD operations on people, organizations, and their interrelations.\n\n**Integration Triggers**: Custom integration functions can be triggered via HTTP requests, enabling the CRM to interact with external systems or run additional processing.\n\n**Search Capabilities**: Entities and their relationships can be easily searched with custom query parameters.\n\n**AI Readiness**: Designed with AI integrations in mind, facilitating the incorporation of intelligent data processing and decision-making.\n\n## API Endpoints\n\nMindGraph provides a series of RESTful endpoints:\n\n- `POST \u002F\u003Centity_type>`: Create an entity.\n- `GET \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`: Retrieve an entity.\n- `GET \u002F\u003Centity_type>`: List all entities of a type.\n- `PUT \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`: Update an entity.\n- `DELETE \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`: Remove an entity.\n- `POST \u002Frelationship`: Establish a new relationship.\n- `GET \u002Fsearch\u002Fentities\u002F\u003Centity_type>`: Search for entities.\n- `GET \u002Fsearch\u002Frelationships`: Find relationships.\n\n### Custom Integration Endpoint\n\n- `POST \u002Ftrigger-integration\u002F\u003Cintegration_name>`: Activates a predefined integration function.\n\n## Frontend Overview\n\nMindGraph's frontend features a lightweight interactive, web-based interface that facilitates dynamic visualization and management of the graph-based data model. While MindGraph is meant to be used as an API, the front-end was helpful for demo purposes. It leverages HTML, CSS, JavaScript, Cytoscape.js for graph visualization, and jQuery for handling AJAX requests.\n\n### Features\n\n- **Graph Visualization**: Uses Cytoscape.js for interactive graph rendering.\n- **Dynamic Data Interaction**: Supports real-time data fetching, addition, and graph updating without page reloads.\n- **Search and Highlight**: Allows users to search for nodes, highlighting and listing matches. Search form is being double used for natural language queries right now, which doesn't really make sense, but was a quick way to showcase functionality. (This is meant to be used as an API, front-end is for demo purpose)\n- **Data Submission Forms**: Includes forms for natural language, URL inputs, and CSV file uploads.\n- **Responsive Design**: Adapts to various devices and screen sizes.\n\n### Workflow\n\n1. **Initialization**: On page load, initializes the graph with styles and layout.\n2. **User Interaction**: Through the interface, users can:\n   - Search for nodes, with results highlighted in the graph and listed in a sidebar.\n   - Add data using a form that supports various input methods.\n   - Refresh the graph to reflect the latest backend data.\n3. **Data Processing**: User inputs are sent to the backend, processed, and integrated, with the frontend graph visualization updated accordingly.\n\n## Schema-driven Knowledge Graph Creation\n\nMindGraph utilizes a `schema.json` file to define the structure and relationships of entities within its knowledge graph. This schema acts as a blueprint for interpreting and structuring natural language inputs into a coherent graph format. It details the types of nodes (e.g., Person, Organization, Concept) and the possible relationships between them, ensuring that the generated knowledge graph adheres to a consistent format. This approach allows for automated, AI-driven processing of natural language inputs to generate structured data that reflects the complex interrelations inherent in the input text.\n\n### Utilizing `schema.json` in AI Integration\n\nWhen the `create_knowledge_graph` function processes an input, it consults `schema.json` to understand how to map the identified entities and their relationships into the graph. This includes:\n\n- Identifying node types and attributes based on the schema definitions.\n- Determining valid relationship types and their characteristics.\n- Structuring the output to match the expected graph format, facilitating seamless integration with the application's data model.\n\nThe schema ensures that the AI-generated knowledge graph is not only consistent with the application's data model but also rich in detail, capturing the nuanced relationships between entities as described in the input.\n\n### Benefits\n\n- **Consistency**: Ensures that all knowledge graphs generated from natural language inputs adhere to the same structural rules, making data integration and interpretation more straightforward.\n- **Flexibility**: Allows for easy updates and expansions of the knowledge graph structure by modifying `schema.json`, without requiring changes to the codebase.\n- **AI Integration**: Facilitates the use of advanced AI models for natural language processing by providing a clear structure for the expected output, enhancing the application's ability to derive meaningful insights from unstructured data.\n\n## Development & Extension\n\n### Adding New Integrations\n\nTo incorporate a new integration into MindGraph, create a Python module within the `integrations` directory. This module should define the integration's logic and include a `register` function that connects the integration to the `IntegrationManager`. Ensure that your integration interacts properly with the application's components, such as `models.py` for data operations and `views.py` for activation via API endpoints. This approach allows MindGraph to dynamically expand its capabilities through modular and reusable code.\n\n### Utilizing Signals\n\nSignals are emitted for entity lifecycle events, providing hooks for extending functionality or syncing with other systems.\n\n## Database Integration and Usage\n\nMindGraph supports flexible database integration to enhance its data storage and retrieval capabilities. Out of the box, MindGraph includes support for an in-memory database and a more robust, cloud-based option, NexusDB. This flexibility allows for easy adaptation to different deployment environments and use cases.\n\n### Supported Databases\n- InMemoryDatabase: A simple, in-memory graph data structure for quick prototyping and testing. Not recommended for production use due to its non-persistent nature.\n- NexusDB: An all-in-one cloud database designed for storing graphs, tables, documents, files, vectors, and more. Offers a shared knowledge graph for comprehensive data management and analysis.\nConfiguring the Database\n- NebulaGraph: A distributed, scalable, and lightning-fast graph database that supports real-time queries and analytics. Ideal for large-scale graph data storage and processing.\n- FalkorDB: A knowledge DB, providing low latency & high throughput, with built-in support for vector search and wide coverage of the Cypher query language.\n\nDatabase integration is controlled through the DATABASE_TYPE environment variable. To select a database, set this variable:\n\n-  `memory` for the in-memory database.\n-  `nexusdb` for NexusDB integration.\n\n```sh\nexport DATABASE_TYPE=nexusdb\n```\n\n-  `nebulagraph` for NebulaGraph integration.\n\n> Note: For a running [NebulaGraph](https:\u002F\u002Fgithub.com\u002Fvesoft-inc\u002Fnebula), consider using the [Docker Desktop Extension](https:\u002F\u002Fhub.docker.com\u002Fextensions\u002Fweygu\u002Fnebulagraph-dd-ext), [NebulaGraph-Lite](https:\u002F\u002Fgithub.com\u002Fnebula-contrib\u002Fnebulagraph-lite) for Colab\u002FLinux with pip install, or explore more options in the [Docs](https:\u002F\u002Fdocs.nebula-graph.io\u002F).\n\n```sh\nexport DATABASE_TYPE=nebulagraph\nexport NEBULA_ADDRESS=127.0.0.1:9669\n```\n\n-  `falkordb` for FalkorDB integration.\n\n> Note: For a running [FalkorDB](https:\u002F\u002Fwww.falkordb.com), consider using the [Docker Image](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ffalkordb\u002Ffalkordb).\n\n```sh\nexport DATABASE_TYPE=falkordb\nexport FALKOR_HOST=127.0.0.1\nexport FALKOR_PORT=6379\nexport FALKOR_GRAPH_ID=mindgraph\n```\n\n### Adding New Database Integrations\nTo integrate a new database system into MindGraph:\n\n1) Implement the Database Integration: Create a new Python module under app\u002Fintegrations\u002Fdatabase following the abstract base class DatabaseIntegration defined in base.py. Your implementation should provide concrete methods for all abstract methods in the base class.\n\n2) Register Your Integration: Modify the database type detection logic in app\u002Fintegrations\u002Fdatabase\u002F__init__.py to include your new database type. This involves adding an additional elif statement to check for your database's type and set the CurrentDBIntegration accordingly.\n\n3) Configure Environment Variables: If your integration requires custom environment variables (e.g., for connection strings, authentication), ensure they are documented and set properly in the environment where MindGraph is deployed.\n\n### Schema Management\nFor databases requiring schema definitions (like NexusDB), include a schema management strategy within your integration module. This may involve checking and updating the database schema on startup to ensure compatibility with the current version of MindGraph.\n\n## Example Command\n\nTo create a person via `curl`:\n\n```sh\ncurl -X POST http:\u002F\u002F0.0.0.0:81\u002Fpeople \\\n-H \"Content-Type: application\u002Fjson\" \\\n-d '{\"name\":\"Jane Doe\",\"age\":28}'\n```\n\n### Example Use Cases\n\nTo demonstrate the power of MindGraph's integration system, here are some example commands:\n\n#### Triggering Natural Input Integration\n\n```sh\ncurl -X POST http:\u002F\u002F0.0.0.0:81\u002Ftrigger-integration\u002Fnatural_input \\\n-H \"Content-Type: application\u002Fjson\" \\\n-d '{\"input\":\"Company XYZ organized an event attended by John Doe and Jane Smith.\"}'\n```\n\n## Contributions\n\nLet's be honest... I don't maintain projects. If you want to take over\u002Fmanage this, let me know (X\u002FTwitter is a good channel). Otherwise, enjoy this proof of concept starter kit as it is :)\n\n## License\n\nMindGraph is distributed under the MIT License. See `LICENSE` for more information.\n\n## Contact\n\nJust tag me on Twitter\u002FX [https:\u002F\u002Ftwitter.com\u002Fyoheinakajima](https:\u002F\u002Ftwitter.com\u002Fyoheinakajima)\n\nProject Link: [https:\u002F\u002Fgithub.com\u002Fyoheinakajima\u002FMindGraph](https:\u002F\u002Fgithub.com\u002Fyoheinakajima\u002FMindGraph)\n","# MindGraph\n\n欢迎来到 MindGraph，这是一个概念验证性的开源、以 API 为主导的图数据库项目，专为自然语言交互（输入和输出）而设计。该原型可作为构建和定制您自己的 CRM 解决方案的模板，重点在于易于集成和可扩展性。有关更多背景信息，请参阅 [X 上的公告](https:\u002F\u002Ftwitter.com\u002Fyoheinakajima\u002Fstatus\u002F1769019899245158648)。\n\n![流程图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoheinakajima_mindgraph_readme_9271cf018b20.png)\n\n## 快速入门\n\n### 前置条件\n在开始之前，请确保已安装以下内容：\n- Python 3.6 或更高版本\n- Poetry（依赖管理和打包工具）\n\n### 安装\n\n1. 克隆仓库：\n   ```sh\n   git clone https:\u002F\u002Fgithub.com\u002Fyourusername\u002FMindGraph.git\n   ```\n\n2. 进入项目目录：\n   ```sh\n   cd MindGraph\n   ```\n\n3. 使用 Poetry 安装项目依赖：\n   ```sh\n   poetry install\n   ```\n   此命令将为项目创建一个虚拟环境，并安装 `pyproject.toml` 文件中指定的所有所需包。\n\n   - 注意：如果遇到任何依赖错误，可以运行 `poetry add \u003Cname_of_dependency>` 来添加依赖项。\n\n## 环境设置\n\n1. 在项目根目录下创建一个 `.env` 文件。\n\n2. 打开 `.env` 文件，添加以下行，将 `YOUR_API_KEY` 替换为您的实际 OpenAI API 密钥：\n\n   ```sh\n   OPENAI_API_KEY=YOUR_API_KEY\n   ```\n\n## 运行应用程序\n\n安装完依赖后，您可以使用以下命令启动 Flask 服务器：\n\n   ```sh\n   poetry run python main.py\n   ```\n\n服务器将在 `http:\u002F\u002F0.0.0.0:81` 启动。\n\n## 项目结构\n\nMindGraph 分为几个关键组件：\n\n- `main.py`：应用程序的入口点。\n- `app\u002F__init__.py`：设置 Flask 应用并集成蓝图。\n- `models.py`：管理实体和关系的内存图数据结构。\n- `views.py`：包含 API 路由定义。\n- `integration_manager.py`：负责动态注册和管理集成函数。\n- `signals.py`：设置用于创建、更新和删除实体的信号。\n\n## 集成系统\n\nMindGraph 采用了一个复杂的集成系统，旨在动态扩展应用程序的基础功能。该系统的核心是 `integration_manager.py`，它充当各种集成函数的注册表和执行器。这种模块化架构使 MindGraph 能够无缝地整合 AI 驱动的功能，例如通过 `natural_input.py` 等集成将自然语言输入处理为结构化的知识图谱。其他集成，包括 `add_multiple_conditional`、`conditional_entity_addition` 和 `conditional_relationship_addition`，协同工作，以确保应用程序数据模型的完整性和增强。\n\n## 功能\n\n**实体管理**：实体存储在内存图中，以便快速访问和操作，支持对人员、组织及其相互关系的 CRUD 操作。\n\n**集成触发器**：可以通过 HTTP 请求触发自定义集成函数，使 CRM 能够与外部系统交互或执行额外的处理。\n\n**搜索功能**：可以使用自定义查询参数轻松搜索实体及其关系。\n\n**AI 就绪**：专为 AI 集成设计，便于引入智能数据处理和决策功能。\n\n## API 端点\n\nMindGraph 提供了一系列 RESTful 端点：\n\n- `POST \u002F\u003Centity_type>`：创建实体。\n- `GET \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`：获取实体。\n- `GET \u002F\u003Centity_type>`：列出某一类型的全部实体。\n- `PUT \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`：更新实体。\n- `DELETE \u002F\u003Centity_type>\u002F\u003Cint:entity_id>`：删除实体。\n- `POST \u002Frelationship`：建立新关系。\n- `GET \u002Fsearch\u002Fentities\u002F\u003Centity_type>`：搜索实体。\n- `GET \u002Fsearch\u002Frelationships`：查找关系。\n\n### 自定义集成端点\n\n- `POST \u002Ftrigger-integration\u002F\u003Cintegration_name>`：激活预定义的集成函数。\n\n## 前端概述\n\nMindGraph 的前端提供了一个轻量级的交互式 Web 界面，便于动态可视化和管理基于图的数据模型。虽然 MindGraph 主要作为 API 使用，但前端对于演示目的非常有帮助。它利用 HTML、CSS、JavaScript、Cytoscape.js 进行图可视化，并使用 jQuery 处理 AJAX 请求。\n\n### 功能\n\n- **图可视化**：使用 Cytoscape.js 进行交互式图渲染。\n- **动态数据交互**：支持实时数据获取、添加以及无需页面刷新即可更新图。\n- **搜索与高亮**：允许用户搜索节点，在图中高亮显示并列出匹配结果。目前搜索表单也被双重用于自然语言查询，这其实并不合理，但却是快速展示功能的一种方式。（此界面仅用于演示，MindGraph 本身应作为 API 使用）\n- **数据提交表单**：包括自然语言、URL 输入以及 CSV 文件上传表单。\n- **响应式设计**：适应各种设备和屏幕尺寸。\n\n### 工作流程\n\n1. **初始化**：页面加载时，初始化图的样式和布局。\n2. **用户交互**：通过界面，用户可以：\n   - 搜索节点，结果会在图中高亮显示，并在侧边栏中列出。\n   - 使用支持多种输入方式的表单添加数据。\n   - 刷新图以反映最新的后端数据。\n3. **数据处理**：用户输入会被发送到后端进行处理和集成，前端图可视化会相应更新。\n\n## 基于模式的知识图谱创建\n\nMindGraph 使用 `schema.json` 文件来定义其知识图谱中实体的结构和关系。该模式充当解释和组织自然语言输入以形成连贯图格式的蓝图。它详细说明了节点类型（例如，Person、Organization、Concept）以及它们之间可能存在的关系，从而确保生成的知识图谱遵循一致的格式。这种方法允许自动化的 AI 驱动处理自然语言输入，生成反映输入文本中复杂相互关系的结构化数据。\n\n### 在 AI 集成中使用 `schema.json`\n\n当 `create_knowledge_graph` 函数处理输入时，它会参考 `schema.json` 文件，以了解如何将识别出的实体及其关系映射到知识图谱中。这包括：\n\n- 根据模式定义识别节点类型和属性。\n- 确定有效的关系类型及其特征。\n- 将输出结构化为与预期图谱格式一致的形式，从而实现与应用程序数据模型的无缝集成。\n\n该模式确保由 AI 生成的知识图谱不仅与应用程序的数据模型保持一致，而且信息丰富、细节详尽，能够准确捕捉输入中描述的实体之间的细微关系。\n\n### 优势\n\n- **一致性**：确保所有从自然语言输入生成的知识图谱都遵循相同的结构规则，使数据集成和解释更加简便。\n- **灵活性**：只需修改 `schema.json` 文件即可轻松更新和扩展知识图谱的结构，而无需更改代码库。\n- **AI 集成**：通过提供明确的预期输出结构，便于使用先进的 AI 模型进行自然语言处理，从而提升应用程序从非结构化数据中提取有意义见解的能力。\n\n## 开发与扩展\n\n### 添加新的集成\n\n要将新集成引入 MindGraph，请在 `integrations` 目录下创建一个 Python 模块。该模块应定义集成的逻辑，并包含一个用于将集成连接到 `IntegrationManager` 的 `register` 函数。请确保您的集成能与应用程序的各个组件正确交互，例如与用于数据操作的 `models.py` 和用于通过 API 端点激活的 `views.py` 进行协作。这种方法允许 MindGraph 通过模块化和可重用的代码动态扩展其功能。\n\n### 使用信号机制\n\n针对实体生命周期事件会发出信号，这些信号提供了扩展功能或与其他系统同步的钩子。\n\n## 数据库集成与使用\n\nMindGraph 支持灵活的数据库集成，以增强其数据存储和检索能力。开箱即用，MindGraph 已内置对内存数据库和更强大的云数据库 NexusDB 的支持。这种灵活性使其能够轻松适应不同的部署环境和使用场景。\n\n### 支持的数据库\n- InMemoryDatabase：一种简单的内存图数据结构，适用于快速原型设计和测试。由于其非持久性，不建议用于生产环境。\n- NexusDB：一款一体化云数据库，专为存储图、表格、文档、文件、向量等数据而设计。它提供共享的知识图谱，用于全面的数据管理和分析。\n配置数据库\n- NebulaGraph：一种分布式、可扩展且速度极快的图数据库，支持实时查询和分析。非常适合大规模图数据的存储和处理。\n- FalkorDB：一种知识型数据库，具有低延迟和高吞吐量的特点，并内置向量搜索功能，同时广泛支持 Cypher 查询语言。\n\n数据库集成由 `DATABASE_TYPE` 环境变量控制。要选择数据库，请设置此变量：\n- `memory` 表示使用内存数据库。\n- `nexusdb` 表示集成 NexusDB。\n\n```sh\nexport DATABASE_TYPE=nexusdb\n```\n\n- `nebulagraph` 表示集成 NebulaGraph。\n\n> 注意：对于正在运行的 [NebulaGraph](https:\u002F\u002Fgithub.com\u002Fvesoft-inc\u002Fnebula)，可以考虑使用 [Docker Desktop 扩展](https:\u002F\u002Fhub.docker.com\u002Fextensions\u002Fweygu\u002Fnebulagraph-dd-ext)，或者使用 [NebulaGraph-Lite](https:\u002F\u002Fgithub.com\u002Fnebula-contrib\u002Fnebulagraph-lite) 在 Colab\u002FLinux 上通过 pip 安装，也可以在 [官方文档](https:\u002F\u002Fdocs.nebula-graph.io\u002F) 中探索更多选项。\n\n```sh\nexport DATABASE_TYPE=nebulagraph\nexport NEBULA_ADDRESS=127.0.0.1:9669\n```\n\n- `falkordb` 表示集成 FalkorDB。\n\n> 注意：对于正在运行的 [FalkorDB](https:\u002F\u002Fwww.falkordb.com)，可以考虑使用 [Docker 镜像](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ffalkordb\u002Ffalkordb)。\n\n```sh\nexport DATABASE_TYPE=falkordb\nexport FALKOR_HOST=127.0.0.1\nexport FALKOR_PORT=6379\nexport FALKOR_GRAPH_ID=mindgraph\n```\n\n### 添加新的数据库集成\n\n要将新的数据库系统集成到 MindGraph 中：\n\n1) 实现数据库集成：在 `app\u002Fintegrations\u002Fdatabase` 下创建一个新的 Python 模块，遵循 `base.py` 中定义的抽象基类 `DatabaseIntegration`。您的实现应为基类中的所有抽象方法提供具体实现。\n\n2) 注册您的集成：修改 `app\u002Fintegrations\u002Fdatabase\u002F__init__.py` 中的数据库类型检测逻辑，以包含您的新数据库类型。这需要添加一个额外的 `elif` 语句来检查您的数据库类型，并相应地设置 `CurrentDBIntegration`。\n\n3) 配置环境变量：如果您的集成需要自定义环境变量（例如连接字符串、认证信息），请确保在 MindGraph 部署环境中正确记录并设置这些变量。\n\n### 模式管理\n\n对于需要模式定义的数据库（如 NexusDB），请在您的集成模块中纳入模式管理策略。这可能涉及在启动时检查和更新数据库模式，以确保其与当前版本 MindGraph 的兼容性。\n\n## 示例命令\n\n通过 `curl` 创建一个人：\n\n```sh\ncurl -X POST http:\u002F\u002F0.0.0.0:81\u002Fpeople \\\n-H \"Content-Type: application\u002Fjson\" \\\n-d '{\"name\":\"Jane Doe\",\"age\":28}'\n```\n\n### 示例用例\n\n为了展示 MindGraph 集成系统的强大功能，以下是一些示例命令：\n\n#### 触发自然输入集成\n\n```sh\ncurl -X POST http:\u002F\u002F0.0.0.0:81\u002Ftrigger-integration\u002Fnatural_input \\\n-H \"Content-Type: application\u002Fjson\" \\\n-d '{\"input\":\"XYZ 公司组织了一场活动，John Doe 和 Jane Smith 参加了。\"}'\n```\n\n## 贡献\n\n说实话……我并不维护项目。如果您想接手或管理这个项目，请告诉我（Twitter\u002FX 是一个不错的渠道）。否则，就按原样享受这个概念验证入门套件吧 :)\n\n## 许可证\n\nMindGraph 采用 MIT 许可证进行分发。更多信息请参阅 `LICENSE` 文件。\n\n## 联系方式\n\n只需在 Twitter\u002FX 上标记我 [https:\u002F\u002Ftwitter.com\u002Fyoheinakajima](https:\u002F\u002Ftwitter.com\u002Fyoheinakajima)\n\n项目链接：[https:\u002F\u002Fgithub.com\u002Fyoheinakajima\u002FMindGraph](https:\u002F\u002Fgithub.com\u002Fyoheinakajima\u002FMindGraph)","# MindGraph 快速上手指南\n\nMindGraph 是一个开源的、基于图结构的 API 优先项目，专为自然语言交互设计。它可作为构建自定义 CRM 解决方案的模板，支持通过 AI 将非结构化文本转化为结构化的知识图谱。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows (WSL)\n*   **Python**：版本 3.6 或更高\n*   **包管理工具**：Poetry (用于依赖管理和虚拟环境创建)\n\n> **提示**：国内用户安装 Poetry 时若遇网络问题，可配置国内镜像源加速：\n> ```sh\n> poetry config pypi.mirror https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n## 安装步骤\n\n1.  **克隆项目仓库**\n    ```sh\n    git clone https:\u002F\u002Fgithub.com\u002Fyourusername\u002FMindGraph.git\n    ```\n\n2.  **进入项目目录**\n    ```sh\n    cd MindGraph\n    ```\n\n3.  **安装依赖**\n    使用 Poetry 安装项目所需的所有依赖包并创建虚拟环境：\n    ```sh\n    poetry install\n    ```\n    *注：若安装过程中出现缺失依赖的错误，可运行 `poetry add \u003C依赖包名称>` 进行补充。*\n\n4.  **配置环境变量**\n    在项目根目录下创建 `.env` 文件，并填入您的 OpenAI API Key：\n    ```sh\n    OPENAI_API_KEY=YOUR_API_KEY\n    ```\n    *(请将 `YOUR_API_KEY` 替换为您实际的密钥)*\n\n5.  **(可选) 配置数据库**\n    默认使用内存数据库（仅适合测试）。若需持久化存储，可通过设置环境变量切换数据库类型（如 NexusDB, NebulaGraph, FalkorDB）：\n    ```sh\n    export DATABASE_TYPE=nexusdb\n    # 或其他数据库类型的配置变量\n    ```\n\n## 基本使用\n\n### 1. 启动服务\n使用以下命令启动 Flask 服务器：\n```sh\npoetry run python main.py\n```\n服务启动后，默认监听地址为 `http:\u002F\u002F0.0.0.0:81`。\n\n### 2. 调用 API 创建实体\nMindGraph 提供 RESTful API。您可以使用 `curl` 命令快速创建一个“人物”实体：\n\n```sh\ncurl -X POST http:\u002F\u002F0.0.0.0:81\u002Fpeople \\\n-H \"Content-Type: application\u002Fjson\" \\\n-d '{\"name\":\"Jane Doe\",\"age\":28}'\n```\n\n### 3. 前端可视化（演示用）\n打开浏览器访问 `http:\u002F\u002Flocalhost:81`，即可看到基于 Cytoscape.js 的交互式图谱界面。您可以在界面上：\n*   通过表单输入自然语言、URL 或上传 CSV 文件来生成图谱数据。\n*   搜索节点并高亮显示关系。\n*   实时查看后端数据的图形化展示。\n\n### 核心功能概览\n*   **实体管理**：支持对人、组织等实体及其关系的增删改查（CRUD）。\n*   **AI 集成**：内置 Schema 驱动机制，可自动解析自然语言输入并映射为符合定义的结构化图谱。\n*   **扩展性**：通过在 `integrations` 目录添加 Python 模块，可动态注册新的处理逻辑或连接外部系统。","某初创公司的客户成功团队正试图从杂乱的会议记录和邮件中梳理客户关系，以构建动态更新的客户画像。\n\n### 没有 mindgraph 时\n- **数据孤岛严重**：客户信息分散在 Slack、Notion 和 Excel 中，人工汇总耗时且容易遗漏关键联系人关系。\n- **关联挖掘困难**：难以直观发现不同公司决策人之间的隐性联系（如共同校友或前同事），导致销售机会流失。\n- **更新维护滞后**：每当人员变动或新互动发生，需手动修改多处记录，知识图谱往往滞后于实际业务状态。\n- **查询方式僵化**：只能依赖固定的数据库字段搜索，无法用自然语言提问（如“找出所有对 AI 感兴趣的投资人”）。\n\n### 使用 mindgraph 后\n- **自动构建图谱**：通过 API 接入沟通记录，mindgraph 利用 AI 自动提取实体与关系，实时生成并扩展内存中的知识图谱。\n- **智能关系洞察**：系统自动识别并连接隐性关系，帮助团队快速定位关键决策路径，提升转化效率。\n- **动态自我演进**：新的互动数据触发信号机制，自动增删改查实体与关系，确保客户画像始终最新。\n- **自然语言交互**：支持直接用自然语言查询复杂关系网络，非技术人员也能轻松获取深度洞察。\n\nmindgraph 将静态的客户数据转化为可对话、自生长的智能知识网络，让 CRM 系统真正具备理解业务上下文的能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fyoheinakajima_mindgraph_bae7a3ff.png","yoheinakajima","Yohei Nakajima","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fyoheinakajima_977943f4.jpg","I don't know what I'm doing here, don't judge me.","Untapped Capital",null,"http:\u002F\u002Fyoheinakajima.com","https:\u002F\u002Fgithub.com\u002Fyoheinakajima",[81,85,89,93],{"name":82,"color":83,"percentage":84},"Python","#3572A5",88.3,{"name":86,"color":87,"percentage":88},"JavaScript","#f1e05a",8.7,{"name":90,"color":91,"percentage":92},"HTML","#e34c26",1.6,{"name":94,"color":95,"percentage":96},"CSS","#663399",1.5,931,110,"2026-04-10T16:37:47","Linux, macOS, Windows","未说明",{"notes":103,"python":104,"dependencies":105},"该项目主要作为 API 优先的原型，默认使用内存数据库（InMemoryDatabase），生产环境建议配置 NexusDB、NebulaGraph 或 FalkorDB。需设置 OPENAI_API_KEY 环境变量以启用 AI 功能。若使用 NebulaGraph 或 FalkorDB，需额外部署对应的数据库服务（推荐使用 Docker）。前端仅用于演示，核心功能通过 RESTful API 调用。","3.6+",[106,107,108,109],"Poetry","Flask","Cytoscape.js (前端)","jQuery (前端)",[35,14,13],"2026-03-27T02:49:30.150509","2026-04-11T08:11:51.061035",[114,119],{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},29058,"遇到 'The model gpt-4-0125-preview does not exist' 错误导致触发失败，如何解决？","这通常是因为当前使用的模型版本不可用或没有访问权限。建议尝试其他 GPT-4 模型版本，例如 'gpt-4-turbo-preview'。GPT-3.5 可能不足以很好地构建知识图谱。您可以在 OpenAI 官方文档中查看完整的可用模型列表：https:\u002F\u002Fplatform.openai.com\u002Fdocs\u002Fmodels\u002Fgpt-4-and-gpt-4-turbo","https:\u002F\u002Fgithub.com\u002Fyoheinakajima\u002Fmindgraph\u002Fissues\u002F8",{"id":120,"question_zh":121,"answer_zh":122,"source_url":118},29059,"将内部模型从 GPT-4 改为 GPT-3.5 后，为什么输出只有节点没有箭头，且无法正常删除节点？","这是因为 GPT-3.5 的能力可能不足以支持完整的功能（如生成关系箭头和处理复杂的删除逻辑）。建议切换回更强的 GPT-4 模型（如 'gpt-4-turbo-preview'）以恢复正常功能。",[]]