Hivemind

Search

REST

Retrieving assembled context over HTTP.

Terminal
curl -X POST https://app.gethivemind.xyz/v3/search \
  -H "Authorization: Bearer $HIVEMIND_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "q": "how often can we deploy?",
    "budget": 2000,
    "targetTool": "claude-code"
  }'
json
{
  "payload": "--- RETRIEVED MEMORY CONTEXT ---\n[Context 1]: …",
  "memoryIds": ["…"],
  "candidateCount": 4,
  "droppedCount": 3,
  "tokensSaved": 148,
  "latencyMs": 287
}

payload is ready for a prompt. See Retrieval for what happens between the query and that string.

Parameters

Default
qrequiredThe query
budget4000Hard token ceiling
sourceRefnoneWhere the question is asked from, ranking origin, never a filter
limit10Cap on results. Recall keeps climbing past this, raise it deliberately, and watch the token count
thresholdcalibratedRelevance floor, 0–1
searchModehybridmemories, documents, hybrid
filters,Metadata predicate
reranktrueCross-encoder re-scoring. Adds ~100ms; pass false if latency matters more than ordering
rewriteQueryfalseAlso search alternative phrasings
targetTool,Shapes the payload for the receiver
threadId,Boost a thread
include,memories, dropped, trace

Filters

json
{
  "q": "database migrations",
  "filters": {
    "AND": [
      { "key": "team", "value": "platform" },
      { "key": "priority", "value": 5, "comparator": "gte", "numeric": true }
    ]
  }
}

Comparators: eq, ne, gt, gte, lt, lte, contains, in. Nest with AND and OR; negate inverts; numeric compares as numbers rather than text.

Empty results are normal

memoryIds is empty when nothing is relevant enough. Check its length rather than assuming there is always context to inject.