Fusionpact Vectordb

io.github.atul-fusionpact由 GitHub 帳號 atul-fusionpact 發布v2.1.1更新於 Oct 24, 2026

Hybrid vector + reasoning retrieval, agent memory, multi-agent orchestration, MCP server, and RAG.

概覽

AI 產生的概覽

本機 MCP 伺服器,向 AI 助理提供 FusionPact 的向量、樹狀推理與關鍵字混合檢索、RAG 匯入及代理記憶工具。

可以做什麼
  • 建立並管理 HNSW 向量集合,執行語意向量搜尋
  • 執行融合向量、樹狀推理與關鍵字結果的混合檢索
  • 將文件匯入 RAG 流程,並產生附引用的 LLM 可用上下文
  • 儲存、回想、學習並共享情境、語意、程序與共享四類代理記憶
  • 管理對話串,並依需求刪除記憶
適用情境
適合需要讓助理跨工作階段保留持久記憶,或針對自有文件做附引用的混合檢索問答,且希望全部在本機執行、不依賴託管向量資料庫的情境。
執行需求
透過 npx fusionpact mcp 以本機程序執行,需要 Node.js 與 npm。環境變數 EMBEDDING_PROVIDER 可選 ollama(需本機 Ollama 與嵌入模型)、openai(需 OpenAI API 金鑰)或 mock 供測試。樹狀推理可選用本機 LLM 供應商。
安裝前請注意
記憶與文件內容由伺服器保存在本機;forget 工具會刪除記憶,請謹慎使用。選擇 openai 嵌入供應商會將文字傳送給 OpenAI 並依 token 計費。README 要求使用者在專案中標註來源資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Fusionpact Vectordb,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

⚡ FusionPact

The Agent-Native Retrieval Engine

Hybrid Vector + Reasoning + Memory for AI Agents

[License] [Node] [npm]

Similarity ≠ Relevance. FusionPact is the first retrieval engine that combines HNSW vector search, reasoning-based tree retrieval, and agent memory in a single platform — purpose-built for AI agents and multi-agent systems.

Quickstart · Hybrid Retrieval · Agent Memory · Multi-Agent · MCP Server · Tree Index · RAG Pipeline · API Reference · Benchmarks · Contributing


Why FusionPact?

Traditional vector databases retrieve what's similar. But similar ≠ relevant. Ask a vector DB for "Q3 2024 revenue" and you might get Q2 or Q4 data — semantically similar, but the wrong answer.

FusionPact solves this by combining three retrieval paradigms:

StrategyHow It WorksBest For
Vector Search (HNSW)Embedding similarity, O(log N)Broad search across large collections
Tree ReasoningLLM navigates document structurePrecise retrieval in structured documents
Keyword Search (BM25)Term frequency matchingExact match requirements

Plus purpose-built agent memory, multi-agent orchestration, and MCP server — all zero-dependency, local-first, and free.

┌──────────────────────────────────────────────────────────┐│             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.)         │   ││  └──────────────────────────────────────────────────┘   │└──────────────────────────────────────────────────────────┘

⚡ Quickstart

bash
# Installnpm install fusionpact
# Run the demonpx fusionpact demo
# Start HTTP + MCP servernpx fusionpact serve --port 8080
# Start MCP server for Claude Desktopnpx fusionpact mcp

10 Lines of Code

javascript
const { create } = require('fusionpact');
const fp = create({ embedder: 'ollama' }); // or 'mock' for zero-config
// Ingest a document — auto-chunks, embeds, indexesawait fp.rag.ingest('Your document text here...', { source: 'doc.pdf' });
// Hybrid search — vector + reasoning + keyword, fused automaticallyconst results = await fp.retriever.retrieve('What safety protocols exist?', {  collection: 'default',  strategy: 'hybrid'});
// Or build LLM-ready context directlyconst context = await fp.rag.buildContext('What safety protocols exist?');console.log(context.prompt); // Ready to paste into any LLM

🔀 Hybrid Retrieval Engine

The core differentiator: a single API that intelligently routes queries through multiple retrieval strategies and fuses results using Reciprocal Rank Fusion.

javascript
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 structureawait fp.treeIndex.indexDocument('annual-report', reportText, {  format: 'markdown'});
// Hybrid retrieval — automatically uses the best strategyconst 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

Strategy Weights

javascript
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  }});

Adaptive Learning

FusionPact learns which retrieval strategy works best for different query patterns:

javascript
// Record feedback on result qualityretriever.recordFeedback('financial query', 'tree', 0.95);retriever.recordFeedback('general search', 'vector', 0.85);
// Get recommended weights for a new queryconst weights = retriever.getAdaptiveWeights('new financial query');// → { vector: 0.25, tree: 0.6, keyword: 0.15 }

🌲 Tree Index

Reasoning-based retrieval for structured documents. Builds a hierarchical tree (like an intelligent table of contents) and uses LLM reasoning to navigate to the most relevant sections.

javascript
const { TreeIndex, LLMProvider } = require('fusionpact');
const llm = new LLMProvider({ provider: 'ollama' }); // Free, localconst tree = new TreeIndex({ llmProvider: llm });
// Index a documentawait tree.indexDocument('sec-filing', filingText, {  format: 'markdown',  metadata: { source: '10-K', year: 2024 }});
// Reasoning-based searchconst 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" }//   ]// }

Works Without LLM Too

If no LLM provider is configured, TreeIndex falls back to keyword-based tree traversal — still useful, just without the reasoning path:

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

🧠 Agent Memory

Purpose-built memory system for AI agents with four memory types:

Memory TypeWhat It StoresExample
EpisodicEvents, conversations, observations"User asked about Lab B chemical storage"
SemanticFacts, domain knowledge, learned info"OSHA 1910.106 covers flammable liquids"
ProceduralTool schemas, API specs, workflowssearch_incidents tool definition
SharedCross-agent knowledge pool"Customer ACME prefers ISO 14001"
javascript
const { create } = require('fusionpact');const fp = create({ embedder: 'ollama', enableMemory: true });
// Episodic — remember what happenedawait fp.memory.remember('agent-1', {  content: 'User prefers dark mode and concise answers',  role: 'system',  importance: 0.8});
// Semantic — learn knowledgeawait fp.memory.learn('agent-1',  'OSHA 29 CFR 1910 covers general industry safety standards.',  { source: 'regulations', category: 'compliance' });
// Procedural — register toolsawait 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 searchconst memories = await fp.memory.recall('agent-1', 'safety compliance');// → { episodic: [...], semantic: [...], procedural: [...], shared: [...] }
// Conversation memoryfp.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 forgetfp.memory.forget('agent-1', { type: 'all' });

🤖 Multi-Agent Orchestration

Coordinate multiple AI agents with isolated memory, shared knowledge, and message routing:

javascript
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 agentsorchestrator.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 communicationawait orchestrator.send({  from: 'researcher',  to: 'writer',  type: 'result',  payload: { findings: 'Safety incidents decreased 12% YoY...' }});
// Capability-based task delegationawait orchestrator.delegate('coordinator', 'Write a safety summary report', {  requiredCapabilities: ['writing', 'formatting']});// → Automatically routes to 'writer' agent
// Collaborative retrieval across all agentsconst results = await orchestrator.collaborativeRecall('safety compliance');// → Returns memories from all agents, plus shared knowledge
// Message handlingorchestrator.onMessage('writer', async (msg) => {  console.log(`Writer received: ${msg.type} from ${msg.from}`);  // Process task...});

🔌 MCP Server

FusionPact ships as an MCP (Model Context Protocol) server. Any AI agent (Claude, Cursor, Windsurf) can use it as persistent memory — no custom integration needed.

Claude Desktop Setup

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

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

Available MCP Tools

ToolDescription
fusionpact_create_collectionCreate HNSW-indexed vector collection
fusionpact_searchSemantic vector search
fusionpact_hybrid_searchHybrid retrieval (vector + tree + keyword)
fusionpact_rag_ingestOne-click RAG ingestion
fusionpact_rag_queryBuild LLM-ready context
fusionpact_memory_rememberStore episodic memory
fusionpact_memory_recallRecall relevant memories
fusionpact_memory_learnAdd semantic knowledge
fusionpact_memory_shareShare cross-agent knowledge
fusionpact_memory_forgetGDPR-style memory erasure
fusionpact_memory_conversationManage conversation threads

📄 RAG Pipeline

End-to-end RAG in one call:

javascript
const fp = require('fusionpact').create({ embedder: 'ollama' });
// Ingest — auto-chunks, embeds, indexesawait fp.rag.ingest(documentText, {  source: 'safety-manual.pdf',  title: 'Safety Manual 2024'});
// Build context for any LLMconst 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

Chunking Strategies

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

🔒 Multi-Tenancy

Zero-trust soft-isolation — tenants can never see each other's data:

javascript
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 });

🔌 Embedding Providers

ProviderSetupDimensionsCost
Ollama (recommended)ollama pull nomic-embed-text768Free
OpenAISet OPENAI_API_KEY1536~$0.02/1M tokens
Mock (testing)None64Free
javascript
// Ollama (local, free, private)const fp = create({ embedder: 'ollama' });
// OpenAIconst fp = create({ embedder: 'openai', openaiConfig: { apiKey: 'sk-...' } });
// Mock (for demos/testing — no dependencies)const fp = create({ embedder: 'mock' });

📊 Benchmarks

HNSW Performance (128D vectors)

VectorsInsertSearch (p50)QPS
1,00015ms0.2ms~5,000
10,000180ms0.3ms~3,300
100,0002.8s0.5ms~2,000

Run your own:

bash
npx fusionpact bench --count 10000

🆚 Comparison

FeatureFusionPactPageIndexPineconeChromaQdrant
Hybrid Retrieval (Vector+Tree+Keyword)✅❌❌❌❌
Reasoning-Based Tree Index✅✅❌❌❌
Agent Memory Architecture✅❌❌❌❌
Multi-Agent Orchestration✅❌❌❌❌
MCP Server (Agent-Native)✅✅❌❌❌
One-Click RAG✅❌❌❌❌
Multi-Tenancy✅❌✅❌✅
Local-First / Zero-Cost✅✅❌✅✅
HNSW Vector Index✅❌✅✅✅
Zero Dependencies✅❌❌❌❌

📖 API Reference

Full documentation: docs/API.md

Core Classes

ClassDescription
FusionEngineCore database engine, collection management, CRUD
HNSWIndexHNSW approximate nearest neighbor index
TreeIndexHierarchical document index for reasoning retrieval
HybridRetrieverMulti-strategy retrieval with rank fusion
AgentMemoryMulti-type agent memory system
AgentOrchestratorMulti-agent coordination layer
RAGPipelineEnd-to-end RAG pipeline
MCPServerModel Context Protocol server
OllamaEmbedderOllama embedding provider
OpenAIEmbedderOpenAI embedding provider
MockEmbedderTesting/demo embedder
LLMProviderMulti-provider LLM interface

🗺 Roadmap

  • HNSW indexing with configurable M/ef parameters
  • Multi-tenancy with soft-isolation
  • One-Click RAG pipeline
  • Agent Memory (episodic, semantic, procedural, shared)
  • Multi-agent orchestration
  • Tree Index (reasoning-based retrieval)
  • Hybrid Retriever (vector + tree + keyword fusion)
  • MCP server (stdio + HTTP)
  • HTTP API server
  • Ollama + OpenAI embedding providers
  • Adaptive retrieval learning
  • SQLite/PostgreSQL persistence
  • Python SDK (pip install fusionpact)
  • LangChain integration
  • LlamaIndex integration
  • CrewAI / AutoGen integration
  • Vision RAG (PDF page images)
  • Rust core (NAPI bindings)
  • FusionPact Cloud (managed hosting)
  • Dashboard UI

🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

bash
git clone https://github.com/FusionpactTech/fusionpact-vectordb.gitcd fusionpact-vectordbnpm installnpm testnpx fusionpact demo

📜 Attribution

FusionPact is built and maintained by FusionPact Technologies Inc.

If you use FusionPact in your project, please include attribution in one of the following ways:

  • Include "Powered by FusionPact" in your application's about page or documentation
  • Keep the NOTICE file in your distribution
  • Reference FusionPact Technologies Inc. in your project's acknowledgements

See ATTRIBUTION.md for full details.

License

Apache 2.0 — Use freely in commercial and open-source projects.

The Apache 2.0 license requires that you:

  1. Include a copy of the license in any redistribution
  2. Include the NOTICE file with attribution to FusionPact Technologies Inc.
  3. State any significant changes you made to the code

Built with ❤️ by FusionPact Technologies Inc.

⭐ Star this repo if you find it useful!

來源:README.md,提交 1233b44

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分