私有知识库构建工具

Conduit是一个本地化私有知识库构建工具,通过RAG和KAG技术增强AI工具上下文理解能力,所有数据处理均在用户设备本地完成。

  • by amlandas
  • Go
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 amlandas/Conduit-AI-Intelligence-Hub

使用说明

导管

通过私有知识库使您的人工智能工具更加智能

您的文件。你的AI,你的控制。


Conduit将您的本地文档转换为 私人知识库 这使得Claude Desktop、ChatGPT、Perplexity等人工智能工具以及Claude Code、Cursor、Copilot、Kiro和Gemini CLI等人工智能编码助手变得更加智能。

一切都是本地的。 任何文档或工件都不会离开您的机器。

为什么选择Conduit?

人工智能工具功能强大,但它们在以下方面存在困难:

  • 上下文膨胀:输入过多信息会淹没人工智能
  • 缺少上下文:信息不足会导致幻觉
  • 隐私问题:敏感文件不应离开您的机器

Conduit通过以下方式解决了这个问题:

  • 智能检索:RAG(检索增强生成)和KAG(知识增强生成)找到了正确的上下文
  • 本地优先:所有处理都在您的机器上进行-文档永远不会离开
  • MCP集成:适用于任何支持的AI工具 模型上下文协议

快速入门(5分钟)

通过CLI安装(推荐)

curl -fsSL https://raw.githubusercontent.com/amlandas/Conduit-AI-Intelligence-Hub/main/scripts/install.sh | bash

安装程序处理一切:

  • 安装Conduit CLI和守护程序
  • 设置容器运行时(Podman/Docker)
  • 通过Ollama安装AI模型
  • 配置矢量数据库(Qdrant)和知识图(FalkorDB)
  • 用Claude代码自动配置MCP服务器

验证安装

# Restart terminal, then:
conduit doctor

添加您的文档

# Add a folder to your knowledge base
conduit kb add ~/Documents/my-project --name "My Project"

# Sync documents (indexes for search)
conduit kb sync

# Test search
conduit kb search "how does authentication work"

就是这样! 你的人工智能工具现在可以访问你的私人知识库。


运作原理

┌─────────────────────────────────────────────────────────────────────┐
│                        Your Local Machine                           │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   ┌──────────────┐         ┌──────────────────────────────────┐    │
│   │ Your Docs    │ ──────► │        Conduit                   │    │
│   │ (PDF, MD,    │         │  ┌────────────────────────────┐  │    │
│   │  Code, etc.) │         │  │ RAG: Semantic + Keyword    │  │    │
│   └──────────────┘         │  │ KAG: Knowledge Graph       │  │    │
│                            │  └────────────────────────────┘  │    │
│                            └───────────────┬──────────────────┘    │
│                                            │                        │
│                                            │ MCP Protocol           │
│                                            ▼                        │
│   ┌────────────────────────────────────────────────────────────┐   │
│   │              AI Tools (via MCP Server)                     │   │
│   │  Claude Code │ Cursor │ Claude Desktop │ ChatGPT │ etc.   │   │
│   └────────────────────────────────────────────────────────────┘   │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

关键技术

组件 目的
检索增强生成 (检索增强生成) 使用向量搜索查找语义相似的文档
韩国游戏评级委员会 (知识增强生成) 为多跳推理构建知识图
主控程序 (模型上下文协议) AI工具访问外部数据的标准协议
库德兰特 用于语义搜索的矢量数据库(在容器中本地运行)
FalkorDB 的 知识图的图形数据库(在容器中本地运行)
Ollama 用于嵌入和实体提取的局部AI模型

CLI参考

Conduit是CLI首选工具。有关完整的命令参考,请参见 CLI命令索引.

基本命令

# Setup & Health
conduit doctor              # Run diagnostics
conduit status              # Show system status

# Knowledge Base
conduit kb add <path>       # Add document folder
conduit kb sync             # Index documents
conduit kb search <query>   # Search your knowledge base
conduit kb list             # List all sources
conduit kb stats            # Show statistics

# MCP Server
conduit mcp status          # Verify MCP server is configured
conduit mcp configure       # Configure MCP for Claude Code

搜索模式

# Hybrid search (default) - combines keyword + semantic
conduit kb search "authentication flow"

# Semantic search - finds by meaning
conduit kb search "securing user login" --semantic

# Keyword search - exact matches
conduit kb search "OAuth2 client_id" --fts5

知识图查询

# Extract entities from your documents
conduit kb kag-sync

# Query relationships
conduit kb kag-query "Kubernetes"
conduit kb kag-query "authentication" --entities OAuth,JWT --max-hops 2

MCP服务器集成

Conduit会自动为您的知识库创建一个MCP服务器,并为Claude Code配置它。

克劳德代码(自动配置)

运行后 conduit kb sync,您的知识库在Claude Code中自动可用。

其他人工智能工具(手动配置)

添加到AI工具的MCP配置中:

{
  "mcpServers": {
    "conduit-kb": {
      "command": "conduit",
      "args": ["mcp", "kb"]
    }
  }
}

配置位置:

  • 克劳德桌面版: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 光标: .cursor/mcp.json
  • VS Code: .vscode/settings.json (根据 mcp.servers)

可用的MCP工具

工具 说明
kb_search 混合搜索(语义+关键字)
kb_search_with_context 使用合并的结果和引用进行搜索
kb_list_sources 列出索引文档源
kb_get_document 检索完整文档内容
kb_stats 知识库统计
kag_query 查询实体知识图

安装选项

CLI安装(推荐)

# Standard install
curl -fsSL https://raw.githubusercontent.com/amlandas/Conduit-AI-Intelligence-Hub/main/scripts/install.sh | bash

# Custom options
curl -fsSL ... | bash -s -- --install-dir ~/.local/bin  # Custom location
curl -fsSL ... | bash -s -- --skip-model                # Skip AI model download
curl -fsSL ... | bash -s -- --no-kag                    # Skip knowledge graph setup
curl -fsSL ... | bash -s -- --verbose                   # Verbose output

手动安装

git clone https://github.com/amlandas/Conduit-AI-Intelligence-Hub.git
cd Conduit-AI-Intelligence-Hub
make build
sudo cp bin/conduit bin/conduit-daemon /usr/local/bin/
conduit setup

桌面应用程序(已停产,请勿安装)

⚠️ 桌面应用程序开发已于2026年7月停止。 已发布的DMG 未签名,运行报废的Electron版本,并包含已知的 安全漏洞(SEC-002). 不要安装它们。如果您安装了该应用程序,请将其删除: rm -rf /Applications/Conduit.app

CLI是使用Conduit的受支持方式,并提供所有功能。


支持的文档格式

类别 格式
文档 .md, .txt, .rst
代码 .go, .py, .js, .ts, .java, .rs, .rb, .c, .cpp, .h, .cs, .swift, .kt
脚本 .sh, .bash, .zsh, .ps1, .bat
配置 .json, .yaml, .yml, .xml, .toml, .ini
数据 .csv, .tsv
文件 .pdf, .doc, .docx, .odt, .rtf

卸载

建议通过CLI卸载:

# Preview what will be removed
conduit uninstall --dry-run --all

# Uninstall (keeps your data)
conduit uninstall --keep-data

# Full uninstall (removes everything)
conduit uninstall --all

备份方法 (如果CLI不可用):

curl -fsSL https://raw.githubusercontent.com/amlandas/Conduit-AI-Intelligence-Hub/main/scripts/uninstall.sh | bash

故障排除

快速诊断

conduit doctor    # Comprehensive health check
conduit status    # System status overview

常见问题

语义搜索显示0个向量:

conduit qdrant status              # Check Qdrant
conduit kb sync --rebuild-vectors  # Rebuild vectors

MCP服务器不工作:

conduit mcp status     # Check MCP configuration
conduit mcp configure  # Reconfigure

首次运行时KAG提取缓慢: 首次使用时加载提取模型(~4GB)。启用预加载 ~/.conduit/conduit.yaml:

kb:
  kag:
    preload_model: true

有关更多故障排除,请参阅 已知问题.


文档

文档 描述
为什么不只是一个文件夹? 与内置代理功能进行诚实的比较——请先阅读本文
CLI命令索引 完整的CLI参考
快速入门指南 一步一步开始
用户指南 详细的使用说明
管理员指南 系统管理
已知问题 问题和解决方法
MCP服务器设计 MCP实施细节

贡献

我们欢迎捐款!请参阅 贡献.md 作为指导方针。


需求

安装程序会自动处理这些问题:

要求 版本 注释
计划支持macOS或Linux - Windows
Podman或Docker 4.0+/2010+ 容器运行时
Ollama 最新消息 本地AI模型

隐私和安全

  • 100%本地:所有文件和处理都保留在您的机器上
  • 无遥测:Conduit不给家里打电话
  • 沙盒容器:Qdrant和FalkorDB在独立的容器中运行
  • 只读MCP:人工智能工具只能读取,不能修改你的知识库

许可证

MIT许可证-请参阅 许可证 了解详情。


致谢

内置:


Conduit v1.0 — Private Knowledge Base for AI Tools