Token导航 LogoToken导航TokenDH.com
Fusionpact Vectordb logo
AI代理stdio官方级别未说明来源级核验

Fusionpact Vectordb

MCP Server

fusionpact

FusionPact是一个专为AI代理和多代理系统设计的混合向量+推理+内存检索引擎,结合了HNSW向量搜索、基于推理的树检索和代理内存,适用于精确信息检索和多代理协作场景。

工具数

11

提示词数

0

GitHub Stars

0

资源数

0
AI代理本地优先JavaScriptClaudeClaude DesktopClaudeCursorWindsurf

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

FusionpactTech

提供方

FusionpactTech

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx fusionpact demo

详细介绍

⚡ 融合行动

Agent原生检索引擎

人工智能代理的混合向量+推理+记忆

![License](LICENSE) ](https://nodejs.org) ](https://www.npmjs.com/package/fusionpact)

相似性≠相关性。 FusionAction是第一个将HNSW向量搜索、基于推理的树检索和代理内存结合在一个平台上的检索引擎,专为人工智能代理和多代理系统而构建。

快速入门 · 混合检索 · 代理内存 · 多Agent · MCP服务器 · 树索引 · RAG 流程 · API 参考 · 基准测试 · 贡献

______________________________________________________________________

为什么选择FusionAct?

传统的矢量数据库检索 相似的.但相似≠相关。向向量数据库询问“2024年第三季度收入”,你可能会得到第二季度或第四季度的数据——语义相似,但 错误答案.

FusionAction通过结合 三种检索范式:

策略如何运作最适合
向量搜索 (HNSW)嵌入相似性,O(log N)跨大型集合的广泛搜索
树推理LLM导航文档结构在结构化文档中进行精确检索
关键字搜索 (BM25)词频匹配精确匹配要求

加上专门打造 代理存储器, 多代理编排,以及 MCP服务器 --全零依赖,本地优先,免费。

┌──────────────────────────────────────────────────────────┐
│             FusionPact Retrieval Engine                   │
│                                                          │
│  ┌────────────┐  ┌─────────────┐  ┌────────────────┐   │
│  │ Vector     │  │ Tree        │  │ Keyword        │   │
│  │ (HNSW)     │  │ (Reasoning) │  │ (BM25)         │   │
│  └─────┬──────┘  └──────┬──────┘  └───────┬────────┘   │
│        └────────────┬────┴─────────────────┘            │
│                     ▼                                    │
│           Reciprocal Rank Fusion                         │
│                     ▼                                    │
│  ┌──────────────────────────────────────────────────┐   │
│  │        Agent Memory (Multi-Agent)                │   │
│  │  Episodic │ Semantic │ Procedural │ Shared       │   │
│  └──────────────────────────────────────────────────┘   │
│  ┌──────────────────────────────────────────────────┐   │
│  │        MCP Server (Claude, Cursor, etc.)         │   │
│  └──────────────────────────────────────────────────┘   │
└──────────────────────────────────────────────────────────┘

______________________________________________________________________

⚡ 快速入门

# Install
npm install fusionpact

# Run the demo
npx fusionpact demo

# Start HTTP + MCP server
npx fusionpact serve --port 8080

# Start MCP server for Claude Desktop
npx fusionpact mcp

10行代码

const { create } = require('fusionpact');

const fp = create({ embedder: 'ollama' }); // or 'mock' for zero-config

// Ingest a document — auto-chunks, embeds, indexes
await fp.rag.ingest('Your document text here...', { source: 'doc.pdf' });

// Hybrid search — vector + reasoning + keyword, fused automatically
const results = await fp.retriever.retrieve('What safety protocols exist?', {
  collection: 'default',
  strategy: 'hybrid'
});

// Or build LLM-ready context directly
const context = await fp.rag.buildContext('What safety protocols exist?');
console.log(context.prompt); // Ready to paste into any LLM

______________________________________________________________________

🔀 混合检索引擎

核心区别:单个API通过多种检索策略智能路由查询,并使用倒数排名融合融合结果。

const { create } = require('fusionpact');

const fp = create({
  embedder: 'ollama',        // Local, free, private
  llmProvider: 'ollama',     // For tree reasoning
  enableHybrid: true
});

// Index a structured document with tree structure
await fp.treeIndex.indexDocument('annual-report', reportText, {
  format: 'markdown'
});

// Hybrid retrieval — automatically uses the best strategy
const results = await fp.retriever.retrieve(
  'What were the total deferred tax assets in Q3?',
  {
    collection: 'documents',       // Vector search here
    docId: 'annual-report',        // Tree reasoning here
    topK: 5,
    strategy: 'hybrid'            // Fuse all strategies
  }
);

// Each result includes:
// - score: Fused relevance score
// - content: Retrieved text
// - sources: Which strategies contributed { vector: 0.8, tree: 0.9, keyword: 0.3 }
// - citation: "Section 3 > Financial Data > Table 3.2.1"
// - reasoning: Full tree traversal reasoning trace

战略权重

const retriever = new HybridRetriever({
  engine, treeIndex, embedder,
  weights: {
    vector: 0.4,   // 40% weight to vector similarity
    tree: 0.4,     // 40% weight to reasoning-based retrieval
    keyword: 0.2   // 20% weight to keyword matching
  }
});

自适应学习

FusionAction学习哪种检索策略最适合不同的查询模式:

// Record feedback on result quality
retriever.recordFeedback('financial query', 'tree', 0.95);
retriever.recordFeedback('general search', 'vector', 0.85);

// Get recommended weights for a new query
const weights = retriever.getAdaptiveWeights('new financial query');
// → { vector: 0.25, tree: 0.6, keyword: 0.15 }

______________________________________________________________________

🌲 树索引

基于推理的结构化文档检索。构建一个层次树(如智能目录),并使用LLM推理导航到最相关的部分。

const { TreeIndex, LLMProvider } = require('fusionpact');

const llm = new LLMProvider({ provider: 'ollama' }); // Free, local
const tree = new TreeIndex({ llmProvider: llm });

// Index a document
await tree.indexDocument('sec-filing', filingText, {
  format: 'markdown',
  metadata: { source: '10-K', year: 2024 }
});

// Reasoning-based search
const results = await tree.search('sec-filing', 'Total deferred tax assets', {
  maxResults: 3,
  includeReasoning: true
});

// results[0]:
// {
//   content: "Table 5.2: Deferred Tax Assets...",
//   relevanceScore: 0.95,
//   citation: "Financial Statements > Note 5 > Tax Assets > Table 5.2",
//   reasoningPath: [
//     { title: "Financial Statements", reasoning: "Deferred tax assets are in financial notes", action: "explore" },
//     { title: "Note 5: Income Taxes", reasoning: "This note covers tax-related assets", action: "explore" },
//     { title: "Table 5.2", reasoning: "Contains the deferred tax asset breakdown", action: "retrieve" }
//   ]
// }

没有法学硕士也能工作

如果没有配置LLM提供程序,TreeIndex将回退到基于关键字的树遍历——仍然有用,只是没有推理路径:

const tree = new TreeIndex(); // No LLM — keyword fallback
await tree.indexDocument('doc', text, { format: 'markdown' });
const results = await tree.search('doc', 'safety protocols');

______________________________________________________________________

🧠 代理内存

专门为AI代理构建的内存系统,有四种内存类型:

内存类型存储内容示例
情节性的事件、对话、观察“用户询问了实验室B的化学品储存情况”
语义事实、领域知识、学习信息“OSHA 1910.106涵盖易燃液体”
程序性工具架构、API规范、工作流search_incidents工具定义
共享跨代理知识库“客户ACME更喜欢ISO 14001”
const { create } = require('fusionpact');
const fp = create({ embedder: 'ollama', enableMemory: true });

// Episodic — remember what happened
await fp.memory.remember('agent-1', {
  content: 'User prefers dark mode and concise answers',
  role: 'system',
  importance: 0.8
});

// Semantic — learn knowledge
await fp.memory.learn('agent-1',
  'OSHA 29 CFR 1910 covers general industry safety standards.',
  { source: 'regulations', category: 'compliance' }
);

// Procedural — register tools
await fp.memory.registerTool('agent-1', {
  name: 'search_incidents',
  description: 'Search EHS incident reports by category and severity',
  schema: { type: 'object', properties: { severity: { type: 'string' } } }
});

// Recall — cross-memory search
const memories = await fp.memory.recall('agent-1', 'safety compliance');
// → { episodic: [...], semantic: [...], procedural: [...], shared: [...] }

// Conversation memory
fp.memory.addMessage('agent-1', 'thread-001', { role: 'user', content: 'What are the PPE requirements?' });
fp.memory.addMessage('agent-1', 'thread-001', { role: 'assistant', content: 'PPE requirements include...' });
const history = fp.memory.getConversation('agent-1', 'thread-001');

// GDPR-friendly forget
fp.memory.forget('agent-1', { type: 'all' });

______________________________________________________________________

🤖 多代理编排

通过隔离内存、共享知识和消息路由协调多个AI代理:

const { create, AgentOrchestrator } = require('fusionpact');

const fp = create({ embedder: 'ollama', enableMemory: true });
const orchestrator = new AgentOrchestrator({
  engine: fp.engine,
  memory: fp.memory,
  retriever: fp.retriever
});

// Register agents
orchestrator.registerAgent({
  agentId: 'researcher',
  name: 'Research Agent',
  role: 'Find and analyze information',
  capabilities: ['search', 'analysis', 'summarization']
});

orchestrator.registerAgent({
  agentId: 'writer',
  name: 'Writing Agent',
  role: 'Generate reports and documentation',
  capabilities: ['writing', 'formatting', 'editing']
});

// Agent-to-agent communication
await orchestrator.send({
  from: 'researcher',
  to: 'writer',
  type: 'result',
  payload: { findings: 'Safety incidents decreased 12% YoY...' }
});

// Capability-based task delegation
await orchestrator.delegate('coordinator', 'Write a safety summary report', {
  requiredCapabilities: ['writing', 'formatting']
});
// → Automatically routes to 'writer' agent

// Collaborative retrieval across all agents
const results = await orchestrator.collaborativeRecall('safety compliance');
// → Returns memories from all agents, plus shared knowledge

// Message handling
orchestrator.onMessage('writer', async (msg) => {
  console.log(`Writer received: ${msg.type} from ${msg.from}`);
  // Process task...
});

______________________________________________________________________

🔌 MCP服务器

FusionAction作为MCP(模型上下文协议)服务器提供。任何AI代理(Claude、Cursor、Windsurf)都可以将其用作持久内存,无需自定义集成。

Claude桌面设置

添加 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "fusionpact": {
      "command": "npx",
      "args": ["fusionpact", "mcp"],
      "env": {
        "EMBEDDING_PROVIDER": "ollama"
      }
    }
  }
}

可用的MCP工具

工具说明
fusionpact_create_collection创建HNSW索引矢量集合
fusionpact_search语义向量搜索
fusionpact_hybrid_search混合检索(向量+树+关键字)
fusionpact_rag_ingest一键式RAG摄取
fusionpact_rag_query构建LLM就绪上下文
fusionpact_memory_remember存储情景记忆
fusionpact_memory_recall回忆相关记忆
fusionpact_memory_learn添加语义知识
fusionpact_memory_share分享跨代理知识
fusionpact_memory_forgetGDPR风格的内存擦除
fusionpact_memory_conversation管理对话线程

______________________________________________________________________

📄 RAG 流程

一次通话中的端到端RAG:

const fp = require('fusionpact').create({ embedder: 'ollama' });

// Ingest — auto-chunks, embeds, indexes
await fp.rag.ingest(documentText, {
  source: 'safety-manual.pdf',
  title: 'Safety Manual 2024'
});

// Build context for any LLM
const ctx = await fp.rag.buildContext('What PPE is required?', {
  topK: 5,
  maxTokens: 4000,
  strategy: 'hybrid'  // Uses HybridRetriever if available
});

// ctx.prompt → Ready for any LLM
// ctx.sources → Source citations
// ctx.chunks → Number of chunks used

分块策略

const rag = new RAGPipeline(engine, {
  chunkStrategy: 'recursive',  // 'recursive' | 'sentence' | 'paragraph'
  chunkSize: 512,
  chunkOverlap: 50
});

______________________________________________________________________

🔒 多租户

零信任软隔离——租户永远看不到彼此的数据:

const tenantA = engine.tenant('shared-collection', 'acme_corp');
const tenantB = engine.tenant('shared-collection', 'globex_inc');

tenantA.insert([{ id: 'doc-1', vector: [...], metadata: { doc: 'Acme Plan' } }]);

// Tenant A queries — only sees Acme data. Always.
const results = tenantA.search(queryVec, { topK: 10 });

______________________________________________________________________

🔌 嵌入提供者

提供商设置尺寸成本
奥拉玛 (推荐)ollama pull nomic-embed-text768免费
开放人工智能设置 OPENAI_API_KEY1536约0.02美元/百万代币
模拟 (测试)64免费
// Ollama (local, free, private)
const fp = create({ embedder: 'ollama' });

// OpenAI
const fp = create({ embedder: 'openai', openaiConfig: { apiKey: 'sk-...' } });

// Mock (for demos/testing — no dependencies)
const fp = create({ embedder: 'mock' });

______________________________________________________________________

📊 基准测试

HNSW性能(128D矢量)

矢量插入搜索(第50页)QPS
100015ms0.2ms~5000
10000180毫秒0.3毫秒~3300
1000002.8秒0.5秒~2000

运行自己的:

npx fusionpact bench --count 10000

______________________________________________________________________

🆚 比较

功能融合效果页面索引松果体色度Qdrant
混合检索(向量+树+关键字)
基于推理的树索引
代理内存架构
多代理编排
MCP服务器(本机代理)
一键RAG
多租户
本地优先/零成本
HNSW矢量索引
零依赖

______________________________________________________________________

📖 API 参考

完整文档: docs/API.md文件

核心课程

类别描述
FusionEngine核心数据库引擎、集合管理、CRUD
HNSWIndexHNSW近似最近邻指数
TreeIndex用于推理检索的层次化文档索引
HybridRetriever基于秩融合的多策略检索
AgentMemory多类型代理存储系统
AgentOrchestrator多智能体协调层
RAGPipeline端到端RAG管道
MCPServer模型上下文协议服务器
OllamaEmbedderOllama植入物提供商
OpenAIEmbedderOpenAI嵌入提供商
MockEmbedder测试/演示嵌入器
LLMProvider多提供商LLM接口

______________________________________________________________________

🗺 路线图

  • \[x\] 具有可配置M/ef参数的HNSW索引
  • \[x\] 多租户,软隔离
  • \[x\] 一键式RAG管道
  • \[x\] Agent记忆(情景记忆、语义记忆、程序记忆、共享记忆)
  • \[x\] 多代理编排
  • \[x\] 树索引(基于推理的检索)
  • \[x\] 混合检索器(矢量+树+关键字融合)
  • \[x\] MCP服务器(标准输入+HTTP)
  • \[x\] HTTP API服务器
  • \[x\] Ollama+OpenAI嵌入提供商
  • \[x\] 自适应检索学习
  • \[\]SQLite/PPostgreSQL持久性
  • \[\]Python SDK(pip install fusionpact)
  • \[\]LangChain集成
  • \[\]LlamaIdex集成
  • \[\]CrewAI/AutoGen集成
  • \[\]视觉RAG(PDF页面图像)
  • \[\]Rust核心(NAPI绑定)
  • \[\]FusionAction云(托管)
  • \[\]仪表板用户界面

______________________________________________________________________

🤝 贡献

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

git clone https://github.com/FusionpactTech/fusionpact-vectordb.git
cd fusionpact-vectordb
npm install
npm test
npx fusionpact demo

______________________________________________________________________

📜 归因

FusionAction由以下人员构建和维护 FusionPact技术股份有限公司。

如果您在项目中使用FusionAct,请通过以下方式之一添加归因:

  • 在应用程序的关于页面或文档中包含“Powered by FusionAct”
  • 保持 NOTICE 分发中的文件
  • 在项目确认书中参考FusionPact Technologies股份有限公司

属性.md 了解全部细节。

许可证

Apache 2.0 --在商业和开源项目中自由使用。

Apache 2.0许可证要求您:

  1. 在任何重新分发中包含许可证副本
  2. 包括归属于FusionPact Technologies股份有限公司的通知文件。
  3. 说明您对代码所做的任何重大更改

______________________________________________________________________

内置于❤️ 通过 FusionPact技术股份有限公司。

⭐ 如果你觉得这个仓库有用,就把它标上!

目录标签

目录标签

AI代理本地优先JavaScriptClaude本地部署混合检索多代理系统RAG管道

支持客户端

Claude DesktopClaudeCursorWindsurf

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

fusionpact

工具数量(toolCount,工具数)

11

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP