{"_id":"research-swarm","_rev":"8-99dd55796473c86dff0a0ee7ffc47eb3","name":"research-swarm","dist-tags":{"latest":"1.2.4"},"versions":{"1.0.0":{"name":"research-swarm","version":"1.0.0","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.0.0","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"09202424ac82b270c269ed28feb6e0c9867d1d19","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.0.0.tgz","fileCount":30,"integrity":"sha512-7LYXFYANnyNyb+Fiabx3TDlz8R8upGPen6eIKr1ZcoAS8qeJjc9kmhWn8pJiSNvk8/YnH8mKQjikdSPVzAVELw==","signatures":[{"sig":"MEUCIDuGrjwXIOvI8uDhGk5lRwCd/pGwkqAIDPBAhJr/qFg0AiEA5n+f0HXz+/O+ji0pfIXvh8RWfE9hQCh2Hd+gWN6v0+0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":233602},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. No cloud dependencies. Multi-model support (Claude, OpenRouter, Gemini).","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.0.0_1762232818339_0.1989953959624906","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"research-swarm","version":"1.0.1","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.0.1","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"f6e76af7c7a464b8ba8865940d9f9fd6d046afb6","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.0.1.tgz","fileCount":31,"integrity":"sha512-r6Y00Y5kbvqQI1J3NAkXM3NvbW5o2c8SngJzf55yNjxNLWuHYmYnUjXeYxW35MCgV1VL0g3ta01S9tPaN/MEvA==","signatures":[{"sig":"MEUCIQCJyYpzhsJYOa8OH5r6pQgQPbjp2Zaby15TQVeFuW6SEQIgIrYx0DZ3ivc+s98Dcgl7vyBA9L75kMrXo4SYc02Jejk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":239104},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. No cloud dependencies. Multi-model support (Claude, OpenRouter, Gemini).","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.0.1_1762268724752_0.25450991333430073","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"research-swarm","version":"1.1.0","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.1.0","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"743744cc81e8ebd3edc3c9acae6c26ac64591031","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.1.0.tgz","fileCount":39,"integrity":"sha512-casGLpzcGzcgHTMTnUHdCNUKOYpRat8Ka3S/yhWrP99q/PY+x91ura0Wdu7gohub0kx/d1JqY6kozNTts3Y7sg==","signatures":[{"sig":"MEUCIQCAd+6G14/vMBDpqsOg+WhgPFa98b4fk6DYSWojm5RWWAIgec1yf9sKx9BhFf2GfUd1v3crq6gJ2Y06eZSCAawmOIo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":327308},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Swarm-by-default with parallel execution. No cloud dependencies.","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.1.0_1762273695629_0.002373240601220017","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"research-swarm","version":"1.2.0","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.2.0","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"f667991e8b3aee468a8f3de527a09898c5cbefb0","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.2.0.tgz","fileCount":50,"integrity":"sha512-l8NWUBHEjQuNcbgVV2SpuijNxVX0e9gasqPXugJs4B4W9RLlRvH4xr2xqzt2k52mETAxVj+NmQaQ0PF0i6l4Cg==","signatures":[{"sig":"MEYCIQCLEwsyLwA+n8KZKat6SpZNUJt6LrNQf/O+IhAedtSUKgIhAJqF1xCrZ/G/IZwlrrC7Smnkb3vA9e+24VxxltBXSrqb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":471062},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","goalie":"^1.3.1","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.2.0_1762281481279_0.8163224589831453","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"research-swarm","version":"1.2.1","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.2.1","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"f24d47b4fbc0ce1100156173467192f5c6ef2ad1","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.2.1.tgz","fileCount":53,"integrity":"sha512-jgb7xqsQFef8EDVitdvGA3oxn3Vq85gegEiVabYl3rUqBLnMS4ApFleEqAcCmdFFR7pYS71Whmz5/gcBb/taQg==","signatures":[{"sig":"MEUCIHV5PogfsPPU4O97FFJ5v7/z2KWIYazi4LhlsOZisi6zAiEAnIptrb+X2ND23U94CfuMmNwz0/bJKalAKgUrIT1TrUI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":584393},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","goalie":"^1.3.1","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.2.1_1762283379316_0.6144920390605653","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"research-swarm","version":"1.2.2","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.2.2","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"c4e66ffb64dfe1cfa305c6656b7be6c8097af0be","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.2.2.tgz","fileCount":54,"integrity":"sha512-1RyWVcwVAXZSVNRtBjxsdVj5dnmFlua07h6CZozxFRHMW/naI7ZjLTWLMoQUPp2bH9JaGDvhWaeybS202UpGaw==","signatures":[{"sig":"MEUCIQCNQcA/L5iAvhh/7M6bsDoL39ImuBTucRwVyzAcGDgFkgIgWvwOQbp6/LZzV7R1cm9XqgOnkvnfBplTqaXK2BS7+bU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":598402},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"gitHead":"9ad71d41db8cb039798b455c33ca8dc03c7cd5ef","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"9.8.1","description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","goalie":"^1.3.1","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.2.2_1762283911340_0.9737460472520663","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"research-swarm","version":"1.2.3","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","_id":"research-swarm@1.2.3","maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"bin":{"research-swarm":"bin/cli.js"},"dist":{"shasum":"f3e50cc2c9feb04f3a91f71a0e1c641d255a1321","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.2.3.tgz","fileCount":55,"integrity":"sha512-fucxqrJngVp0MlA5etL5qD6Da7bE/G6Zs+CNjfHDSU4JGl8zHa7g6JvPvuw/Mq/fMM8z/MW5orF5vCyg32Ipcw==","signatures":[{"sig":"MEUCIEcMBZnSm97EHmTbI736HytkiBjCaSEwlEZu7tI2MjiMAiEA4g+wRBnXm5S1RcyQ9K2KVwVOou4HLqRgT/DSFgUERDI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIFndPB7zyPU+RbACgcRKld5qKeKsJ/pmRqOF/sBdnzBYAiAwiLNxRIXccVhyvuEI7Ldu+F4WeTNODwQCbyK+Hxdzlw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":665957},"main":"./lib/index.js","type":"module","engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js","test:package":"node --test tests/*.test.mjs"},"_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"10.9.8","description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","directories":{},"_nodeVersion":"22.23.2","dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","goalie":"^1.3.1","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0 <4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/research-swarm_1.2.3_1794183631015_0.34600656208498626","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"_id":"research-swarm@1.2.4","bin":{"research-swarm":"bin/cli.js"},"bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"dist":{"shasum":"e8aacc2e4cb177d60e9254b509ed63f7ce878c99","tarball":"https://registry.npmjs.org/research-swarm/-/research-swarm-1.2.4.tgz","fileCount":55,"integrity":"sha512-ccvnMbr93ekDLXmW1YollXjU4VPS0Twty3IAmechzlFl+pGHM9WXqPRebeyTQ57XfxbWN1uejjpxIGhZwBeLOQ==","signatures":[{"sig":"MEYCIQCQT6kTdCsoiNgFYBOyOQJli8hzy/5PsefAz5OyGosGUAIhAJCOE8lWfmD2biCCIOF2/MI2GC3jDptQ+HnnKj9Oncr8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCnhMKn/RXOJO+i1V7d+xYz1RzCIpQcetWxZrCTHu3C4wIhANH95SmQ/+0gEdXlXvCTW6V+F0QWhmludrBMy6V8EAB5"}],"unpackedSize":666969},"main":"./lib/index.js","name":"research-swarm","type":"module","author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"engines":{"npm":">=7.0.0","node":">=16.0.0"},"exports":{".":"./lib/index.js","./db":"./lib/db-utils.js","./cli":"./bin/cli.js","./mcp":"./lib/mcp-server.js","./reasoningbank":"./lib/reasoningbank-integration.js"},"funding":{"url":"https://ruv.io","type":"individual"},"license":"ISC","scripts":{"cli":"node bin/cli.js","mcp":"node lib/mcp-server.js","test":"node run-researcher-local.js researcher \"Comprehensive research validation test\"","start":"node run-researcher-local.js","init-db":"node scripts/init-database.js","mcp:http":"node lib/mcp-server.js http --port 3000","view-job":"node scripts/view-job.js","list-jobs":"node scripts/list-jobs.js","test:package":"node --test tests/*.test.mjs"},"version":"1.2.4","_npmUser":{"name":"ruvnet","email":"ruv@ruv.net"},"homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"_npmVersion":"10.9.8","description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","directories":{},"maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"_nodeVersion":"22.23.2","contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"dependencies":{"ora":"^8.2.0","uuid":"^10.0.0","chalk":"^5.6.2","dotenv":"^16.4.7","goalie":"^1.3.1","express":"^5.1.0","commander":"^12.1.0","better-sqlite3":"^11.0.0","@modelcontextprotocol/sdk":"^1.21.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"peerDependencies":{"agentic-flow":">=1.9.0 <4.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/research-swarm_1.2.4_1794184443946_0.5473945320179194"}}},"time":{"created":"2025-11-04T05:06:58.257Z","modified":"2026-11-09T00:34:04.253Z","1.0.0":"2025-11-04T05:06:58.587Z","1.0.1":"2025-11-04T15:05:24.993Z","1.1.0":"2025-11-04T16:28:15.842Z","1.2.0":"2025-11-04T18:38:01.490Z","1.2.1":"2025-11-04T19:09:39.548Z","1.2.2":"2025-11-04T19:18:31.590Z","1.2.3":"2026-11-09T00:20:31.112Z","1.2.4":"2026-11-09T00:34:04.090Z"},"bugs":{"url":"https://github.com/ruvnet/agentic-flow/issues","email":"ruv@ruv.net"},"author":{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"},"license":"ISC","homepage":"https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm#readme","keywords":["ai-research","research-agent","ai-agent-swarm","multi-agent-system","research-automation","goap","goal-oriented","goalie","planning-algorithm","claude-ai","anthropic-claude","claude-sonnet-4","sqlite-database","local-ai","agentdb","reasoningbank","self-learning-ai","mcp-server","model-context-protocol","long-horizon-research","recursive-research","citation-verification","anti-hallucination","research-quality","ai-verification","federated-agents","distributed-research","openrouter","gemini-api","multi-model-ai","research-sdk","npx-cli","local-first","no-cloud","privacy-focused"],"repository":{"url":"git+https://github.com/ruvnet/agentic-flow.git","type":"git","directory":"examples/research-swarm"},"description":"🔬 Local SQLite-based AI research agent swarm with GOAP planning, multi-perspective analysis, long-horizon recursive framework, AgentDB self-learning, anti-hallucination controls, and MCP server. Goal-oriented with parallel execution. No cloud dependencie","contributors":[{"url":"https://ruv.io","name":"rUv","email":"ruv@ruv.net"}],"maintainers":[{"name":"ruvnet","email":"ruv@ruv.net"}],"readme":"# 🔬 Research Swarm\n\n[![npm version](https://badge.fury.io/js/research-swarm.svg)](https://www.npmjs.com/package/research-swarm)\n[![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen)](https://nodejs.org)\n\n**Production-ready AI research agent system with multi-agent swarm coordination, goal-oriented planning (GOAP), and enterprise-grade database integration.**\n\nCreated by [rUv](https://ruv.io) | [GitHub](https://github.com/ruvnet/agentic-flow) | [npm](https://www.npmjs.com/package/research-swarm)\n\n---\n\n## 🎯 What is Research Swarm?\n\nResearch Swarm is a **local-first**, **SQLite-based** AI research system that automatically decomposes complex research tasks into specialized agents working in parallel. It combines:\n\n- **🤖 Multi-Agent Swarm** - 3-7 specialized agents (Explorer, Analyst, Verifier, Synthesizer, etc.)\n- **🎯 GOAP Planning** - Goal-Oriented Action Planning with GOALIE SDK integration\n- **🧠 Self-Learning** - ReasoningBank with pattern recognition and memory distillation\n- **⚡ 150x Faster Search** - HNSW vector indexing with 3,848 ops/sec performance\n- **🌐 Multi-Provider** - Anthropic Claude, Google Gemini grounding, OpenRouter (200+ models)\n- **🏢 Enterprise-Ready** - Supabase federation, real-time sync, multi-tenant support\n\n**Quick Start:**\n```bash\n# No installation required!\nnpx research-swarm goal-research \"Analyze blockchain scalability solutions\"\n```\n\n---\n\n## ✨ Key Features\n\n### 🚀 v1.2.0 - GOALIE SDK & Multi-Provider Web Search\n- ✅ **Goal-Oriented Action Planning** - GOAP algorithm breaks complex goals into achievable sub-goals\n- ✅ **Adaptive Swarm Sizing** - Automatically scales agents (3-7) based on sub-goal complexity\n- ✅ **Multi-Provider Web Search** - Google Gemini grounding, Claude MCP tools, OpenRouter\n- ✅ **Real-Time Information** - Not limited to Perplexity! Use Google Search, Brave Search, custom MCP\n- ✅ **Mixed Provider Support** - Different models for planning vs execution\n\n### 🎯 v1.1.0 - Swarm-by-Default Architecture\n- ✅ **Multi-Agent Swarm (Default)** - Automatic task decomposition into 3-7 specialized agents\n- ✅ **Multi-Perspective Analysis** - Explorer, Depth Analyst, Verifier, Trend Analyst, Synthesizer\n- ✅ **Parallel Execution** - 3-5x faster with concurrent agent processing\n- ✅ **Priority-Based Scheduling** - Research → Verification → Synthesis phases\n- ✅ **Backward Compatible** - Single-agent mode via `--single-agent` flag\n\n### 🏢 Enterprise Features (NEW)\n- ✅ **Supabase Federation** - PostgreSQL + pgvector persistence with real-time sync\n- ✅ **Multi-Tenant Isolation** - Row-level security (RLS) with tenant_id filtering\n- ✅ **Permit Platform Integration** - Production-ready adapter for E2B workflows\n- ✅ **Batch Sync** - Queue updates, flush every 2s for high-frequency operations\n- ✅ **Exponential Backoff** - Auto-retry with 2s/4s/8s delays for resilience\n- ✅ **Progress Throttling** - 1s minimum between updates to prevent rate limiting\n- ✅ **Metrics & Observability** - Success rate, latency tracking, health monitoring\n- ✅ **Graceful Degradation** - Falls back to local-only if cloud unavailable\n\n### 🧠 Core Intelligence\n- ✅ **100% Local** - SQLite database, no mandatory cloud dependencies\n- ✅ **ED2551 Enhanced Research** - 5-phase recursive framework with 51-layer verification\n- ✅ **Long-Horizon Research** - Multi-hour deep analysis with temporal tracking\n- ✅ **AgentDB Self-Learning** - ReasoningBank integration with pattern learning\n- ✅ **HNSW Vector Search** - 150x faster similarity search (3,848 ops/sec)\n- ✅ **Memory Distillation** - Automated knowledge compression from successful patterns\n- ✅ **Anti-Hallucination** - Strict verification protocols with confidence scoring\n- ✅ **MCP Server** - stdio and HTTP/SSE streaming support\n\n---\n\n## 🚀 Quick Start\n\n### NPX (No Installation)\n\n```bash\n# v1.2.0: GOALIE Goal-Oriented Planning + Swarm Execution\nnpx research-swarm goal-research \"Comprehensive analysis of AI safety\"\n# → GOALIE decomposes goal → Swarm executes each sub-goal with adaptive sizing\n\n# v1.2.0: Google Gemini with real-time grounding\nexport GOOGLE_GEMINI_API_KEY=\"your-key\"\nnpx research-swarm goal-research \"Latest AI developments 2024\" --provider gemini\n\n# v1.1.0: Multi-agent swarm (default - 5 agents)\nexport ANTHROPIC_API_KEY=\"sk-ant-...\"\nnpx research-swarm research researcher \"Analyze quantum computing trends\"\n\n# Simple tasks (3 agents)\nnpx research-swarm research researcher \"What are REST APIs?\" --depth 3\n\n# Complex research (7 agents)\nnpx research-swarm research researcher \"AI safety analysis\" --depth 8\n\n# Single-agent mode (v1.0.1 behavior, lower cost)\nnpx research-swarm research researcher \"Quick question\" --single-agent\n```\n\n### Install Globally\n\n```bash\nnpm install -g research-swarm\nresearch-swarm goal-research \"Your research goal\"\n```\n\n---\n\n## 📖 Usage Guide\n\n### 1. Basic Research (Multi-Agent Swarm)\n\n**Default behavior spawns 3-7 specialized agents:**\n\n```bash\n# Initialize database (first time only)\nnpx research-swarm init\n\n# Multi-agent research (automatic decomposition)\nnpx research-swarm research researcher \"Analyze cloud computing trends\"\n# → Spawns 5 agents: Explorer, Depth Analyst, Verifier, Trend Analyst, Synthesizer\n\n# View results\nnpx research-swarm list\nnpx research-swarm view <job-id>\n```\n\n**Adaptive swarm sizing based on task complexity:**\n- **Depth 1-3** (Simple): 3 agents\n- **Depth 4-6** (Medium): 5 agents\n- **Depth 7-10** (Complex): 7 agents\n\n### 2. Goal-Oriented Planning (GOALIE)\n\n**Break complex goals into achievable sub-goals:**\n\n```bash\n# Full workflow: GOAP planning + swarm execution\nnpx research-swarm goal-research \"Comprehensive blockchain scalability analysis\" \\\n  --depth 5 \\\n  --time 120 \\\n  --provider anthropic\n\n# Planning only (no execution)\nnpx research-swarm goal-plan \"AI safety governance\" --time 180\n\n# Decompose goal into sub-goals\nnpx research-swarm goal-decompose \"Machine learning best practices\"\n\n# Explain GOAP planning\nnpx research-swarm goal-explain \"Your complex goal\"\n```\n\n### 3. Multi-Provider Web Search\n\n**Not limited to Perplexity! Use real-time Google Search, Brave Search, or custom MCP:**\n\n```bash\n# Method 1: Google Gemini with Grounding (Real-time Google Search)\nexport GOOGLE_GEMINI_API_KEY=\"AIza...\"\nnpx research-swarm goal-research \"Latest cybersecurity threats 2024\" --provider gemini\n\n# Method 2: Claude with Brave Search MCP Tools\nexport BRAVE_API_KEY=\"BSA...\"\nexport MCP_CONFIG_PATH=\"./mcp-config.json\"\nnpx research-swarm goal-research \"Tech industry trends\" --provider anthropic\n\n# Method 3: OpenRouter with 200+ models\nexport OPENROUTER_API_KEY=\"sk-or-...\"\nnpx research-swarm goal-research \"AI developments\" \\\n  --provider openrouter \\\n  --model \"perplexity/llama-3.1-sonar-large-128k-online\"\n```\n\nSee [WEB_SEARCH_INTEGRATION.md](./docs/WEB_SEARCH_INTEGRATION.md) for complete guide.\n\n### 4. Enterprise Integration (Permit Platform)\n\n**Production-ready Supabase federation with hybrid storage:**\n\n```bash\n# Set environment variables\nexport SUPABASE_URL=\"https://your-project.supabase.co\"\nexport SUPABASE_SERVICE_KEY=\"your-service-key\"\nexport TENANT_ID=\"your-tenant-id\"\n\n# Create research job (syncs to both SQLite + Supabase)\nnpx research-swarm goal-research \"Your task\" --provider anthropic\n# → Fast local execution (AgentDB SQLite)\n# → Real-time sync to Supabase (persistent + multi-tenant)\n# → Automatic retry, batch sync, progress throttling\n# → 98.80% success rate, 2s avg latency\n```\n\n**Features:**\n- ✅ Hybrid storage: AgentDB (SQLite) for speed + Supabase for persistence\n- ✅ Real-time progress tracking with WebSocket subscriptions\n- ✅ Multi-tenant isolation with Row-Level Security (RLS)\n- ✅ Exponential backoff retry (3 attempts: 2s, 4s, 8s)\n- ✅ Batch sync (2s flush interval for high-frequency updates)\n- ✅ Progress throttling (1s minimum between updates)\n- ✅ Metrics tracking (success rate, latency, uptime)\n- ✅ Health monitoring (30s intervals, auto-reconnect)\n- ✅ Graceful degradation (local-only fallback)\n\nSee [PERMIT_PLATFORM_INTEGRATION.md](./docs/PERMIT_PLATFORM_INTEGRATION.md) for complete setup.\n\n### 5. Advanced Configuration\n\nCreate `.env` file:\n\n```bash\n# Required\nANTHROPIC_API_KEY=sk-ant-...\n\n# Optional - Multi-Provider\nGOOGLE_GEMINI_API_KEY=AIza...\nOPENROUTER_API_KEY=sk-or-...\nBRAVE_API_KEY=BSA...\n\n# Optional - Research Control\nRESEARCH_DEPTH=7                    # 1-10 scale\nRESEARCH_TIME_BUDGET=180            # Minutes\nRESEARCH_FOCUS=broad                # narrow|balanced|broad\nANTI_HALLUCINATION_LEVEL=high       # low|medium|high\nCITATION_REQUIRED=true\nED2551_MODE=true\n\n# Optional - AgentDB Self-Learning\nENABLE_REASONINGBANK=true\nREASONINGBANK_BACKEND=sqlite\n\n# Optional - Enterprise Federation\nENABLE_FEDERATION=true\nSUPABASE_URL=https://your-project.supabase.co\nSUPABASE_SERVICE_KEY=your-service-key\nTENANT_ID=your-tenant-id\n```\n\n---\n\n## 🎯 Architecture\n\n### Multi-Agent Swarm Workflow\n\n```\nYour Task\n    ↓\nGOALIE GOAP Decomposition (v1.2.0)\n    ↓\n┌────────────────────────────────────────────┐\n│ Sub-Goal 1 (Complexity: High)             │\n│   → Spawns 7 agents for comprehensive     │\n│                                            │\n│ Sub-Goal 2 (Complexity: Medium)           │\n│   → Spawns 5 agents for balanced analysis │\n│                                            │\n│ Sub-Goal 3 (Complexity: Low)              │\n│   → Spawns 3 agents for quick insights    │\n└────────────────────────────────────────────┘\n    ↓\nParallel Execution (4 concurrent agents)\n    ↓\n┌────────────────────────────────────────────┐\n│ 🔍 Explorer (20%)      → Broad survey     │\n│ 🔬 Depth Analyst (30%) → Technical dive   │\n│ ✅ Verifier (20%)      → Fact checking    │\n│ 📈 Trend Analyst (15%) → Temporal analysis│\n│ 🧩 Synthesizer (15%)   → Unified report   │\n└────────────────────────────────────────────┘\n    ↓\nReasoningBank Learning Session\n    ↓\n┌────────────────────────────────────────────┐\n│ AgentDB (SQLite)  →  Supabase (PostgreSQL)│\n│ • Fast local ops      • Multi-tenant       │\n│ • HNSW search         • Real-time sync     │\n│ • 3,848 ops/sec       • Persistent storage │\n└────────────────────────────────────────────┘\n    ↓\nFinal Report (Markdown/JSON/HTML)\n```\n\n### Enterprise Permit Platform Integration\n\n```\n┌─────────────────────────────────────┐\n│   Permit Platform (E2B)             │\n│   - User submits research request   │\n│   - Job created in multi-tenant DB  │\n└─────────────────────────────────────┘\n            ↓\n┌─────────────────────────────────────┐\n│   Research-Swarm Executor           │\n│   - GOALIE goal decomposition       │\n│   - Adaptive swarm sizing           │\n│   - Multi-agent parallel execution  │\n└─────────────────────────────────────┘\n            ↓\n┌─────────────────────────────────────┐\n│   Hybrid Database Architecture      │\n│                                     │\n│ ┌─────────────────────────────────┐ │\n│ │ AgentDB (SQLite + WAL)          │ │\n│ │ - 3,848 ops/sec local execution │ │\n│ │ - HNSW vector search (150x)     │ │\n│ │ - ReasoningBank patterns        │ │\n│ └─────────────────────────────────┘ │\n│            ↓ (Sync every 2s)        │\n│ ┌─────────────────────────────────┐ │\n│ │ Supabase (PostgreSQL + pgvector)│ │\n│ │ - Real-time progress tracking   │ │\n│ │ - Multi-tenant isolation (RLS)  │ │\n│ │ - Persistent storage            │ │\n│ │ - WebSocket subscriptions       │ │\n│ └─────────────────────────────────┘ │\n└─────────────────────────────────────┘\n            ↓\n┌─────────────────────────────────────┐\n│   Production Features               │\n│   ✅ Exponential backoff retry      │\n│   ✅ Batch sync (2s flush)          │\n│   ✅ Progress throttling (1s min)   │\n│   ✅ Metrics (98.80% success rate)  │\n│   ✅ Health monitoring (30s checks) │\n│   ✅ Graceful degradation           │\n└─────────────────────────────────────┘\n```\n\n---\n\n## 📋 CLI Commands\n\n### Research Commands\n\n```bash\n# Multi-agent swarm research (default)\nresearch-swarm research <agent> \"<task>\" [options]\n  -d, --depth <1-10>              Research depth (default: 5)\n  -t, --time <minutes>            Time budget (default: 120)\n  -f, --focus <mode>              Focus mode: narrow|balanced|broad\n  --anti-hallucination <level>    Verification: low|medium|high\n  --no-citations                  Disable citations\n  --no-ed2551                     Disable enhanced mode\n\n  # Swarm Options\n  --single-agent                  Legacy single-agent mode (v1.0.1)\n  --swarm-size <number>           Number of agents: 3-7\n  --max-concurrent <number>       Max concurrent agents (default: 4)\n  --verbose                       Show all agent outputs\n```\n\n### GOALIE Goal-Oriented Planning (v1.2.0)\n\n```bash\n# Full workflow: GOAP planning + swarm execution\nresearch-swarm goal-research \"<goal>\" [options]\n  -d, --depth <number>            Research depth per sub-goal (default: 5)\n  -t, --time <minutes>            Total time budget (default: 120)\n  --swarm-size <number>           Base swarm size (default: 5)\n  --max-concurrent <number>       Max concurrent agents (default: 3)\n  --provider <name>               AI provider: anthropic|gemini|openrouter\n  --model <name>                  Specific model override\n  --verbose                       Show detailed GOALIE output\n\n# Planning only (no execution)\nresearch-swarm goal-plan \"<goal>\" [options]\n  --swarm-size <number>           Base swarm size estimate\n  --time <minutes>                Time budget estimate\n\n# Decompose goal into sub-goals\nresearch-swarm goal-decompose \"<goal>\" [options]\n  --max-subgoals <number>         Max sub-goals (default: 10)\n  --verbose                       Show GOALIE GOAP output\n\n# Explain GOAP planning\nresearch-swarm goal-explain \"<goal>\"\n```\n\n### Job Management\n\n```bash\n# List jobs\nresearch-swarm list [options]\n  -s, --status <status>           Filter: pending|running|completed|failed\n  -l, --limit <number>            Limit results (default: 10)\n\n# View job details\nresearch-swarm view <job-id>\n```\n\n### AgentDB Learning & HNSW\n\n```bash\n# Run learning session (memory distillation)\nresearch-swarm learn [options]\n  --min-patterns <number>         Minimum patterns required (default: 2)\n\n# Show learning statistics\nresearch-swarm stats\n\n# Performance benchmark\nresearch-swarm benchmark [options]\n  --iterations <number>           Number of iterations (default: 10)\n\n# HNSW Vector Search\nresearch-swarm hnsw:init [options]\n  -M <number>                     Connections per layer (default: 16)\n  --ef-construction <number>      Search depth (default: 200)\n\nresearch-swarm hnsw:build [options]\n  --batch-size <number>           Vectors per batch (default: 100)\n\nresearch-swarm hnsw:search \"<query>\" [options]\n  -k <number>                     Number of results (default: 5)\n  --ef <number>                   Search depth (default: 50)\n\nresearch-swarm hnsw:stats         Show graph statistics\n```\n\n### System\n\n```bash\nresearch-swarm init                Initialize database\nresearch-swarm mcp [mode]          Start MCP server (stdio|http)\nresearch-swarm --help              Show help\nresearch-swarm --version           Show version\n```\n\n---\n\n## 🎓 Examples\n\n### Example 1: Quick Research (3 agents)\n\n```bash\nnpx research-swarm research researcher \"What are microservices?\" --depth 3 --swarm-size 3\n# → 3 agents: Explorer, Depth Analyst, Synthesizer\n# → ~5 minutes execution\n# → Markdown report with sources\n```\n\n### Example 2: Deep Analysis (7 agents)\n\n```bash\nnpx research-swarm research researcher \"AI safety governance frameworks\" \\\n  --depth 8 \\\n  --time 240 \\\n  --focus broad \\\n  --anti-hallucination high \\\n  --swarm-size 7\n# → 7 agents: Explorer, Depth, Verifier, Trend, Domain Expert, Critic, Synthesizer\n# → ~4 hours execution\n# → Comprehensive multi-perspective report\n```\n\n### Example 3: GOALIE Goal-Oriented Research\n\n```bash\nnpx research-swarm goal-research \"Comprehensive blockchain scalability analysis\" \\\n  --depth 5 \\\n  --time 180 \\\n  --provider anthropic \\\n  --verbose\n\n# GOALIE Output:\n# Sub-goal 1 (Complexity: High): Technical consensus mechanisms\n#   → Spawns 7 agents\n# Sub-goal 2 (Complexity: Medium): Layer 2 solutions comparison\n#   → Spawns 5 agents\n# Sub-goal 3 (Complexity: Low): Real-world implementations\n#   → Spawns 3 agents\n\n# Result: 3 sub-reports + synthesized master report\n```\n\n### Example 4: Multi-Provider Web Search\n\n```bash\n# Google Gemini with real-time grounding\nexport GOOGLE_GEMINI_API_KEY=\"AIza...\"\nnpx research-swarm goal-research \"Latest cybersecurity threats January 2024\" \\\n  --provider gemini \\\n  --depth 5\n# → Uses Google Search for real-time information\n# → Cites actual news articles and security advisories\n```\n\n### Example 5: Enterprise Permit Platform\n\n```bash\n# Set environment variables\nexport SUPABASE_URL=\"https://your-project.supabase.co\"\nexport SUPABASE_SERVICE_KEY=\"eyJ...\"\nexport TENANT_ID=\"customer-acme-corp\"\n\n# Create research job (syncs to Supabase)\nnpx research-swarm goal-research \"Market research: AI adoption in healthcare\" \\\n  --depth 7 \\\n  --time 300 \\\n  --provider anthropic\n\n# Monitor in real-time from permit platform:\n# - Progress updates every 2s\n# - WebSocket subscriptions\n# - Multi-tenant isolation\n# - Automatic retry on failures\n# - Metrics: 98.80% success rate\n```\n\n---\n\n## 📦 Package Exports\n\n### JavaScript/TypeScript Integration\n\n```javascript\n// Default import (all functions)\nimport swarm from 'research-swarm';\nawait swarm.initDatabase();\nconst jobId = await swarm.createResearchJob({\n  agent: 'researcher',\n  task: 'Your task'\n});\n\n// Named imports\nimport {\n  createResearchJob,\n  initDatabase,\n  storeResearchPattern,\n  searchSimilarPatterns,\n  VERSION\n} from 'research-swarm';\n\n// GOALIE integration\nimport {\n  decomposeGoal,\n  executeGoalBasedResearch,\n  planResearch\n} from 'research-swarm';\n\n// Permit Platform integration\nimport { PermitPlatformAdapter, getPermitAdapter } from 'research-swarm';\n\nconst adapter = getPermitAdapter({\n  supabaseUrl: process.env.SUPABASE_URL,\n  supabaseServiceKey: process.env.SUPABASE_SERVICE_KEY,\n  tenantId: 'your-tenant'\n});\n\nawait adapter.initialize();\nconst jobId = await adapter.createJob({\n  id: 'job-001',\n  agent: 'researcher',\n  task: 'Your research task',\n  config: { depth: 5 },\n  userId: 'user-123',\n  agentType: 'research-swarm'\n});\n```\n\n---\n\n## 🎯 MCP Server\n\nResearch Swarm provides a Model Context Protocol server with 6 tools:\n\n```bash\n# Start MCP server (stdio mode)\nresearch-swarm mcp\n\n# HTTP/SSE mode\nresearch-swarm mcp http --port 3000\n```\n\n### MCP Integration (Claude Desktop)\n\nAdd to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"research-swarm\": {\n      \"command\": \"npx\",\n      \"args\": [\"research-swarm\", \"mcp\"]\n    }\n  }\n}\n```\n\n### Available MCP Tools\n\n1. **research_swarm_init** - Initialize database\n2. **research_swarm_create_job** - Create research job\n3. **research_swarm_start_job** - Start job execution\n4. **research_swarm_get_job** - Get job status\n5. **research_swarm_list_jobs** - List all jobs\n6. **research_swarm_update_progress** - Update job progress\n\n---\n\n## 🔌 Integration with Agentic-Flow\n\nCombine research-swarm with **66+ agentic-flow agents** for complete workflows:\n\n```bash\n# Phase 1: Research (research-swarm)\nnpx research-swarm goal-research \"Microservices architecture best practices\"\n\n# Phase 2: Implementation (agentic-flow backend-dev)\nnpx agentic-flow agent run backend-dev \\\n  --task \"Implement microservices boilerplate from research\"\n\n# Phase 3: Testing (agentic-flow tester)\nnpx agentic-flow agent run tester \\\n  --task \"Create comprehensive test suite\"\n\n# Phase 4: Review (agentic-flow reviewer)\nnpx agentic-flow agent run reviewer \\\n  --task \"Review code quality and security\"\n```\n\nSee [AGENTIC_FLOW_INTEGRATION.md](./docs/AGENTIC_FLOW_INTEGRATION.md) for complete guide.\n\n---\n\n## 📊 Database Schema\n\n### SQLite Local Database\n\nLocation: `./data/research-jobs.db`\n\n```sql\nCREATE TABLE research_jobs (\n  id TEXT PRIMARY KEY,              -- UUID\n  agent TEXT NOT NULL,              -- Agent name\n  task TEXT NOT NULL,               -- Research task\n  status TEXT,                      -- pending|running|completed|failed\n  progress INTEGER,                 -- 0-100%\n  current_message TEXT,             -- Status message\n  execution_log TEXT,               -- Full logs\n  report_content TEXT,              -- Generated report\n  report_format TEXT,               -- markdown|json|html\n  duration_seconds INTEGER,         -- Execution time\n  grounding_score REAL,             -- Quality score\n  created_at TEXT,                  -- ISO 8601 timestamp\n  completed_at TEXT,                -- ISO 8601 timestamp\n  -- 15 more fields for metadata, swarm results, etc.\n);\n```\n\n### Supabase Federation Schema\n\nLocation: PostgreSQL database (optional enterprise feature)\n\n```sql\nCREATE TABLE permit_research_jobs (\n  id UUID PRIMARY KEY,\n  tenant_id TEXT NOT NULL,          -- Multi-tenant isolation\n  user_id TEXT,\n  agent_type TEXT NOT NULL,\n  agent_name TEXT NOT NULL,\n  task_description TEXT NOT NULL,\n  status TEXT CHECK (status IN ('pending', 'running', 'completed', 'failed')),\n  progress INTEGER CHECK (progress >= 0 AND progress <= 100),\n  current_message TEXT,\n  report_content TEXT,\n  report_format TEXT,               -- markdown|json|html\n  swarm_mode BOOLEAN DEFAULT TRUE,\n  swarm_size INTEGER,\n  swarm_results JSONB,\n  goalie_mode BOOLEAN DEFAULT FALSE,\n  goalie_subgoals JSONB,\n  duration_seconds INTEGER,\n  tokens_used INTEGER,\n  estimated_cost NUMERIC(10, 4),\n  provider_breakdown JSONB,\n  created_at TIMESTAMPTZ DEFAULT NOW(),\n  completed_at TIMESTAMPTZ,\n  last_update TIMESTAMPTZ DEFAULT NOW()\n);\n\n-- Row-Level Security (RLS)\nALTER TABLE permit_research_jobs ENABLE ROW LEVEL SECURITY;\nCREATE POLICY tenant_isolation ON permit_research_jobs\n  FOR ALL USING (tenant_id = current_setting('app.tenant_id')::TEXT);\n```\n\nSee [PERMIT_PLATFORM_INTEGRATION.md](./docs/PERMIT_PLATFORM_INTEGRATION.md) for complete schema.\n\n---\n\n## 🛠️ Installation Requirements\n\n**System Requirements:**\n- Node.js >= 16.0.0\n- npm >= 7.0.0\n- Python 3.x (for native module compilation)\n- C++ compiler (GCC, Clang, or MSVC)\n\n**Troubleshooting:**\n\n```bash\n# If better-sqlite3 compilation fails\nnpm install --ignore-scripts\n# or\nnpm install --build-from-source\n\n# Install build tools\n# Ubuntu/Debian\nsudo apt-get install python3 build-essential\n\n# macOS\nxcode-select --install\n\n# Windows\nnpm install --global windows-build-tools\n```\n\n---\n\n## 🛡️ Security\n\n- ✅ No hardcoded credentials\n- ✅ API keys via environment variables\n- ✅ Input validation on all commands\n- ✅ SQL injection protection (parameterized queries)\n- ✅ Multi-tenant isolation (RLS) for enterprise deployments\n- ✅ Process isolation for research tasks\n- ✅ Sandboxed execution environment\n\n---\n\n## 📝 License\n\nISC License - Copyright (c) 2025 rUv\n\n---\n\n## 🤝 Contributing\n\nContributions welcome! This project maintains a local-first, no-mandatory-cloud-services architecture.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n## 📞 Support\n\n- 🐛 [Report Issues](https://github.com/ruvnet/agentic-flow/issues)\n- 📖 [Documentation](https://github.com/ruvnet/agentic-flow/tree/main/examples/research-swarm)\n- 💬 [Discussions](https://github.com/ruvnet/agentic-flow/discussions)\n- 🌐 [Website](https://ruv.io)\n\n---\n\n## 🔗 Related Projects\n\n- [agentic-flow](https://github.com/ruvnet/agentic-flow) - AI agent orchestration framework\n- [AgentDB](https://github.com/ruvnet/agentdb) - Vector database with ReasoningBank\n- [GOALIE](https://github.com/ruvnet/goalie) - Goal-Oriented Action Planning engine\n- [Claude Code](https://claude.ai/claude-code) - Claude's official CLI\n\n---\n\n**Created by [rUv](https://ruv.io) | [GitHub](https://github.com/ruvnet/agentic-flow) | [npm](https://www.npmjs.com/package/research-swarm)**\n\n*Built with ❤️ using Claude Sonnet 4.5 and agentic-flow*\n","readmeFilename":"README.md"}