behive 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {behive-0.1.0 → behive-0.2.0}/PKG-INFO +286 -102
- behive-0.1.0/src/behive.egg-info/PKG-INFO → behive-0.2.0/README.md +261 -140
- {behive-0.1.0 → behive-0.2.0}/pyproject.toml +29 -3
- {behive-0.1.0 → behive-0.2.0}/src/behive/__init__.py +1 -1
- behive-0.2.0/src/behive/cli.py +286 -0
- {behive-0.1.0 → behive-0.2.0}/src/behive/client.py +2 -2
- behive-0.2.0/src/behive/compat/__init__.py +10 -0
- behive-0.2.0/src/behive/compat/shims.py +81 -0
- behive-0.2.0/src/behive/config.py +327 -0
- behive-0.2.0/src/behive/engine/__init__.py +49 -0
- behive-0.2.0/src/behive/engine/__main__.py +16 -0
- behive-0.2.0/src/behive/engine/api_scout.py +690 -0
- behive-0.2.0/src/behive/engine/bionic_quorum.py +311 -0
- behive-0.2.0/src/behive/engine/db.py +321 -0
- behive-0.2.0/src/behive/engine/domain_reputation.py +457 -0
- behive-0.2.0/src/behive/engine/drones.py +981 -0
- behive-0.2.0/src/behive/engine/events.py +436 -0
- behive-0.2.0/src/behive/engine/guardrail.py +434 -0
- behive-0.2.0/src/behive/engine/harvest.py +1167 -0
- behive-0.2.0/src/behive/engine/orchestrator.py +2000 -0
- behive-0.2.0/src/behive/engine/preprocessor.py +244 -0
- behive-0.2.0/src/behive/engine/prescout.py +1422 -0
- behive-0.2.0/src/behive/engine/process.py +2273 -0
- behive-0.2.0/src/behive/engine/quality.py +275 -0
- behive-0.2.0/src/behive/engine/queen_calibrator.py +758 -0
- behive-0.2.0/src/behive/engine/queen_fact_mem.py +642 -0
- behive-0.2.0/src/behive/engine/queen_memory.py +38 -0
- behive-0.2.0/src/behive/engine/queen_primer.py +369 -0
- behive-0.2.0/src/behive/engine/scout.py +750 -0
- behive-0.2.0/src/behive/engine/synth.py +2049 -0
- behive-0.2.0/src/behive/mcp_server.py +235 -0
- behive-0.2.0/src/behive/server.py +390 -0
- behive-0.1.0/README.md → behive-0.2.0/src/behive.egg-info/PKG-INFO +324 -100
- behive-0.2.0/src/behive.egg-info/SOURCES.txt +40 -0
- behive-0.2.0/src/behive.egg-info/requires.txt +50 -0
- behive-0.2.0/tests/test_smoke.py +144 -0
- behive-0.1.0/src/behive/cli.py +0 -68
- behive-0.1.0/src/behive.egg-info/SOURCES.txt +0 -13
- behive-0.1.0/src/behive.egg-info/requires.txt +0 -23
- {behive-0.1.0 → behive-0.2.0}/LICENSE +0 -0
- {behive-0.1.0 → behive-0.2.0}/setup.cfg +0 -0
- {behive-0.1.0 → behive-0.2.0}/src/behive/models.py +0 -0
- {behive-0.1.0 → behive-0.2.0}/src/behive.egg-info/dependency_links.txt +0 -0
- {behive-0.1.0 → behive-0.2.0}/src/behive.egg-info/entry_points.txt +0 -0
- {behive-0.1.0 → behive-0.2.0}/src/behive.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: behive
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Research engine that builds structured knowledge graphs from any topic
|
|
5
5
|
Author-email: QA10 <hello@qa10.io>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -23,6 +23,28 @@ Requires-Dist: boto3>=1.28
|
|
|
23
23
|
Requires-Dist: psycopg2-binary>=2.9
|
|
24
24
|
Requires-Dist: pydantic>=2.0
|
|
25
25
|
Requires-Dist: httpx>=0.25
|
|
26
|
+
Requires-Dist: feedparser>=6.0
|
|
27
|
+
Provides-Extra: stealth
|
|
28
|
+
Requires-Dist: curl-cffi>=0.7; extra == "stealth"
|
|
29
|
+
Requires-Dist: primp>=0.13; extra == "stealth"
|
|
30
|
+
Requires-Dist: nodriver>=0.38; extra == "stealth"
|
|
31
|
+
Requires-Dist: patchright>=0.5; extra == "stealth"
|
|
32
|
+
Provides-Extra: harvest
|
|
33
|
+
Requires-Dist: trafilatura>=1.6; extra == "harvest"
|
|
34
|
+
Requires-Dist: newspaper4k>=0.9; extra == "harvest"
|
|
35
|
+
Requires-Dist: langdetect>=1.0; extra == "harvest"
|
|
36
|
+
Requires-Dist: markitdown>=0.1; extra == "harvest"
|
|
37
|
+
Requires-Dist: PyMuPDF>=1.23; extra == "harvest"
|
|
38
|
+
Requires-Dist: crawl4ai>=0.3; extra == "harvest"
|
|
39
|
+
Provides-Extra: process
|
|
40
|
+
Requires-Dist: rapidfuzz>=3.5; extra == "process"
|
|
41
|
+
Requires-Dist: spacy>=3.7; extra == "process"
|
|
42
|
+
Requires-Dist: litellm>=1.30; extra == "process"
|
|
43
|
+
Requires-Dist: tiktoken>=0.5; extra == "process"
|
|
44
|
+
Provides-Extra: science
|
|
45
|
+
Requires-Dist: pandas>=2.0; extra == "science"
|
|
46
|
+
Requires-Dist: numpy>=1.24; extra == "science"
|
|
47
|
+
Requires-Dist: scikit-learn>=1.3; extra == "science"
|
|
26
48
|
Provides-Extra: mcp
|
|
27
49
|
Requires-Dist: fastmcp>=3.0; extra == "mcp"
|
|
28
50
|
Provides-Extra: api
|
|
@@ -32,10 +54,11 @@ Provides-Extra: qdrant
|
|
|
32
54
|
Requires-Dist: qdrant-client>=1.7; extra == "qdrant"
|
|
33
55
|
Requires-Dist: sentence-transformers>=2.2; extra == "qdrant"
|
|
34
56
|
Provides-Extra: all
|
|
35
|
-
Requires-Dist: behive[api,mcp,qdrant]; extra == "all"
|
|
57
|
+
Requires-Dist: behive[api,harvest,mcp,process,qdrant,science,stealth]; extra == "all"
|
|
36
58
|
Provides-Extra: dev
|
|
37
59
|
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
38
60
|
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
|
|
61
|
+
Requires-Dist: ruff>=0.3; extra == "dev"
|
|
39
62
|
Dynamic: license-file
|
|
40
63
|
|
|
41
64
|
<p align="center">
|
|
@@ -51,6 +74,8 @@ Dynamic: license-file
|
|
|
51
74
|
|
|
52
75
|
<p align="center">
|
|
53
76
|
<a href="https://pypi.org/project/behive"><img src="https://img.shields.io/badge/pip_install-behive-FFB300?style=for-the-badge&logo=python&logoColor=white" /></a>
|
|
77
|
+
<a href="https://www.npmjs.com/package/n8n-nodes-behive"><img src="https://img.shields.io/badge/n8n-community_node-FF6D5A?style=for-the-badge&logo=n8n&logoColor=white" /></a>
|
|
78
|
+
<a href="#self-hosting"><img src="https://img.shields.io/badge/Docker-compose_up-2496ED?style=for-the-badge&logo=docker&logoColor=white" /></a>
|
|
54
79
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-22c55e?style=for-the-badge" /></a>
|
|
55
80
|
<a href="https://api.yu-na.io/docs"><img src="https://img.shields.io/badge/API-Live-4FC3F7?style=for-the-badge&logo=fastapi&logoColor=white" /></a>
|
|
56
81
|
<a href="#mcp-integration"><img src="https://img.shields.io/badge/MCP-Native-AB47BC?style=for-the-badge" /></a>
|
|
@@ -59,10 +84,12 @@ Dynamic: license-file
|
|
|
59
84
|
<p align="center">
|
|
60
85
|
<a href="#quick-start">Quick Start</a> •
|
|
61
86
|
<a href="#use-with-claude--chatgpt--gemini">Use with AI Assistants</a> •
|
|
87
|
+
<a href="#drone-arsenal">Drone Arsenal</a> •
|
|
62
88
|
<a href="#benchmarks">Benchmarks</a> •
|
|
63
89
|
<a href="#architecture">Architecture</a> •
|
|
64
90
|
<a href="#api-reference">API</a> •
|
|
65
|
-
<a href="#
|
|
91
|
+
<a href="#self-hosting">Self-Hosting</a> •
|
|
92
|
+
<a href="#integrations">Integrations</a>
|
|
66
93
|
</p>
|
|
67
94
|
|
|
68
95
|
---
|
|
@@ -89,36 +116,115 @@ Your AI assistant → BeHive → Verified, structured, scored knowledge
|
|
|
89
116
|
```bash
|
|
90
117
|
pip install behive
|
|
91
118
|
|
|
92
|
-
#
|
|
93
|
-
export
|
|
94
|
-
export BEHIVE_LLM=openai # OpenAI GPT-4o
|
|
95
|
-
export BEHIVE_LLM=local # Self-hosted via SGLang/vLLM
|
|
119
|
+
# Set your LLM API key (you use YOUR OWN subscription — BeHive costs nothing)
|
|
120
|
+
export ANTHROPIC_API_KEY=*** # or OPENAI_API_KEY
|
|
96
121
|
|
|
97
|
-
#
|
|
98
|
-
behive
|
|
122
|
+
# Start the server
|
|
123
|
+
behive serve
|
|
124
|
+
```
|
|
99
125
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
126
|
+
**Full install** (stealth drones, content extraction, NLP processing):
|
|
127
|
+
```bash
|
|
128
|
+
pip install "behive[all]"
|
|
129
|
+
```
|
|
104
130
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
131
|
+
Or pick what you need:
|
|
132
|
+
```bash
|
|
133
|
+
pip install "behive[stealth]" # curl_cffi, primp, nodriver, patchright
|
|
134
|
+
pip install "behive[harvest]" # trafilatura, newspaper4k, PyMuPDF, crawl4ai
|
|
135
|
+
pip install "behive[process]" # rapidfuzz, spacy, litellm, tiktoken
|
|
136
|
+
pip install "behive[mcp,api]" # MCP server + REST API
|
|
110
137
|
```
|
|
111
138
|
|
|
139
|
+
That's it. BeHive is now running:
|
|
140
|
+
- **API** → `http://localhost:8091` (REST endpoints)
|
|
141
|
+
- **MCP** → `http://localhost:8090/mcp` (for AI assistants)
|
|
142
|
+
- **Docs** → `http://localhost:8091/docs` (Swagger UI)
|
|
143
|
+
|
|
112
144
|
---
|
|
113
145
|
|
|
114
|
-
## Use
|
|
146
|
+
## 🧠 Model Routing — Use Cheap Models to Collect, Smart Models to Analyze
|
|
147
|
+
|
|
148
|
+
BeHive doesn't force you into one model. You choose what runs each pipeline stage:
|
|
149
|
+
|
|
150
|
+
| Stage | Role | Recommended |
|
|
151
|
+
|-------|------|-------------|
|
|
152
|
+
| **scout** | Query generation, source discovery | Haiku / GPT-4o-mini / local |
|
|
153
|
+
| **harvest** | Relevance filtering, content triage | Haiku / GPT-4o-mini / local |
|
|
154
|
+
| **process** | Claim extraction, quality scoring | Haiku or Sonnet |
|
|
155
|
+
| **synth** | Report synthesis, deduplication | Sonnet / Opus / GPT-4o |
|
|
156
|
+
|
|
157
|
+
### Quick Setup (one command)
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Apply a preset
|
|
161
|
+
behive config --preset balanced # Haiku collects, Sonnet synthesizes (~$1.50/mission)
|
|
162
|
+
behive config --preset budget # Haiku everywhere (~$0.30/mission)
|
|
163
|
+
behive config --preset quality # Sonnet everywhere (~$4.00/mission)
|
|
164
|
+
behive config --preset local # Your own LLM server ($0.00/mission)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Interactive Setup
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
behive config --quick # Pick one model for everything
|
|
171
|
+
behive config --full # Choose model per stage (interactive)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Fine-grained Control
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Set a single stage
|
|
178
|
+
behive config --stage synth --model claude-opus
|
|
179
|
+
behive config --stage scout --model ollama/deepseek-r1
|
|
180
|
+
|
|
181
|
+
# Check current config
|
|
182
|
+
behive config --show
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Environment Variable Override (Docker/CI)
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
export BEHIVE_MODEL_SCOUT=ollama/llama3.1
|
|
189
|
+
export BEHIVE_MODEL_SYNTH=anthropic/claude-sonnet-4-20250514
|
|
190
|
+
behive serve
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Priority: `BEHIVE_MODEL_{STAGE}` > `BEHIVE_MODEL` > config.yaml > defaults
|
|
115
194
|
|
|
116
|
-
|
|
195
|
+
### Available Model Presets
|
|
117
196
|
|
|
118
|
-
|
|
197
|
+
| Preset | Model String |
|
|
198
|
+
|--------|-------------|
|
|
199
|
+
| `claude-haiku` | anthropic/claude-3-5-haiku-20241022 |
|
|
200
|
+
| `claude-sonnet` | anthropic/claude-sonnet-4-20250514 |
|
|
201
|
+
| `claude-opus` | anthropic/claude-opus-4-20250514 |
|
|
202
|
+
| `gpt-4o-mini` | openai/gpt-4o-mini |
|
|
203
|
+
| `gpt-4o` | openai/gpt-4o |
|
|
204
|
+
| `gpt-4.1` | openai/gpt-4.1 |
|
|
205
|
+
| `gemini-flash` | google/gemini-2.5-flash |
|
|
206
|
+
| `gemini-pro` | google/gemini-2.5-pro |
|
|
207
|
+
| `bedrock-haiku` | bedrock/us.anthropic.claude-haiku-4-5-... |
|
|
208
|
+
| `bedrock-sonnet` | bedrock/us.anthropic.claude-sonnet-4-6-... |
|
|
209
|
+
| `local` | openai/local-model (any OpenAI-compatible server) |
|
|
210
|
+
| `ollama` | ollama/llama3.1 |
|
|
211
|
+
|
|
212
|
+
Or pass any [litellm-compatible](https://docs.litellm.ai/docs/providers) model string directly.
|
|
213
|
+
|
|
214
|
+
---
|
|
119
215
|
|
|
120
|
-
|
|
216
|
+
## 🔌 Setup with Claude Desktop (30 seconds)
|
|
217
|
+
|
|
218
|
+
> **You bring your Claude subscription. BeHive adds research superpowers. No extra cost from us.**
|
|
219
|
+
|
|
220
|
+
**Step 1:** Install and start BeHive:
|
|
221
|
+
```bash
|
|
222
|
+
pip install behive
|
|
223
|
+
export ANTHROPIC_API_KEY=*** # your own key
|
|
224
|
+
behive serve
|
|
225
|
+
```
|
|
121
226
|
|
|
227
|
+
**Step 2:** Open Claude Desktop → Settings → Developer → Edit Config → paste:
|
|
122
228
|
```json
|
|
123
229
|
{
|
|
124
230
|
"mcpServers": {
|
|
@@ -130,115 +236,161 @@ Add to your Claude Desktop `config.json` or Cursor settings:
|
|
|
130
236
|
}
|
|
131
237
|
```
|
|
132
238
|
|
|
133
|
-
|
|
239
|
+
**Step 3:** Restart Claude Desktop. Done. Now ask:
|
|
240
|
+
> "Research the EU AI Act enforcement timeline and penalties"
|
|
134
241
|
|
|
135
|
-
|
|
136
|
-
>
|
|
137
|
-
> **Claude** *(calls `research_topic`)* **:** "I've launched a deep research mission. BeHive found 312 claims across 156 sources. Here are the key findings, scored by confidence:
|
|
138
|
-
> - [0.94] CBAM transitional phase runs Jan 2024–Dec 2025; full enforcement begins Jan 2026
|
|
139
|
-
> - [0.91] Importers must purchase CBAM certificates matching embedded CO₂ at EU ETS price
|
|
140
|
-
> - [0.88] Steel, cement, aluminium, fertilizers, electricity, and hydrogen are covered sectors
|
|
141
|
-
> ..."
|
|
242
|
+
Claude will call BeHive automatically, fetch 200+ sources, and return scored claims instead of guessing from training data.
|
|
142
243
|
|
|
143
|
-
|
|
244
|
+
<details>
|
|
245
|
+
<summary><strong>What happens under the hood</strong></summary>
|
|
144
246
|
|
|
145
|
-
|
|
247
|
+
```
|
|
248
|
+
You ask Claude a question
|
|
249
|
+
↓
|
|
250
|
+
Claude calls BeHive MCP tool "research_topic"
|
|
251
|
+
↓
|
|
252
|
+
BeHive scouts 70+ APIs, fetches 1000+ URLs via stealth drones
|
|
253
|
+
↓
|
|
254
|
+
Your LLM key extracts claims (Claude Haiku = ~$0.50 per mission)
|
|
255
|
+
↓
|
|
256
|
+
BeHive scores, deduplicates, builds knowledge graph
|
|
257
|
+
↓
|
|
258
|
+
Returns structured report to Claude
|
|
259
|
+
↓
|
|
260
|
+
Claude presents findings with confidence scores and source links
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Cost: ~$0.30–$2.00 per research mission** (your Anthropic/OpenAI tokens).
|
|
264
|
+
BeHive itself: **free forever** (MIT license).
|
|
265
|
+
</details>
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## 🔌 Setup with ChatGPT (Custom GPT)
|
|
270
|
+
|
|
271
|
+
**Step 1:** Start BeHive on a server with a public URL (or use tunneling):
|
|
272
|
+
```bash
|
|
273
|
+
pip install behive
|
|
274
|
+
export OPENAI_API_KEY=*** # your own key
|
|
275
|
+
behive serve --host 0.0.0.0
|
|
276
|
+
|
|
277
|
+
# Expose with a tunnel (for testing):
|
|
278
|
+
# npx cloudflared tunnel --url http://localhost:8091
|
|
279
|
+
```
|
|
146
280
|
|
|
147
|
-
Create a Custom GPT
|
|
281
|
+
**Step 2:** Create a Custom GPT at [chat.openai.com/gpts/editor](https://chat.openai.com/gpts/editor):
|
|
282
|
+
|
|
283
|
+
- **Name:** "Deep Researcher (BeHive)"
|
|
284
|
+
- **Instructions:** "You are a research analyst. Use the BeHive actions to research topics. Always cite claim confidence scores."
|
|
285
|
+
- **Actions → Import URL:** paste your server URL + `/openapi.json`
|
|
286
|
+
|
|
287
|
+
Or manually add this schema:
|
|
148
288
|
|
|
149
289
|
```yaml
|
|
150
|
-
openapi: 3.
|
|
290
|
+
openapi: 3.1.0
|
|
151
291
|
info:
|
|
152
|
-
title: BeHive Research
|
|
153
|
-
version:
|
|
292
|
+
title: BeHive Research API
|
|
293
|
+
version: 0.2.0
|
|
154
294
|
servers:
|
|
155
|
-
- url: https
|
|
156
|
-
paths:
|
|
295
|
+
- url: https://*** paths:
|
|
157
296
|
/research:
|
|
158
297
|
post:
|
|
159
298
|
operationId: startResearch
|
|
299
|
+
summary: Start a deep research mission
|
|
160
300
|
requestBody:
|
|
301
|
+
required: true
|
|
161
302
|
content:
|
|
162
303
|
application/json:
|
|
163
304
|
schema:
|
|
164
305
|
type: object
|
|
306
|
+
required: [query]
|
|
165
307
|
properties:
|
|
166
308
|
query:
|
|
167
309
|
type: string
|
|
310
|
+
description: Research topic or question
|
|
168
311
|
depth:
|
|
169
312
|
type: integer
|
|
170
313
|
default: 3
|
|
314
|
+
description: 1=quick, 3=standard, 5=deep
|
|
171
315
|
responses:
|
|
172
316
|
'200':
|
|
173
|
-
description: Mission started
|
|
174
|
-
/research/{
|
|
317
|
+
description: Mission started successfully
|
|
318
|
+
/research/{mission_id}:
|
|
175
319
|
get:
|
|
176
|
-
operationId:
|
|
320
|
+
operationId: getResearchResults
|
|
321
|
+
summary: Get completed research with scored claims
|
|
177
322
|
parameters:
|
|
178
|
-
- name:
|
|
323
|
+
- name: mission_id
|
|
179
324
|
in: path
|
|
180
325
|
required: true
|
|
181
326
|
schema:
|
|
182
327
|
type: string
|
|
183
328
|
responses:
|
|
184
329
|
'200':
|
|
185
|
-
description: Research report
|
|
330
|
+
description: Research results with claims and report
|
|
331
|
+
/claims/search:
|
|
332
|
+
get:
|
|
333
|
+
operationId: searchKnowledge
|
|
334
|
+
summary: Search across all previously researched knowledge
|
|
335
|
+
parameters:
|
|
336
|
+
- name: q
|
|
337
|
+
in: query
|
|
338
|
+
required: true
|
|
339
|
+
schema:
|
|
340
|
+
type: string
|
|
341
|
+
- name: limit
|
|
342
|
+
in: query
|
|
343
|
+
schema:
|
|
344
|
+
type: integer
|
|
345
|
+
default: 20
|
|
346
|
+
responses:
|
|
347
|
+
'200':
|
|
348
|
+
description: Matching claims with scores
|
|
186
349
|
```
|
|
187
350
|
|
|
188
|
-
|
|
351
|
+
**Step 3:** Use your Custom GPT. Ask: "Research quantum computing breakthroughs 2026"
|
|
189
352
|
|
|
190
|
-
|
|
191
|
-
import openai
|
|
192
|
-
import requests
|
|
353
|
+
---
|
|
193
354
|
|
|
194
|
-
|
|
195
|
-
mission = requests.post("http://localhost:8091/research", json={
|
|
196
|
-
"query": "Quantum computing error correction breakthroughs 2026",
|
|
197
|
-
"depth": 3
|
|
198
|
-
}).json()
|
|
355
|
+
## 🔌 Setup with Cursor / Windsurf / Any MCP Client
|
|
199
356
|
|
|
200
|
-
|
|
201
|
-
report = requests.get(f"http://localhost:8091/research/{mission['job_id']}/report").json()
|
|
357
|
+
Any editor or tool supporting MCP works identically to Claude Desktop:
|
|
202
358
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
359
|
+
```json
|
|
360
|
+
{
|
|
361
|
+
"mcpServers": {
|
|
362
|
+
"behive": {
|
|
363
|
+
"url": "http://localhost:8090/mcp",
|
|
364
|
+
"transport": "streamable-http"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
210
368
|
```
|
|
211
369
|
|
|
212
|
-
|
|
370
|
+
**Available MCP tools:**
|
|
371
|
+
| Tool | Description |
|
|
372
|
+
|------|-------------|
|
|
373
|
+
| `research_topic` | Start a deep research mission (returns job_id) |
|
|
374
|
+
| `mission_status` | Poll running mission progress |
|
|
375
|
+
| `get_report` | Get synthesized report for completed mission |
|
|
376
|
+
| `search_knowledge` | Search all previously extracted claims |
|
|
213
377
|
|
|
214
|
-
|
|
215
|
-
import google.generativeai as genai
|
|
216
|
-
import requests
|
|
378
|
+
---
|
|
217
379
|
|
|
218
|
-
|
|
219
|
-
claims = requests.get("http://localhost:8091/search", params={
|
|
220
|
-
"query": "autonomous vehicles regulations 2026",
|
|
221
|
-
"limit": 50
|
|
222
|
-
}).json()
|
|
380
|
+
## 🔌 Setup with Hermes Agent / OpenClaw
|
|
223
381
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
f"{claims['results']}"
|
|
230
|
-
)
|
|
382
|
+
**Hermes Agent** (automatic — skill already published):
|
|
383
|
+
```bash
|
|
384
|
+
# BeHive skill auto-loads when you ask Hermes to research anything
|
|
385
|
+
# Just ensure behive serve is running on the same machine
|
|
386
|
+
behive serve
|
|
231
387
|
```
|
|
232
388
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
| Hallucination risk | Every claim traced to source URL |
|
|
239
|
-
| Stale knowledge (months old) | Real-time web research |
|
|
240
|
-
| Unstructured text blob | Typed claims, entities, relationships |
|
|
241
|
-
| One-shot, forgotten | Cumulative knowledge graph across sessions |
|
|
389
|
+
**OpenClaw:**
|
|
390
|
+
```bash
|
|
391
|
+
# Install from integrations directory
|
|
392
|
+
cp integrations/openclaw/SKILL.md ~/.openclaw/skills/behive-research.md
|
|
393
|
+
```
|
|
242
394
|
|
|
243
395
|
---
|
|
244
396
|
|
|
@@ -502,26 +654,24 @@ BeHive implements the [Model Context Protocol](https://modelcontextprotocol.io)
|
|
|
502
654
|
|
|
503
655
|
## Self-Hosting
|
|
504
656
|
|
|
505
|
-
###
|
|
506
|
-
|
|
507
|
-
- Python 3.10+
|
|
508
|
-
- PostgreSQL 14+ (claims storage)
|
|
509
|
-
- LLM access (Bedrock, OpenAI, or local SGLang/vLLM)
|
|
510
|
-
- Optional: Neo4j (knowledge graph), Qdrant (embeddings)
|
|
657
|
+
### Docker (recommended)
|
|
511
658
|
|
|
512
|
-
|
|
659
|
+
```bash
|
|
660
|
+
git clone https://github.com/qa10devteam/behive.git
|
|
661
|
+
cd behive
|
|
662
|
+
cp .env.example .env # add your LLM API key
|
|
663
|
+
docker compose up -d # API ready at localhost:8091
|
|
664
|
+
```
|
|
513
665
|
|
|
666
|
+
Full stack with knowledge graph + vector search:
|
|
514
667
|
```bash
|
|
515
|
-
docker compose up -d
|
|
516
|
-
behive research "your topic" --scale 30
|
|
668
|
+
docker compose --profile full up -d
|
|
517
669
|
```
|
|
518
670
|
|
|
519
671
|
### Manual Setup
|
|
520
672
|
|
|
521
673
|
```bash
|
|
522
|
-
|
|
523
|
-
cd behive
|
|
524
|
-
pip install -e .
|
|
674
|
+
pip install behive[all]
|
|
525
675
|
|
|
526
676
|
# PostgreSQL
|
|
527
677
|
createdb hive
|
|
@@ -536,6 +686,17 @@ behive api start # REST API on :8091
|
|
|
536
686
|
behive mcp start # MCP server on :8090
|
|
537
687
|
```
|
|
538
688
|
|
|
689
|
+
### Minimum Requirements
|
|
690
|
+
|
|
691
|
+
| Component | Minimum | Recommended |
|
|
692
|
+
|-----------|---------|-------------|
|
|
693
|
+
| RAM | 4 GB | 16 GB |
|
|
694
|
+
| CPU | 2 cores | 8+ cores |
|
|
695
|
+
| Storage | 10 GB | 50 GB |
|
|
696
|
+
| GPU | Not required | 4× L4 (local LLM) |
|
|
697
|
+
| PostgreSQL | 14+ | 16 (pgvector) |
|
|
698
|
+
| LLM | Any OpenAI-compatible | Bedrock Claude (Haiku + Sonnet) |
|
|
699
|
+
|
|
539
700
|
---
|
|
540
701
|
|
|
541
702
|
## How It Works (for humans)
|
|
@@ -601,21 +762,44 @@ behive mcp start # MCP server on :8090
|
|
|
601
762
|
- [x] SSE streaming (real-time progress)
|
|
602
763
|
- [x] Knowledge graph (Neo4j)
|
|
603
764
|
- [x] 70+ API sources
|
|
604
|
-
- [
|
|
605
|
-
- [
|
|
606
|
-
- [
|
|
765
|
+
- [x] `pip install behive` ([PyPI](https://pypi.org/project/behive/))
|
|
766
|
+
- [x] Docker Compose one-liner
|
|
767
|
+
- [x] n8n community node ([npm](https://www.npmjs.com/package/n8n-nodes-behive))
|
|
768
|
+
- [x] Agent skills (Hermes, OpenClaw, Claude Desktop)
|
|
607
769
|
- [ ] Web UI dashboard
|
|
608
770
|
- [ ] Multi-tenant API keys
|
|
609
771
|
- [ ] Webhook callbacks
|
|
772
|
+
- [ ] Scheduled recurring research
|
|
773
|
+
- [ ] PDF export with charts
|
|
774
|
+
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
## Integrations
|
|
778
|
+
|
|
779
|
+
BeHive works with every major AI agent platform:
|
|
780
|
+
|
|
781
|
+
| Platform | Method | Install |
|
|
782
|
+
|----------|--------|---------|
|
|
783
|
+
| **Claude Desktop** | MCP (zero-code) | Add URL to `claude_desktop_config.json` |
|
|
784
|
+
| **Cursor / Windsurf** | MCP | Add MCP server in settings |
|
|
785
|
+
| **Hermes Agent** | MCP + Skill | `cp integrations/hermes ~/.hermes/skills/research/behive-research` |
|
|
786
|
+
| **OpenClaw** | Skill | `cp integrations/openclaw ~/.openclaw/workspace/skills/behive-research` |
|
|
787
|
+
| **n8n** | Community Node | Install `n8n-nodes-behive` in Settings → Community Nodes |
|
|
788
|
+
| **ChatGPT** | Custom GPT / API | OpenAPI spec in README above |
|
|
789
|
+
| **Any MCP client** | Streamable HTTP | URL: `http://localhost:8090/mcp` |
|
|
790
|
+
|
|
791
|
+
See [`integrations/`](integrations/) for detailed setup guides.
|
|
610
792
|
|
|
611
793
|
---
|
|
612
794
|
|
|
613
795
|
## Contributing
|
|
614
796
|
|
|
797
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style, and PR guidelines.
|
|
798
|
+
|
|
615
799
|
```bash
|
|
616
800
|
git clone https://github.com/qa10devteam/behive.git
|
|
617
801
|
cd behive
|
|
618
|
-
pip install -e ".[dev]"
|
|
802
|
+
pip install -e ".[all,dev]"
|
|
619
803
|
pytest
|
|
620
804
|
```
|
|
621
805
|
|